Skip to content

Commit

Permalink
Automated SDK update
Browse files Browse the repository at this point in the history
This updates the SDK from internal repo commit segmentio/public-api@8e529682.
  • Loading branch information
APIs and Common Services team committed Oct 20, 2023
1 parent cc8d989 commit 2ae7c9f
Show file tree
Hide file tree
Showing 610 changed files with 11,012 additions and 44,448 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All endpoints in the API follow REST conventions and use standard HTTP methods.

See the next sections for more information on how to use the Segment Public API Java SDK.

Latest API and SDK version: 36.2.0
Latest API and SDK version: 36.3.0

## Requirements

Expand All @@ -28,7 +28,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.segment.publicapi</groupId>
<artifactId>segment-publicapi</artifactId>
<version>36.2.0</version>
<version>36.3.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -44,7 +44,7 @@ Add this dependency to your project's build file:
}
dependencies {
implementation "com.segment.publicapi:segment-publicapi:36.2.0"
implementation "com.segment.publicapi:segment-publicapi:36.3.0"
}
```

Expand All @@ -58,7 +58,7 @@ mvn clean package

Then manually install the following JARs:

* `target/segment-publicapi-36.2.0.jar`
* `target/segment-publicapi-36.3.0.jar`
* `target/lib/*.jar`

You are now ready to start making calls to Public API!
Expand Down Expand Up @@ -87,7 +87,7 @@ public class Example {

ApiCallsApi apiInstance = new ApiCallsApi(defaultClient);
String period = "2021-02-01"; // String | The start of the usage month in the ISO-8601 format. This parameter exists in v1.
PaginationInput pagination = new HashMap(); // PaginationInput | Pagination input for per Source API calls counts. This parameter exists in v1.
PaginationInput pagination = new PaginationInput(); // PaginationInput | Pagination input for per Source API calls counts. This parameter exists in v1.

// Make an API call without Pagination
try {
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>segment-publicapi</artifactId>
<packaging>jar</packaging>
<name>segment-publicapi</name>
<version>36.2.0</version>
<version>36.3.0</version>
<url>https://segment.com/docs/api/public-api/</url>
<description>Segment Public API</description>
<scm>
Expand Down Expand Up @@ -226,7 +226,7 @@

<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.15.0</version>
<version>1.18.1</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
Expand Down Expand Up @@ -366,6 +366,6 @@
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
<jsr311-api-version>1.1.1</jsr311-api-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotless.version>2.27.2</spotless.version>
<spotless.version>2.40.0</spotless.version>
</properties>
</project>
1 change: 0 additions & 1 deletion src/main/java/com/segment/publicapi/ApiCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import java.util.List;
import java.util.Map;

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/segment/publicapi/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import com.segment.publicapi.auth.ApiKeyAuth;
import com.segment.publicapi.auth.Authentication;
import com.segment.publicapi.auth.HttpBasicAuth;
Expand Down Expand Up @@ -124,7 +123,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("Public API SDK 36.2.0 (Java)");
setUserAgent("Public API SDK 36.3.0 (Java)");

authentications = new HashMap<String, Authentication>();
}
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/segment/publicapi/ApiException.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -104,7 +103,12 @@ public ApiException(
* @param responseBody the response body
*/
public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) {
this((String) null, (Throwable) null, code, responseHeaders, responseBody);
this(
"Response Code: " + code + " Response Body: " + responseBody,
(Throwable) null,
code,
responseHeaders,
responseBody);
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/segment/publicapi/ApiResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import java.util.List;
import java.util.Map;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/segment/publicapi/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
package com.segment.publicapi;

public class Configuration {
public static final String VERSION = "36.3.0";

private static ApiClient defaultApiClient = new ApiClient();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import java.io.IOException;
import okhttp3.*;
import okio.Buffer;
Expand Down
144 changes: 0 additions & 144 deletions src/main/java/com/segment/publicapi/JSON.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.RequestBody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.ResponseBody;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/segment/publicapi/ServerConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.segment.publicapi;


import java.util.Map;

/** Representing a Server configuration. */
Expand Down Expand Up @@ -49,7 +48,7 @@ public String URL(Map<String, String> variables) {
+ ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/segment/publicapi/ServerVariable.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.segment.publicapi;


import java.util.HashSet;

/** Representing a Server Variable for server URL template substitution. */
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/segment/publicapi/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi;


import java.util.Collection;
import java.util.Iterator;

Expand Down
14 changes: 3 additions & 11 deletions src/main/java/com/segment/publicapi/api/ApiCallsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package com.segment.publicapi.api;


import com.google.gson.reflect.TypeToken;
import com.segment.publicapi.ApiCallback;
import com.segment.publicapi.ApiClient;
Expand Down Expand Up @@ -131,7 +130,6 @@ public okhttp3.Call getDailyPerSourceAPICallsUsageCall(
}

final String[] localVarContentTypes = {};

final String localVarContentType =
localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
Expand All @@ -157,7 +155,6 @@ public okhttp3.Call getDailyPerSourceAPICallsUsageCall(
private okhttp3.Call getDailyPerSourceAPICallsUsageValidateBeforeCall(
String period, PaginationInput pagination, final ApiCallback _callback)
throws ApiException {

// verify the required parameter 'period' is set
if (period == null) {
throw new ApiException(
Expand All @@ -172,9 +169,7 @@ private okhttp3.Call getDailyPerSourceAPICallsUsageValidateBeforeCall(
+ " getDailyPerSourceAPICallsUsage(Async)");
}

okhttp3.Call localVarCall =
getDailyPerSourceAPICallsUsageCall(period, pagination, _callback);
return localVarCall;
return getDailyPerSourceAPICallsUsageCall(period, pagination, _callback);
}

/**
Expand Down Expand Up @@ -268,6 +263,7 @@ public okhttp3.Call getDailyPerSourceAPICallsUsageAsync(
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}

/**
* Build call for getDailyWorkspaceAPICallsUsage
*
Expand Down Expand Up @@ -334,7 +330,6 @@ public okhttp3.Call getDailyWorkspaceAPICallsUsageCall(
}

final String[] localVarContentTypes = {};

final String localVarContentType =
localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
Expand All @@ -360,7 +355,6 @@ public okhttp3.Call getDailyWorkspaceAPICallsUsageCall(
private okhttp3.Call getDailyWorkspaceAPICallsUsageValidateBeforeCall(
String period, PaginationInput pagination, final ApiCallback _callback)
throws ApiException {

// verify the required parameter 'period' is set
if (period == null) {
throw new ApiException(
Expand All @@ -375,9 +369,7 @@ private okhttp3.Call getDailyWorkspaceAPICallsUsageValidateBeforeCall(
+ " getDailyWorkspaceAPICallsUsage(Async)");
}

okhttp3.Call localVarCall =
getDailyWorkspaceAPICallsUsageCall(period, pagination, _callback);
return localVarCall;
return getDailyWorkspaceAPICallsUsageCall(period, pagination, _callback);
}

/**
Expand Down
Loading

0 comments on commit 2ae7c9f

Please sign in to comment.