Skip to content

Commit acc9974

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@9f95ac2b.
1 parent c4d54a7 commit acc9974

10 files changed

+1061
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All endpoints in the API follow REST conventions and use standard HTTP methods.
1010

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

13-
Latest API and SDK version: 59.3.0
13+
Latest API and SDK version: 59.4.0
1414

1515
## Requirements
1616

@@ -28,7 +28,7 @@ Add this dependency to your project's POM:
2828
<dependency>
2929
<groupId>com.segment.publicapi</groupId>
3030
<artifactId>segment-publicapi</artifactId>
31-
<version>59.3.0</version>
31+
<version>59.4.0</version>
3232
<scope>compile</scope>
3333
</dependency>
3434
```
@@ -44,7 +44,7 @@ Add this dependency to your project's build file:
4444
}
4545
4646
dependencies {
47-
implementation "com.segment.publicapi:segment-publicapi:59.3.0"
47+
implementation "com.segment.publicapi:segment-publicapi:59.4.0"
4848
}
4949
```
5050

@@ -58,7 +58,7 @@ mvn clean package
5858

5959
Then manually install the following JARs:
6060

61-
* `target/segment-publicapi-59.3.0.jar`
61+
* `target/segment-publicapi-59.4.0.jar`
6262
* `target/lib/*.jar`
6363

6464
You are now ready to start making calls to Public API!

docs/AudiencesApi.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.segmentapis.com*
44

55
| Method | HTTP request | Description |
66
|------------- | ------------- | -------------|
7+
| [**addAudienceScheduleToAudience**](AudiencesApi.md#addAudienceScheduleToAudience) | **POST** /spaces/{spaceId}/audiences/{id}/schedules | Add Audience Schedule to Audience |
78
| [**createAudience**](AudiencesApi.md#createAudience) | **POST** /spaces/{spaceId}/audiences | Create Audience |
89
| [**createAudiencePreview**](AudiencesApi.md#createAudiencePreview) | **POST** /spaces/{spaceId}/audiences/previews | Create Audience Preview |
910
| [**getAudience**](AudiencesApi.md#getAudience) | **GET** /spaces/{spaceId}/audiences/{id} | Get Audience |
@@ -17,6 +18,83 @@ All URIs are relative to *https://api.segmentapis.com*
1718

1819

1920

21+
## Operation: addAudienceScheduleToAudience
22+
23+
> AddAudienceScheduleToAudience200Response addAudienceScheduleToAudience(spaceId, id, addAudienceScheduleToAudienceAlphaInput)
24+
25+
Add Audience Schedule to Audience
26+
27+
The ability to configure the run schedule for an Audience is limited to Linked Audiences (audienceType &#x3D; LINKED). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to [email protected]. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information.
28+
29+
### Example
30+
31+
```java
32+
// Import classes:
33+
import com.segment.publicapi.ApiClient;
34+
import com.segment.publicapi.ApiException;
35+
import com.segment.publicapi.Configuration;
36+
import com.segment.publicapi.auth.*;
37+
import com.segment.publicapi.models.*;
38+
import com.segment.publicapi.api.AudiencesApi;
39+
40+
public class Example {
41+
public static void main(String[] args) {
42+
ApiClient defaultClient = Configuration.getDefaultApiClient();
43+
44+
// Configure HTTP bearer authorization: token
45+
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
46+
token.setBearerToken("BEARER TOKEN");
47+
48+
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
49+
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
50+
String id = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
51+
AddAudienceScheduleToAudienceAlphaInput addAudienceScheduleToAudienceAlphaInput = new AddAudienceScheduleToAudienceAlphaInput(); // AddAudienceScheduleToAudienceAlphaInput |
52+
try {
53+
AddAudienceScheduleToAudience200Response result = apiInstance.addAudienceScheduleToAudience(spaceId, id, addAudienceScheduleToAudienceAlphaInput);
54+
System.out.println(result);
55+
} catch (ApiException e) {
56+
System.err.println("Exception when calling AudiencesApi#addAudienceScheduleToAudience");
57+
System.err.println("Status code: " + e.getCode());
58+
System.err.println("Reason: " + e.getResponseBody());
59+
System.err.println("Response headers: " + e.getResponseHeaders());
60+
e.printStackTrace();
61+
}
62+
}
63+
}
64+
```
65+
66+
### Parameters
67+
68+
69+
| Name | Type | Description | Notes |
70+
|------------- | ------------- | ------------- | -------------|
71+
| **spaceId** | **String**| | |
72+
| **id** | **String**| | |
73+
| **addAudienceScheduleToAudienceAlphaInput** | [**AddAudienceScheduleToAudienceAlphaInput**](AddAudienceScheduleToAudienceAlphaInput.md)| | |
74+
75+
### Return type
76+
77+
[**AddAudienceScheduleToAudience200Response**](AddAudienceScheduleToAudience200Response.md)
78+
79+
### Authorization
80+
81+
[token](../README.md#token)
82+
83+
### HTTP request headers
84+
85+
- **Content-Type**: application/vnd.segment.v1alpha+json
86+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
87+
88+
89+
### HTTP response details
90+
| Status code | Description | Response headers |
91+
|-------------|-------------|------------------|
92+
| **200** | OK | - |
93+
| **404** | Resource not found | - |
94+
| **422** | Validation failure | - |
95+
| **429** | Too many requests | - |
96+
97+
2098
## Operation: createAudience
2199

22100
> CreateAudience200Response createAudience(spaceId, createAudienceBetaInput)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>segment-publicapi</artifactId>
66
<packaging>jar</packaging>
77
<name>segment-publicapi</name>
8-
<version>59.3.0</version>
8+
<version>59.4.0</version>
99
<url>https://segment.com/docs/api/public-api/</url>
1010
<description>Segment Public API</description>
1111
<scm>

src/main/java/com/segment/publicapi/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private void init() {
123123
json = new JSON();
124124

125125
// Set default User-Agent.
126-
setUserAgent("Public API SDK 59.3.0 (Java)");
126+
setUserAgent("Public API SDK 59.4.0 (Java)");
127127

128128
authentications = new HashMap<String, Authentication>();
129129
}

src/main/java/com/segment/publicapi/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
package com.segment.publicapi;
1313

1414
public class Configuration {
15-
public static final String VERSION = "59.3.0";
15+
public static final String VERSION = "59.4.0";
1616

1717
private static ApiClient defaultApiClient = new ApiClient();
1818

src/main/java/com/segment/publicapi/JSON.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ private static Class getClassByDiscriminator(
106106
gsonBuilder.registerTypeAdapterFactory(
107107
new com.segment.publicapi.models.AddActivationToAudienceAlphaOutput
108108
.CustomTypeAdapterFactory());
109+
gsonBuilder.registerTypeAdapterFactory(
110+
new com.segment.publicapi.models.AddAudienceScheduleToAudience200Response
111+
.CustomTypeAdapterFactory());
112+
gsonBuilder.registerTypeAdapterFactory(
113+
new com.segment.publicapi.models.AddAudienceScheduleToAudienceAlphaInput
114+
.CustomTypeAdapterFactory());
115+
gsonBuilder.registerTypeAdapterFactory(
116+
new com.segment.publicapi.models.AddAudienceScheduleToAudienceAlphaOutput
117+
.CustomTypeAdapterFactory());
109118
gsonBuilder.registerTypeAdapterFactory(
110119
new com.segment.publicapi.models.AddConnectionFromSourceToWarehouse201Response
111120
.CustomTypeAdapterFactory());

0 commit comments

Comments
 (0)