Skip to content

Commit ffb8fd4

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

18 files changed

+3088
-307
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: 58.7.0
13+
Latest API and SDK version: 58.8.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>58.7.0</version>
31+
<version>58.8.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:58.7.0"
47+
implementation "com.segment.publicapi:segment-publicapi:58.8.0"
4848
}
4949
```
5050

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

5959
Then manually install the following JARs:
6060

61-
* `target/segment-publicapi-58.7.0.jar`
61+
* `target/segment-publicapi-58.8.0.jar`
6262
* `target/lib/*.jar`
6363

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

docs/AudiencesApi.md

Lines changed: 167 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ All URIs are relative to *https://api.segmentapis.com*
88
| [**createAudiencePreview**](AudiencesApi.md#createAudiencePreview) | **POST** /spaces/{spaceId}/audiences/previews | Create Audience Preview |
99
| [**getAudience**](AudiencesApi.md#getAudience) | **GET** /spaces/{spaceId}/audiences/{id} | Get Audience |
1010
| [**getAudiencePreview**](AudiencesApi.md#getAudiencePreview) | **GET** /spaces/{spaceId}/audiences/previews/{id} | Get Audience Preview |
11+
| [**getAudienceScheduleFromSpaceAndAudience**](AudiencesApi.md#getAudienceScheduleFromSpaceAndAudience) | **GET** /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} | Get Audience Schedule from Space And Audience |
1112
| [**listAudienceConsumersFromSpaceAndAudience**](AudiencesApi.md#listAudienceConsumersFromSpaceAndAudience) | **GET** /spaces/{spaceId}/audiences/{id}/audience-references | List Audience Consumers from Space And Audience |
13+
| [**listAudienceSchedulesFromSpaceAndAudience**](AudiencesApi.md#listAudienceSchedulesFromSpaceAndAudience) | **GET** /spaces/{spaceId}/audiences/{id}/schedules | List Audience Schedules from Space And Audience |
1214
| [**listAudiences**](AudiencesApi.md#listAudiences) | **GET** /spaces/{spaceId}/audiences | List Audiences |
1315
| [**removeAudienceFromSpace**](AudiencesApi.md#removeAudienceFromSpace) | **DELETE** /spaces/{spaceId}/audiences/{id} | Remove Audience from Space |
1416
| [**updateAudienceForSpace**](AudiencesApi.md#updateAudienceForSpace) | **PATCH** /spaces/{spaceId}/audiences/{id} | Update Audience for Space |
@@ -167,11 +169,11 @@ public class Example {
167169

168170
## Operation: getAudience
169171

170-
> GetAudience200Response getAudience(spaceId, id)
172+
> GetAudience200Response getAudience(spaceId, id, include)
171173
172174
Get Audience
173175

174-
Returns the Audience by id and spaceId. • This endpoint is in **Beta** 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. The rate limit for this endpoint is 100 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
176+
Returns the Audience by id and spaceId. Supports including audience schedules via &#x60;?include&#x3D;schedules&#x60;. • This endpoint is in **Beta** 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. The rate limit for this endpoint is 100 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
175177

176178
### Example
177179

@@ -194,9 +196,10 @@ public class Example {
194196

195197
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
196198
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
197-
String id = "id"; // String |
199+
String id = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
200+
String include = "schedules"; // String | Additional resource to include, support schedules only. This parameter exists in alpha.
198201
try {
199-
GetAudience200Response result = apiInstance.getAudience(spaceId, id);
202+
GetAudience200Response result = apiInstance.getAudience(spaceId, id, include);
200203
System.out.println(result);
201204
} catch (ApiException e) {
202205
System.err.println("Exception when calling AudiencesApi#getAudience");
@@ -216,6 +219,7 @@ public class Example {
216219
|------------- | ------------- | ------------- | -------------|
217220
| **spaceId** | **String**| | |
218221
| **id** | **String**| | |
222+
| **include** | **String**| Additional resource to include, support schedules only. This parameter exists in alpha. | [optional] [enum: schedules] |
219223

220224
### Return type
221225

@@ -315,6 +319,83 @@ public class Example {
315319
| **429** | Too many requests | - |
316320

317321

322+
## Operation: getAudienceScheduleFromSpaceAndAudience
323+
324+
> GetAudienceScheduleFromSpaceAndAudience200Response getAudienceScheduleFromSpaceAndAudience(spaceId, id, scheduleId)
325+
326+
Get Audience Schedule from Space And Audience
327+
328+
Returns the schedule for the given audience and scheduleId. • 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.
329+
330+
### Example
331+
332+
```java
333+
// Import classes:
334+
import com.segment.publicapi.ApiClient;
335+
import com.segment.publicapi.ApiException;
336+
import com.segment.publicapi.Configuration;
337+
import com.segment.publicapi.auth.*;
338+
import com.segment.publicapi.models.*;
339+
import com.segment.publicapi.api.AudiencesApi;
340+
341+
public class Example {
342+
public static void main(String[] args) {
343+
ApiClient defaultClient = Configuration.getDefaultApiClient();
344+
345+
// Configure HTTP bearer authorization: token
346+
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
347+
token.setBearerToken("BEARER TOKEN");
348+
349+
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
350+
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
351+
String id = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
352+
String scheduleId = "sch_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
353+
try {
354+
GetAudienceScheduleFromSpaceAndAudience200Response result = apiInstance.getAudienceScheduleFromSpaceAndAudience(spaceId, id, scheduleId);
355+
System.out.println(result);
356+
} catch (ApiException e) {
357+
System.err.println("Exception when calling AudiencesApi#getAudienceScheduleFromSpaceAndAudience");
358+
System.err.println("Status code: " + e.getCode());
359+
System.err.println("Reason: " + e.getResponseBody());
360+
System.err.println("Response headers: " + e.getResponseHeaders());
361+
e.printStackTrace();
362+
}
363+
}
364+
}
365+
```
366+
367+
### Parameters
368+
369+
370+
| Name | Type | Description | Notes |
371+
|------------- | ------------- | ------------- | -------------|
372+
| **spaceId** | **String**| | |
373+
| **id** | **String**| | |
374+
| **scheduleId** | **String**| | |
375+
376+
### Return type
377+
378+
[**GetAudienceScheduleFromSpaceAndAudience200Response**](GetAudienceScheduleFromSpaceAndAudience200Response.md)
379+
380+
### Authorization
381+
382+
[token](../README.md#token)
383+
384+
### HTTP request headers
385+
386+
- **Content-Type**: Not defined
387+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
388+
389+
390+
### HTTP response details
391+
| Status code | Description | Response headers |
392+
|-------------|-------------|------------------|
393+
| **200** | OK | - |
394+
| **404** | Resource not found | - |
395+
| **422** | Validation failure | - |
396+
| **429** | Too many requests | - |
397+
398+
318399
## Operation: listAudienceConsumersFromSpaceAndAudience
319400

320401
> ListAudienceConsumersFromSpaceAndAudience200Response listAudienceConsumersFromSpaceAndAudience(spaceId, id, pagination, search, sort)
@@ -396,13 +477,88 @@ public class Example {
396477
| **429** | Too many requests | - |
397478

398479

480+
## Operation: listAudienceSchedulesFromSpaceAndAudience
481+
482+
> ListAudienceSchedulesFromSpaceAndAudience200Response listAudienceSchedulesFromSpaceAndAudience(spaceId, id)
483+
484+
List Audience Schedules from Space And Audience
485+
486+
Returns the list of schedules for the given audience. • 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.
487+
488+
### Example
489+
490+
```java
491+
// Import classes:
492+
import com.segment.publicapi.ApiClient;
493+
import com.segment.publicapi.ApiException;
494+
import com.segment.publicapi.Configuration;
495+
import com.segment.publicapi.auth.*;
496+
import com.segment.publicapi.models.*;
497+
import com.segment.publicapi.api.AudiencesApi;
498+
499+
public class Example {
500+
public static void main(String[] args) {
501+
ApiClient defaultClient = Configuration.getDefaultApiClient();
502+
503+
// Configure HTTP bearer authorization: token
504+
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
505+
token.setBearerToken("BEARER TOKEN");
506+
507+
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
508+
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
509+
String id = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
510+
try {
511+
ListAudienceSchedulesFromSpaceAndAudience200Response result = apiInstance.listAudienceSchedulesFromSpaceAndAudience(spaceId, id);
512+
System.out.println(result);
513+
} catch (ApiException e) {
514+
System.err.println("Exception when calling AudiencesApi#listAudienceSchedulesFromSpaceAndAudience");
515+
System.err.println("Status code: " + e.getCode());
516+
System.err.println("Reason: " + e.getResponseBody());
517+
System.err.println("Response headers: " + e.getResponseHeaders());
518+
e.printStackTrace();
519+
}
520+
}
521+
}
522+
```
523+
524+
### Parameters
525+
526+
527+
| Name | Type | Description | Notes |
528+
|------------- | ------------- | ------------- | -------------|
529+
| **spaceId** | **String**| | |
530+
| **id** | **String**| | |
531+
532+
### Return type
533+
534+
[**ListAudienceSchedulesFromSpaceAndAudience200Response**](ListAudienceSchedulesFromSpaceAndAudience200Response.md)
535+
536+
### Authorization
537+
538+
[token](../README.md#token)
539+
540+
### HTTP request headers
541+
542+
- **Content-Type**: Not defined
543+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
544+
545+
546+
### HTTP response details
547+
| Status code | Description | Response headers |
548+
|-------------|-------------|------------------|
549+
| **200** | OK | - |
550+
| **404** | Resource not found | - |
551+
| **422** | Validation failure | - |
552+
| **429** | Too many requests | - |
553+
554+
399555
## Operation: listAudiences
400556

401-
> ListAudiences200Response listAudiences(spaceId, pagination)
557+
> ListAudiences200Response listAudiences(spaceId, pagination, include)
402558
403559
List Audiences
404560

405-
Returns Audiences by spaceId. • This endpoint is in **Beta** 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. The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
561+
Returns Audiences by spaceId. Supports including audience schedules via &#x60;?include&#x3D;schedules&#x60;. • This endpoint is in **Beta** 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. The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
406562

407563
### Example
408564

@@ -426,8 +582,9 @@ public class Example {
426582
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
427583
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
428584
ListAudiencesPaginationInput pagination = new ListAudiencesPaginationInput(); // ListAudiencesPaginationInput | Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha.
585+
String include = "schedules"; // String | Additional resource to include, support schedules only. This parameter exists in alpha.
429586
try {
430-
ListAudiences200Response result = apiInstance.listAudiences(spaceId, pagination);
587+
ListAudiences200Response result = apiInstance.listAudiences(spaceId, pagination, include);
431588
System.out.println(result);
432589
} catch (ApiException e) {
433590
System.err.println("Exception when calling AudiencesApi#listAudiences");
@@ -447,6 +604,7 @@ public class Example {
447604
|------------- | ------------- | ------------- | -------------|
448605
| **spaceId** | **String**| | |
449606
| **pagination** | [**ListAudiencesPaginationInput**](.md)| Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha. | [optional] |
607+
| **include** | **String**| Additional resource to include, support schedules only. This parameter exists in alpha. | [optional] [enum: schedules] |
450608

451609
### Return type
452610

@@ -500,7 +658,7 @@ public class Example {
500658

501659
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
502660
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
503-
String id = "aud_0ujsswThIGTUYm2K8FjOOfXtY1K"; // String |
661+
String id = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
504662
try {
505663
RemoveAudienceFromSpace200Response result = apiInstance.removeAudienceFromSpace(spaceId, id);
506664
System.out.println(result);
@@ -575,7 +733,7 @@ public class Example {
575733

576734
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
577735
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
578-
String id = "aud_0ujsswThIGTUYm2K8FjOOfXtY1K"; // String |
736+
String id = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
579737
UpdateAudienceForSpaceAlphaInput updateAudienceForSpaceAlphaInput = new UpdateAudienceForSpaceAlphaInput(); // UpdateAudienceForSpaceAlphaInput |
580738
try {
581739
UpdateAudienceForSpace200Response result = apiInstance.updateAudienceForSpace(spaceId, id, updateAudienceForSpaceAlphaInput);

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>58.7.0</version>
8+
<version>58.8.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 58.7.0 (Java)");
126+
setUserAgent("Public API SDK 58.8.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 = "58.7.0";
15+
public static final String VERSION = "58.8.0";
1616

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

0 commit comments

Comments
 (0)