Skip to content

Commit fff10ed

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

31 files changed

+11388
-8
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright © 2022 Twilio, Inc.
3+
Copyright © 2023 Twilio, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

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: 37.2.0
13+
Latest API and SDK version: 38.0.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>37.2.0</version>
31+
<version>38.0.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:37.2.0"
47+
implementation "com.segment.publicapi:segment-publicapi:38.0.0"
4848
}
4949
```
5050

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

5959
Then manually install the following JARs:
6060

61-
* `target/segment-publicapi-37.2.0.jar`
61+
* `target/segment-publicapi-38.0.0.jar`
6262
* `target/lib/*.jar`
6363

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

docs/ApiCallsApi.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# ApiCallsApi
2+
3+
All URIs are relative to *https://api.segmentapis.com*
4+
5+
| Method | HTTP request | Description |
6+
|------------- | ------------- | -------------|
7+
| [**getDailyPerSourceAPICallsUsage**](ApiCallsApi.md#getDailyPerSourceAPICallsUsage) | **GET** /usage/api-calls/sources/daily | Get Daily Per Source API Calls Usage |
8+
| [**getDailyWorkspaceAPICallsUsage**](ApiCallsApi.md#getDailyWorkspaceAPICallsUsage) | **GET** /usage/api-calls/daily | Get Daily Workspace API Calls Usage |
9+
10+
11+
12+
## Operation: getDailyPerSourceAPICallsUsage
13+
14+
> GetDailyPerSourceAPICallsUsage200Response getDailyPerSourceAPICallsUsage(period, pagination)
15+
16+
Get Daily Per Source API Calls Usage
17+
18+
Provides daily cumulative per-source API call counts for a usage period.
19+
20+
### Example
21+
22+
```java
23+
// Import classes:
24+
import com.segment.publicapi.ApiClient;
25+
import com.segment.publicapi.ApiException;
26+
import com.segment.publicapi.Configuration;
27+
import com.segment.publicapi.auth.*;
28+
import com.segment.publicapi.models.*;
29+
import com.segment.publicapi.api.ApiCallsApi;
30+
31+
public class Example {
32+
public static void main(String[] args) {
33+
ApiClient defaultClient = Configuration.getDefaultApiClient();
34+
35+
// Configure HTTP bearer authorization: token
36+
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
37+
token.setBearerToken("BEARER TOKEN");
38+
39+
ApiCallsApi apiInstance = new ApiCallsApi(defaultClient);
40+
String period = "2021-02-01"; // String | The start of the usage month in the ISO-8601 format. This parameter exists in v1.
41+
PaginationInput pagination = new PaginationInput(); // PaginationInput | Pagination input for per Source API calls counts. This parameter exists in v1.
42+
try {
43+
GetDailyPerSourceAPICallsUsage200Response result = apiInstance.getDailyPerSourceAPICallsUsage(period, pagination);
44+
System.out.println(result);
45+
} catch (ApiException e) {
46+
System.err.println("Exception when calling ApiCallsApi#getDailyPerSourceAPICallsUsage");
47+
System.err.println("Status code: " + e.getCode());
48+
System.err.println("Reason: " + e.getResponseBody());
49+
System.err.println("Response headers: " + e.getResponseHeaders());
50+
e.printStackTrace();
51+
}
52+
}
53+
}
54+
```
55+
56+
### Parameters
57+
58+
59+
| Name | Type | Description | Notes |
60+
|------------- | ------------- | ------------- | -------------|
61+
| **period** | **String**| The start of the usage month in the ISO-8601 format. This parameter exists in v1. | |
62+
| **pagination** | [**PaginationInput**](.md)| Pagination input for per Source API calls counts. This parameter exists in v1. | |
63+
64+
### Return type
65+
66+
[**GetDailyPerSourceAPICallsUsage200Response**](GetDailyPerSourceAPICallsUsage200Response.md)
67+
68+
### Authorization
69+
70+
[token](../README.md#token)
71+
72+
### HTTP request headers
73+
74+
- **Content-Type**: Not defined
75+
- **Accept**: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
76+
77+
78+
### HTTP response details
79+
| Status code | Description | Response headers |
80+
|-------------|-------------|------------------|
81+
| **200** | OK | - |
82+
| **404** | Resource not found | - |
83+
| **422** | Validation failure | - |
84+
| **429** | Too many requests | - |
85+
86+
87+
## Operation: getDailyWorkspaceAPICallsUsage
88+
89+
> GetDailyWorkspaceAPICallsUsage200Response getDailyWorkspaceAPICallsUsage(period, pagination)
90+
91+
Get Daily Workspace API Calls Usage
92+
93+
Provides daily cumulative API call counts for a usage period.
94+
95+
### Example
96+
97+
```java
98+
// Import classes:
99+
import com.segment.publicapi.ApiClient;
100+
import com.segment.publicapi.ApiException;
101+
import com.segment.publicapi.Configuration;
102+
import com.segment.publicapi.auth.*;
103+
import com.segment.publicapi.models.*;
104+
import com.segment.publicapi.api.ApiCallsApi;
105+
106+
public class Example {
107+
public static void main(String[] args) {
108+
ApiClient defaultClient = Configuration.getDefaultApiClient();
109+
110+
// Configure HTTP bearer authorization: token
111+
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
112+
token.setBearerToken("BEARER TOKEN");
113+
114+
ApiCallsApi apiInstance = new ApiCallsApi(defaultClient);
115+
String period = "2021-02-01"; // String | The start of the usage month in the ISO-8601 format. This parameter exists in v1.
116+
PaginationInput pagination = new PaginationInput(); // PaginationInput | Pagination input for Workspace API call counts. This parameter exists in v1.
117+
try {
118+
GetDailyWorkspaceAPICallsUsage200Response result = apiInstance.getDailyWorkspaceAPICallsUsage(period, pagination);
119+
System.out.println(result);
120+
} catch (ApiException e) {
121+
System.err.println("Exception when calling ApiCallsApi#getDailyWorkspaceAPICallsUsage");
122+
System.err.println("Status code: " + e.getCode());
123+
System.err.println("Reason: " + e.getResponseBody());
124+
System.err.println("Response headers: " + e.getResponseHeaders());
125+
e.printStackTrace();
126+
}
127+
}
128+
}
129+
```
130+
131+
### Parameters
132+
133+
134+
| Name | Type | Description | Notes |
135+
|------------- | ------------- | ------------- | -------------|
136+
| **period** | **String**| The start of the usage month in the ISO-8601 format. This parameter exists in v1. | |
137+
| **pagination** | [**PaginationInput**](.md)| Pagination input for Workspace API call counts. This parameter exists in v1. | |
138+
139+
### Return type
140+
141+
[**GetDailyWorkspaceAPICallsUsage200Response**](GetDailyWorkspaceAPICallsUsage200Response.md)
142+
143+
### Authorization
144+
145+
[token](../README.md#token)
146+
147+
### HTTP request headers
148+
149+
- **Content-Type**: Not defined
150+
- **Accept**: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
151+
152+
153+
### HTTP response details
154+
| Status code | Description | Response headers |
155+
|-------------|-------------|------------------|
156+
| **200** | OK | - |
157+
| **404** | Resource not found | - |
158+
| **422** | Validation failure | - |
159+
| **429** | Too many requests | - |
160+

0 commit comments

Comments
 (0)