Skip to content

Commit 6a848fa

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 0b39c7f commit 6a848fa

File tree

681 files changed

+1178
-683
lines changed

Some content is hidden

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

681 files changed

+1178
-683
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: 59.3.0
15-
- Package version: 59.3.0
14+
- API version: 59.4.0
15+
- Package version: 59.4.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/AudiencesApi.md

Lines changed: 79 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+
[**add_audience_schedule_to_audience**](AudiencesApi.md#add_audience_schedule_to_audience) | **POST** /spaces/{spaceId}/audiences/{id}/schedules | Add Audience Schedule to Audience
78
[**create_audience**](AudiencesApi.md#create_audience) | **POST** /spaces/{spaceId}/audiences | Create Audience
89
[**create_audience_preview**](AudiencesApi.md#create_audience_preview) | **POST** /spaces/{spaceId}/audiences/previews | Create Audience Preview
910
[**get_audience**](AudiencesApi.md#get_audience) | **GET** /spaces/{spaceId}/audiences/{id} | Get Audience
@@ -17,6 +18,84 @@ Method | HTTP request | Description
1718

1819

1920

21+
## Operation: add_audience_schedule_to_audience
22+
23+
> AddAudienceScheduleToAudience200Response add_audience_schedule_to_audience(space_id, id, add_audience_schedule_to_audience_alpha_input)
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 = 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+
* Bearer Authentication (token):
32+
```python
33+
import time
34+
import os
35+
import segment_public_api
36+
from segment_public_api.models.add_audience_schedule_to_audience200_response import AddAudienceScheduleToAudience200Response
37+
from segment_public_api.models.add_audience_schedule_to_audience_alpha_input import AddAudienceScheduleToAudienceAlphaInput
38+
from segment_public_api.rest import ApiException
39+
from pprint import pprint
40+
41+
42+
43+
# Configure Bearer authorization: token
44+
configuration = segment_public_api.Configuration(
45+
access_token = os.environ["BEARER_TOKEN"]
46+
)
47+
48+
# Enter a context with an instance of the API client
49+
with segment_public_api.ApiClient(configuration) as api_client:
50+
# Create an instance of the API class
51+
api_instance = segment_public_api.AudiencesApi(api_client)
52+
space_id = '9aQ1Lj62S4bomZKLF4DPqW' # str |
53+
id = 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS' # str |
54+
add_audience_schedule_to_audience_alpha_input = {"strategy":"SPECIFIC_DAYS","config":{"days":[1,3,5],"hours":[9,17],"timezone":"America/New_York"}} # AddAudienceScheduleToAudienceAlphaInput |
55+
56+
try:
57+
# Add Audience Schedule to Audience
58+
api_response = api_instance.add_audience_schedule_to_audience(space_id, id, add_audience_schedule_to_audience_alpha_input)
59+
print("The response of AudiencesApi->add_audience_schedule_to_audience:\n")
60+
pprint(api_response)
61+
except Exception as e:
62+
print("Exception when calling AudiencesApi->add_audience_schedule_to_audience: %s\n" % e)
63+
```
64+
65+
66+
67+
### Parameters
68+
69+
Name | Type | Description | Notes
70+
------------- | ------------- | ------------- | -------------
71+
**space_id** | **str**| |
72+
**id** | **str**| |
73+
**add_audience_schedule_to_audience_alpha_input** | [**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+
### HTTP response details
89+
| Status code | Description | Response headers |
90+
|-------------|-------------|------------------|
91+
**200** | OK | - |
92+
**404** | Resource not found | - |
93+
**422** | Validation failure | - |
94+
**429** | Too many requests | - |
95+
96+
[[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)
97+
98+
2099
## Operation: create_audience
21100

22101
> CreateAudience200Response create_audience(space_id, create_audience_beta_input)

segment_public_api/__init__.py

Lines changed: 5 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: 59.3.0
10+
The version of the OpenAPI document: 59.4.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__ = "59.3.0"
18+
__version__ = "59.4.0"
1919

2020
# import apis into sdk package
2121
from segment_public_api.api.api_calls_api import APICallsApi
@@ -68,6 +68,9 @@
6868
from segment_public_api.models.add_activation_to_audience200_response import AddActivationToAudience200Response
6969
from segment_public_api.models.add_activation_to_audience_alpha_input import AddActivationToAudienceAlphaInput
7070
from segment_public_api.models.add_activation_to_audience_alpha_output import AddActivationToAudienceAlphaOutput
71+
from segment_public_api.models.add_audience_schedule_to_audience200_response import AddAudienceScheduleToAudience200Response
72+
from segment_public_api.models.add_audience_schedule_to_audience_alpha_input import AddAudienceScheduleToAudienceAlphaInput
73+
from segment_public_api.models.add_audience_schedule_to_audience_alpha_output import AddAudienceScheduleToAudienceAlphaOutput
7174
from segment_public_api.models.add_connection_from_source_to_warehouse201_response import AddConnectionFromSourceToWarehouse201Response
7275
from segment_public_api.models.add_connection_from_source_to_warehouse_v1_output import AddConnectionFromSourceToWarehouseV1Output
7376
from segment_public_api.models.add_destination_to_audience200_response import AddDestinationToAudience200Response

segment_public_api/api/activations_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: 59.3.0
8+
The version of the OpenAPI document: 59.4.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

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: 59.3.0
8+
The version of the OpenAPI document: 59.4.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/audiences_api.py

Lines changed: 169 additions & 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: 59.3.0
8+
The version of the OpenAPI document: 59.4.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -24,6 +24,8 @@
2424

2525
from typing import Optional
2626

27+
from segment_public_api.models.add_audience_schedule_to_audience200_response import AddAudienceScheduleToAudience200Response
28+
from segment_public_api.models.add_audience_schedule_to_audience_alpha_input import AddAudienceScheduleToAudienceAlphaInput
2729
from segment_public_api.models.create_audience200_response import CreateAudience200Response
2830
from segment_public_api.models.create_audience_beta_input import CreateAudienceBetaInput
2931
from segment_public_api.models.create_audience_preview200_response import CreateAudiencePreview200Response
@@ -62,6 +64,172 @@ def __init__(self, api_client=None) -> None:
6264
api_client = ApiClient.get_default()
6365
self.api_client = api_client
6466

67+
@validate_arguments
68+
def add_audience_schedule_to_audience(self, space_id : constr(strict=True), id : constr(strict=True), add_audience_schedule_to_audience_alpha_input : AddAudienceScheduleToAudienceAlphaInput, **kwargs) -> AddAudienceScheduleToAudience200Response: # noqa: E501
69+
"""Add Audience Schedule to Audience # noqa: E501
70+
71+
The ability to configure the run schedule for an Audience is limited to Linked Audiences (audienceType = 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. # noqa: E501
72+
This method makes a synchronous HTTP request by default. To make an
73+
asynchronous HTTP request, please pass async_req=True
74+
75+
>>> thread = api.add_audience_schedule_to_audience(space_id, id, add_audience_schedule_to_audience_alpha_input, async_req=True)
76+
>>> result = thread.get()
77+
78+
:param space_id: (required)
79+
:type space_id: str
80+
:param id: (required)
81+
:type id: str
82+
:param add_audience_schedule_to_audience_alpha_input: (required)
83+
:type add_audience_schedule_to_audience_alpha_input: AddAudienceScheduleToAudienceAlphaInput
84+
:param async_req: Whether to execute the request asynchronously.
85+
:type async_req: bool, optional
86+
:param _request_timeout: timeout setting for this request.
87+
If one number provided, it will be total request
88+
timeout. It can also be a pair (tuple) of
89+
(connection, read) timeouts.
90+
:return: Returns the result object.
91+
If the method is called asynchronously,
92+
returns the request thread.
93+
:rtype: AddAudienceScheduleToAudience200Response
94+
"""
95+
kwargs['_return_http_data_only'] = True
96+
if '_preload_content' in kwargs:
97+
message = "Error! Please call the add_audience_schedule_to_audience_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
98+
raise ValueError(message)
99+
return self.add_audience_schedule_to_audience_with_http_info(space_id, id, add_audience_schedule_to_audience_alpha_input, **kwargs) # noqa: E501
100+
101+
@validate_arguments
102+
def add_audience_schedule_to_audience_with_http_info(self, space_id : constr(strict=True), id : constr(strict=True), add_audience_schedule_to_audience_alpha_input : AddAudienceScheduleToAudienceAlphaInput, **kwargs) -> ApiResponse: # noqa: E501
103+
"""Add Audience Schedule to Audience # noqa: E501
104+
105+
The ability to configure the run schedule for an Audience is limited to Linked Audiences (audienceType = 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. # noqa: E501
106+
This method makes a synchronous HTTP request by default. To make an
107+
asynchronous HTTP request, please pass async_req=True
108+
109+
>>> thread = api.add_audience_schedule_to_audience_with_http_info(space_id, id, add_audience_schedule_to_audience_alpha_input, async_req=True)
110+
>>> result = thread.get()
111+
112+
:param space_id: (required)
113+
:type space_id: str
114+
:param id: (required)
115+
:type id: str
116+
:param add_audience_schedule_to_audience_alpha_input: (required)
117+
:type add_audience_schedule_to_audience_alpha_input: AddAudienceScheduleToAudienceAlphaInput
118+
:param async_req: Whether to execute the request asynchronously.
119+
:type async_req: bool, optional
120+
:param _preload_content: if False, the ApiResponse.data will
121+
be set to none and raw_data will store the
122+
HTTP response body without reading/decoding.
123+
Default is True.
124+
:type _preload_content: bool, optional
125+
:param _return_http_data_only: response data instead of ApiResponse
126+
object with status code, headers, etc
127+
:type _return_http_data_only: bool, optional
128+
:param _request_timeout: timeout setting for this request. If one
129+
number provided, it will be total request
130+
timeout. It can also be a pair (tuple) of
131+
(connection, read) timeouts.
132+
:param _request_auth: set to override the auth_settings for an a single
133+
request; this effectively ignores the authentication
134+
in the spec for a single request.
135+
:type _request_auth: dict, optional
136+
:type _content_type: string, optional: force content-type for the request
137+
:return: Returns the result object.
138+
If the method is called asynchronously,
139+
returns the request thread.
140+
:rtype: tuple(AddAudienceScheduleToAudience200Response, status_code(int), headers(HTTPHeaderDict))
141+
"""
142+
143+
_params = locals()
144+
145+
_all_params = [
146+
'space_id',
147+
'id',
148+
'add_audience_schedule_to_audience_alpha_input'
149+
]
150+
_all_params.extend(
151+
[
152+
'async_req',
153+
'_return_http_data_only',
154+
'_preload_content',
155+
'_request_timeout',
156+
'_request_auth',
157+
'_content_type',
158+
'_headers'
159+
]
160+
)
161+
162+
# validate the arguments
163+
for _key, _val in _params['kwargs'].items():
164+
if _key not in _all_params:
165+
raise ApiTypeError(
166+
"Got an unexpected keyword argument '%s'"
167+
" to method add_audience_schedule_to_audience" % _key
168+
)
169+
_params[_key] = _val
170+
del _params['kwargs']
171+
172+
_collection_formats = {}
173+
174+
# process the path parameters
175+
_path_params = {}
176+
if _params['space_id']:
177+
_path_params['spaceId'] = _params['space_id']
178+
179+
if _params['id']:
180+
_path_params['id'] = _params['id']
181+
182+
183+
# process the query parameters
184+
_query_params = []
185+
# process the header parameters
186+
_header_params = dict(_params.get('_headers', {}))
187+
# process the form parameters
188+
_form_params = []
189+
_files = {}
190+
# process the body parameter
191+
_body_params = None
192+
if _params['add_audience_schedule_to_audience_alpha_input'] is not None:
193+
_body_params = _params['add_audience_schedule_to_audience_alpha_input']
194+
195+
# set the HTTP header `Accept`
196+
_header_params['Accept'] = self.api_client.select_header_accept(
197+
['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
198+
199+
# set the HTTP header `Content-Type`
200+
_content_types_list = _params.get('_content_type',
201+
self.api_client.select_header_content_type(
202+
['application/vnd.segment.v1alpha+json']))
203+
if _content_types_list:
204+
_header_params['Content-Type'] = _content_types_list
205+
206+
# authentication setting
207+
_auth_settings = ['token'] # noqa: E501
208+
209+
_response_types_map = {
210+
'200': "AddAudienceScheduleToAudience200Response",
211+
'404': "RequestErrorEnvelope",
212+
'422': "RequestErrorEnvelope",
213+
'429': "RequestErrorEnvelope",
214+
}
215+
216+
return self.api_client.call_api(
217+
'/spaces/{spaceId}/audiences/{id}/schedules', 'POST',
218+
_path_params,
219+
_query_params,
220+
_header_params,
221+
body=_body_params,
222+
post_params=_form_params,
223+
files=_files,
224+
response_types_map=_response_types_map,
225+
auth_settings=_auth_settings,
226+
async_req=_params.get('async_req'),
227+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
228+
_preload_content=_params.get('_preload_content', True),
229+
_request_timeout=_params.get('_request_timeout'),
230+
collection_formats=_collection_formats,
231+
_request_auth=_params.get('_request_auth'))
232+
65233
@validate_arguments
66234
def create_audience(self, space_id : constr(strict=True), create_audience_beta_input : CreateAudienceBetaInput, **kwargs) -> CreateAudience200Response: # noqa: E501
67235
"""Create Audience # noqa: E501

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: 59.3.0
8+
The version of the OpenAPI document: 59.4.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: 59.3.0
8+
The version of the OpenAPI document: 59.4.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

0 commit comments

Comments
 (0)