Skip to content

Commit b7da248

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 a606212 commit b7da248

File tree

556 files changed

+12015
-540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

556 files changed

+12015
-540
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ See the next sections for more information on how to use the Segment Public API.
1111

1212
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1313

14-
- API version: 37.2.0
15-
- Package version: 37.2.0
14+
- API version: 38.0.0
15+
- Package version: 38.0.0
1616
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1717
For more information, please visit [https://docs.segmentapis.com](https://docs.segmentapis.com)
1818

@@ -79,16 +79,16 @@ with segment_public_api.ApiClient(configuration) as api_client:
7979
print("Exception when calling WorkspacesApi->get_workspace: %s\n" % e)
8080

8181
source_api_instance = segment_public_api.SourcesApi(api_client)
82-
next = None
82+
cursor = None
8383
while True:
8484
try:
8585
# Get Sources
86-
pagination = segment_public_api.PaginationInput(count=50, cursor= next)
86+
pagination = segment_public_api.PaginationInput(count=50, cursor= cursor)
8787
api_response = source_api_instance.list_sources(pagination)
8888
print("The response of SourcesApi->list_sources:\n")
8989
pprint(api_response)
90-
next = api_response.data.pagination.next
91-
if api_response.data.pagination.next == None:
90+
cursor = api_response.data.pagination.next
91+
if api_response.data.pagination.next is None:
9292
break
9393
except ApiException as e:
9494
print("Exception when calling SourcesApi->list_sources: %s\n" % e)

docs/APICallsApi.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# segment_public_api.APICallsApi
2+
3+
All URIs are relative to *https://api.segmentapis.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_daily_per_source_api_calls_usage**](APICallsApi.md#get_daily_per_source_api_calls_usage) | **GET** /usage/api-calls/sources/daily | Get Daily Per Source API Calls Usage
8+
[**get_daily_workspace_api_calls_usage**](APICallsApi.md#get_daily_workspace_api_calls_usage) | **GET** /usage/api-calls/daily | Get Daily Workspace API Calls Usage
9+
10+
11+
12+
## Operation: get_daily_per_source_api_calls_usage
13+
14+
> GetDailyPerSourceAPICallsUsage200Response get_daily_per_source_api_calls_usage(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+
* Bearer Authentication (token):
23+
```python
24+
import time
25+
import os
26+
import segment_public_api
27+
from segment_public_api.models.get_daily_per_source_api_calls_usage200_response import GetDailyPerSourceAPICallsUsage200Response
28+
from segment_public_api.models.pagination_input import PaginationInput
29+
from segment_public_api.rest import ApiException
30+
from pprint import pprint
31+
32+
33+
34+
# Configure Bearer authorization: token
35+
configuration = segment_public_api.Configuration(
36+
access_token = os.environ["BEARER_TOKEN"]
37+
)
38+
39+
# Enter a context with an instance of the API client
40+
with segment_public_api.ApiClient(configuration) as api_client:
41+
# Create an instance of the API class
42+
api_instance = segment_public_api.APICallsApi(api_client)
43+
period = '2021-02-01' # str | The start of the usage month in the ISO-8601 format. This parameter exists in v1.
44+
pagination = segment_public_api.PaginationInput(count=10) # PaginationInput | Pagination input for per Source API calls counts. This parameter exists in v1.
45+
46+
try:
47+
# Get Daily Per Source API Calls Usage
48+
api_response = api_instance.get_daily_per_source_api_calls_usage(period, pagination)
49+
print("The response of APICallsApi->get_daily_per_source_api_calls_usage:\n")
50+
pprint(api_response)
51+
except Exception as e:
52+
print("Exception when calling APICallsApi->get_daily_per_source_api_calls_usage: %s\n" % e)
53+
```
54+
55+
56+
57+
### Parameters
58+
59+
Name | Type | Description | Notes
60+
------------- | ------------- | ------------- | -------------
61+
**period** | **str**| 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+
### HTTP response details
78+
| Status code | Description | Response headers |
79+
|-------------|-------------|------------------|
80+
**200** | OK | - |
81+
**404** | Resource not found | - |
82+
**422** | Validation failure | - |
83+
**429** | Too many requests | - |
84+
85+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
86+
87+
88+
## Operation: get_daily_workspace_api_calls_usage
89+
90+
> GetDailyWorkspaceAPICallsUsage200Response get_daily_workspace_api_calls_usage(period, pagination)
91+
92+
Get Daily Workspace API Calls Usage
93+
94+
Provides daily cumulative API call counts for a usage period.
95+
96+
### Example
97+
98+
* Bearer Authentication (token):
99+
```python
100+
import time
101+
import os
102+
import segment_public_api
103+
from segment_public_api.models.get_daily_workspace_api_calls_usage200_response import GetDailyWorkspaceAPICallsUsage200Response
104+
from segment_public_api.models.pagination_input import PaginationInput
105+
from segment_public_api.rest import ApiException
106+
from pprint import pprint
107+
108+
109+
110+
# Configure Bearer authorization: token
111+
configuration = segment_public_api.Configuration(
112+
access_token = os.environ["BEARER_TOKEN"]
113+
)
114+
115+
# Enter a context with an instance of the API client
116+
with segment_public_api.ApiClient(configuration) as api_client:
117+
# Create an instance of the API class
118+
api_instance = segment_public_api.APICallsApi(api_client)
119+
period = '2021-02-01' # str | The start of the usage month in the ISO-8601 format. This parameter exists in v1.
120+
pagination = segment_public_api.PaginationInput(count=10) # PaginationInput | Pagination input for Workspace API call counts. This parameter exists in v1.
121+
122+
try:
123+
# Get Daily Workspace API Calls Usage
124+
api_response = api_instance.get_daily_workspace_api_calls_usage(period, pagination)
125+
print("The response of APICallsApi->get_daily_workspace_api_calls_usage:\n")
126+
pprint(api_response)
127+
except Exception as e:
128+
print("Exception when calling APICallsApi->get_daily_workspace_api_calls_usage: %s\n" % e)
129+
```
130+
131+
132+
133+
### Parameters
134+
135+
Name | Type | Description | Notes
136+
------------- | ------------- | ------------- | -------------
137+
**period** | **str**| The start of the usage month in the ISO-8601 format. This parameter exists in v1. |
138+
**pagination** | [**PaginationInput**](.md)| Pagination input for Workspace API call counts. This parameter exists in v1. |
139+
140+
### Return type
141+
142+
[**GetDailyWorkspaceAPICallsUsage200Response**](GetDailyWorkspaceAPICallsUsage200Response.md)
143+
144+
### Authorization
145+
146+
[token](../README.md#token)
147+
148+
### HTTP request headers
149+
150+
- **Content-Type**: Not defined
151+
- **Accept**: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
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+
161+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
162+

0 commit comments

Comments
 (0)