Skip to content

Commit 8c617d7

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

File tree

620 files changed

+1205
-619
lines changed

Some content is hidden

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

620 files changed

+1205
-619
lines changed

README.md

Lines changed: 2 additions & 2 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: 58.4.0
15-
- Package version: 58.4.0
14+
- API version: 58.5.0
15+
- Package version: 58.5.0
1616
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1717

1818
For more information, please visit [https://docs.segmentapis.com](https://docs.segmentapis.com)

docs/CustomerInsightsApi.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# segment_public_api.CustomerInsightsApi
2+
3+
All URIs are relative to *https://api.segmentapis.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**create_download**](CustomerInsightsApi.md#create_download) | **POST** /customer-insights/download | Create Download
8+
9+
10+
11+
## Operation: create_download
12+
13+
> CreateDownload200Response create_download(create_download_alpha_input)
14+
15+
Create Download
16+
17+
Create Customer Insights Presigned URLs The rate limit for this endpoint is 1 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.
18+
19+
### Example
20+
21+
* Bearer Authentication (token):
22+
```python
23+
import time
24+
import os
25+
import segment_public_api
26+
from segment_public_api.models.create_download200_response import CreateDownload200Response
27+
from segment_public_api.models.create_download_alpha_input import CreateDownloadAlphaInput
28+
from segment_public_api.rest import ApiException
29+
from pprint import pprint
30+
31+
32+
33+
# Configure Bearer authorization: token
34+
configuration = segment_public_api.Configuration(
35+
access_token = os.environ["BEARER_TOKEN"]
36+
)
37+
38+
# Enter a context with an instance of the API client
39+
with segment_public_api.ApiClient(configuration) as api_client:
40+
# Create an instance of the API class
41+
api_instance = segment_public_api.CustomerInsightsApi(api_client)
42+
create_download_alpha_input = {"collectionId":"2wmpXTGB69A8BwGJ4hD5XvQ03aD","workspaceId":"9y433Y71snvrWKfchyBbu9","startTime":"2006-01-02T15:04:05.000Z"} # CreateDownloadAlphaInput |
43+
44+
try:
45+
# Create Download
46+
api_response = api_instance.create_download(create_download_alpha_input)
47+
print("The response of CustomerInsightsApi->create_download:\n")
48+
pprint(api_response)
49+
except Exception as e:
50+
print("Exception when calling CustomerInsightsApi->create_download: %s\n" % e)
51+
```
52+
53+
54+
55+
### Parameters
56+
57+
Name | Type | Description | Notes
58+
------------- | ------------- | ------------- | -------------
59+
**create_download_alpha_input** | [**CreateDownloadAlphaInput**](CreateDownloadAlphaInput.md)| |
60+
61+
### Return type
62+
63+
[**CreateDownload200Response**](CreateDownload200Response.md)
64+
65+
### Authorization
66+
67+
[token](../README.md#token)
68+
69+
### HTTP request headers
70+
71+
- **Content-Type**: application/vnd.segment.v1alpha+json
72+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
73+
74+
### HTTP response details
75+
| Status code | Description | Response headers |
76+
|-------------|-------------|------------------|
77+
**200** | OK | - |
78+
**404** | Resource not found | - |
79+
**422** | Validation failure | - |
80+
**429** | Too many requests | - |
81+
82+
[[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)
83+

segment_public_api/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
88
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
99
10-
The version of the OpenAPI document: 58.4.0
10+
The version of the OpenAPI document: 58.5.0
1111
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
1414
Do not edit the class manually.
1515
""" # noqa: E501
1616

1717

18-
__version__ = "58.4.0"
18+
__version__ = "58.5.0"
1919

2020
# import apis into sdk package
2121
from segment_public_api.api.api_calls_api import APICallsApi
@@ -46,6 +46,7 @@
4646
from segment_public_api.api.transformations_api import TransformationsApi
4747
from segment_public_api.api.warehouses_api import WarehousesApi
4848
from segment_public_api.api.workspaces_api import WorkspacesApi
49+
from segment_public_api.api.customer_insights_api import CustomerInsightsApi
4950
from segment_public_api.api.dbt_api import DbtApi
5051

5152
# import ApiClient
@@ -123,6 +124,9 @@
123124
from segment_public_api.models.create_destination_subscription_alpha_output import CreateDestinationSubscriptionAlphaOutput
124125
from segment_public_api.models.create_destination_v1_input import CreateDestinationV1Input
125126
from segment_public_api.models.create_destination_v1_output import CreateDestinationV1Output
127+
from segment_public_api.models.create_download200_response import CreateDownload200Response
128+
from segment_public_api.models.create_download_alpha_input import CreateDownloadAlphaInput
129+
from segment_public_api.models.create_download_alpha_output import CreateDownloadAlphaOutput
126130
from segment_public_api.models.create_edge_functions200_response import CreateEdgeFunctions200Response
127131
from segment_public_api.models.create_edge_functions_alpha_input import CreateEdgeFunctionsAlphaInput
128132
from segment_public_api.models.create_edge_functions_alpha_output import CreateEdgeFunctionsAlphaOutput
@@ -243,6 +247,7 @@
243247
from segment_public_api.models.destination_v1 import DestinationV1
244248
from segment_public_api.models.disable_edge_functions200_response import DisableEdgeFunctions200Response
245249
from segment_public_api.models.disable_edge_functions_alpha_output import DisableEdgeFunctionsAlphaOutput
250+
from segment_public_api.models.download import Download
246251
from segment_public_api.models.echo200_response import Echo200Response
247252
from segment_public_api.models.echo200_response1 import Echo200Response1
248253
from segment_public_api.models.echo_alpha_output import EchoAlphaOutput

segment_public_api/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
from segment_public_api.api.transformations_api import TransformationsApi
3030
from segment_public_api.api.warehouses_api import WarehousesApi
3131
from segment_public_api.api.workspaces_api import WorkspacesApi
32+
from segment_public_api.api.customer_insights_api import CustomerInsightsApi
3233
from segment_public_api.api.dbt_api import DbtApi
3334

segment_public_api/api/api_calls_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 58.4.0
8+
The version of the OpenAPI document: 58.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/audiences_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 58.4.0
8+
The version of the OpenAPI document: 58.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/audit_trail_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 58.4.0
8+
The version of the OpenAPI document: 58.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/catalog_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 58.4.0
8+
The version of the OpenAPI document: 58.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/computed_traits_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 58.4.0
8+
The version of the OpenAPI document: 58.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# coding: utf-8
2+
3+
"""
4+
Segment Public API
5+
6+
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
7+
8+
The version of the OpenAPI document: 58.5.0
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
16+
import re # noqa: F401
17+
import io
18+
import warnings
19+
20+
from pydantic import validate_arguments, ValidationError
21+
22+
from segment_public_api.models.create_download200_response import CreateDownload200Response
23+
from segment_public_api.models.create_download_alpha_input import CreateDownloadAlphaInput
24+
25+
from segment_public_api.api_client import ApiClient
26+
from segment_public_api.api_response import ApiResponse
27+
from segment_public_api.exceptions import ( # noqa: F401
28+
ApiTypeError,
29+
ApiValueError
30+
)
31+
32+
33+
class CustomerInsightsApi:
34+
"""NOTE: This class is auto generated by OpenAPI Generator
35+
Ref: https://openapi-generator.tech
36+
37+
Do not edit the class manually.
38+
"""
39+
40+
def __init__(self, api_client=None) -> None:
41+
if api_client is None:
42+
api_client = ApiClient.get_default()
43+
self.api_client = api_client
44+
45+
@validate_arguments
46+
def create_download(self, create_download_alpha_input : CreateDownloadAlphaInput, **kwargs) -> CreateDownload200Response: # noqa: E501
47+
"""Create Download # noqa: E501
48+
49+
Create Customer Insights Presigned URLs The rate limit for this endpoint is 1 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. # noqa: E501
50+
This method makes a synchronous HTTP request by default. To make an
51+
asynchronous HTTP request, please pass async_req=True
52+
53+
>>> thread = api.create_download(create_download_alpha_input, async_req=True)
54+
>>> result = thread.get()
55+
56+
:param create_download_alpha_input: (required)
57+
:type create_download_alpha_input: CreateDownloadAlphaInput
58+
:param async_req: Whether to execute the request asynchronously.
59+
:type async_req: bool, optional
60+
:param _request_timeout: timeout setting for this request.
61+
If one number provided, it will be total request
62+
timeout. It can also be a pair (tuple) of
63+
(connection, read) timeouts.
64+
:return: Returns the result object.
65+
If the method is called asynchronously,
66+
returns the request thread.
67+
:rtype: CreateDownload200Response
68+
"""
69+
kwargs['_return_http_data_only'] = True
70+
if '_preload_content' in kwargs:
71+
message = "Error! Please call the create_download_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
72+
raise ValueError(message)
73+
return self.create_download_with_http_info(create_download_alpha_input, **kwargs) # noqa: E501
74+
75+
@validate_arguments
76+
def create_download_with_http_info(self, create_download_alpha_input : CreateDownloadAlphaInput, **kwargs) -> ApiResponse: # noqa: E501
77+
"""Create Download # noqa: E501
78+
79+
Create Customer Insights Presigned URLs The rate limit for this endpoint is 1 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. # noqa: E501
80+
This method makes a synchronous HTTP request by default. To make an
81+
asynchronous HTTP request, please pass async_req=True
82+
83+
>>> thread = api.create_download_with_http_info(create_download_alpha_input, async_req=True)
84+
>>> result = thread.get()
85+
86+
:param create_download_alpha_input: (required)
87+
:type create_download_alpha_input: CreateDownloadAlphaInput
88+
:param async_req: Whether to execute the request asynchronously.
89+
:type async_req: bool, optional
90+
:param _preload_content: if False, the ApiResponse.data will
91+
be set to none and raw_data will store the
92+
HTTP response body without reading/decoding.
93+
Default is True.
94+
:type _preload_content: bool, optional
95+
:param _return_http_data_only: response data instead of ApiResponse
96+
object with status code, headers, etc
97+
:type _return_http_data_only: bool, optional
98+
:param _request_timeout: timeout setting for this request. If one
99+
number provided, it will be total request
100+
timeout. It can also be a pair (tuple) of
101+
(connection, read) timeouts.
102+
:param _request_auth: set to override the auth_settings for an a single
103+
request; this effectively ignores the authentication
104+
in the spec for a single request.
105+
:type _request_auth: dict, optional
106+
:type _content_type: string, optional: force content-type for the request
107+
:return: Returns the result object.
108+
If the method is called asynchronously,
109+
returns the request thread.
110+
:rtype: tuple(CreateDownload200Response, status_code(int), headers(HTTPHeaderDict))
111+
"""
112+
113+
_params = locals()
114+
115+
_all_params = [
116+
'create_download_alpha_input'
117+
]
118+
_all_params.extend(
119+
[
120+
'async_req',
121+
'_return_http_data_only',
122+
'_preload_content',
123+
'_request_timeout',
124+
'_request_auth',
125+
'_content_type',
126+
'_headers'
127+
]
128+
)
129+
130+
# validate the arguments
131+
for _key, _val in _params['kwargs'].items():
132+
if _key not in _all_params:
133+
raise ApiTypeError(
134+
"Got an unexpected keyword argument '%s'"
135+
" to method create_download" % _key
136+
)
137+
_params[_key] = _val
138+
del _params['kwargs']
139+
140+
_collection_formats = {}
141+
142+
# process the path parameters
143+
_path_params = {}
144+
145+
# process the query parameters
146+
_query_params = []
147+
# process the header parameters
148+
_header_params = dict(_params.get('_headers', {}))
149+
# process the form parameters
150+
_form_params = []
151+
_files = {}
152+
# process the body parameter
153+
_body_params = None
154+
if _params['create_download_alpha_input'] is not None:
155+
_body_params = _params['create_download_alpha_input']
156+
157+
# set the HTTP header `Accept`
158+
_header_params['Accept'] = self.api_client.select_header_accept(
159+
['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
160+
161+
# set the HTTP header `Content-Type`
162+
_content_types_list = _params.get('_content_type',
163+
self.api_client.select_header_content_type(
164+
['application/vnd.segment.v1alpha+json']))
165+
if _content_types_list:
166+
_header_params['Content-Type'] = _content_types_list
167+
168+
# authentication setting
169+
_auth_settings = ['token'] # noqa: E501
170+
171+
_response_types_map = {
172+
'200': "CreateDownload200Response",
173+
'404': "RequestErrorEnvelope",
174+
'422': "RequestErrorEnvelope",
175+
'429': "RequestErrorEnvelope",
176+
}
177+
178+
return self.api_client.call_api(
179+
'/customer-insights/download', 'POST',
180+
_path_params,
181+
_query_params,
182+
_header_params,
183+
body=_body_params,
184+
post_params=_form_params,
185+
files=_files,
186+
response_types_map=_response_types_map,
187+
auth_settings=_auth_settings,
188+
async_req=_params.get('async_req'),
189+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
190+
_preload_content=_params.get('_preload_content', True),
191+
_request_timeout=_params.get('_request_timeout'),
192+
collection_formats=_collection_formats,
193+
_request_auth=_params.get('_request_auth'))

0 commit comments

Comments
 (0)