Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6aff635

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@b5385c69.
1 parent4bea291 commit6aff635

File tree

692 files changed

+1102
-696
lines changed

Some content is hidden

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

692 files changed

+1102
-696
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: 61.1.4
15-
- Package version: 61.1.4
14+
- API version: 61.2.0
15+
- Package version: 61.2.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/ActivationsApi.md‎

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Method | HTTP request | Description
99
[**get_activation_from_audience**](ActivationsApi.md#get_activation_from_audience) |**GET** /spaces/{spaceId}/audiences/{audienceId}/activations/{id} | Get Activation from Audience
1010
[**list_activations_from_audience**](ActivationsApi.md#list_activations_from_audience) |**GET** /spaces/{spaceId}/audiences/{audienceId}/activations | List Activations from Audience
1111
[**list_destinations_from_audience**](ActivationsApi.md#list_destinations_from_audience) |**GET** /spaces/{spaceId}/audiences/{audienceId}/destination-connections | List Destinations from Audience
12+
[**list_supported_destinations_from_audience**](ActivationsApi.md#list_supported_destinations_from_audience) |**GET** /spaces/{spaceId}/audienceType/{audienceType}/supported-destinations | List Supported Destinations from Audience
1213
[**remove_activation_from_audience**](ActivationsApi.md#remove_activation_from_audience) |**DELETE** /spaces/{spaceId}/audiences/{audienceId}/activations/{id} | Remove Activation from Audience
1314
[**update_activation_for_audience**](ActivationsApi.md#update_activation_for_audience) |**PATCH** /spaces/{spaceId}/audiences/{audienceId}/activations/{id} | Update Activation for Audience
1415

@@ -405,6 +406,85 @@ Name | Type | Description | Notes
405406
[[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)
406407

407408

409+
##Operation: list_supported_destinations_from_audience
410+
411+
>ListSupportedDestinationsFromAudience200Response list_supported_destinations_from_audience(space_id, audience_type, slug=slug, action_id=action_id)
412+
413+
List Supported Destinations from Audience
414+
415+
Lists all Supported Destinations for this audience type that can be activated. • This endpoint is in**Alpha** testing. Please submit any feedback by sending an email tofriends@segment.com. • 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. • When called, this endpoint may generate the`Supported Destinations Listed For Audience` event in the[audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 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.
416+
417+
###Example
418+
419+
* Bearer Authentication (token):
420+
```python
421+
import time
422+
import os
423+
import segment_public_api
424+
from segment_public_api.models.list_supported_destinations_from_audience200_responseimport ListSupportedDestinationsFromAudience200Response
425+
from segment_public_api.restimport ApiException
426+
from pprintimport pprint
427+
428+
429+
430+
# Configure Bearer authorization: token
431+
configuration= segment_public_api.Configuration(
432+
access_token= os.environ["BEARER_TOKEN"]
433+
)
434+
435+
# Enter a context with an instance of the API client
436+
with segment_public_api.ApiClient(configuration)as api_client:
437+
# Create an instance of the API class
438+
api_instance= segment_public_api.ActivationsApi(api_client)
439+
space_id='spa_9aQ1Lj62S4bomZKLF4DPqW'# str |
440+
audience_type='USERS'# str |
441+
slug='slug_example'# str | Optional destination slug to filter results. This parameter exists in alpha. (optional)
442+
action_id='action_id_example'# str | Optional destination action id to filter results. This parameter exists in alpha. (optional)
443+
444+
try:
445+
# List Supported Destinations from Audience
446+
api_response= api_instance.list_supported_destinations_from_audience(space_id, audience_type,slug=slug,action_id=action_id)
447+
print("The response of ActivationsApi->list_supported_destinations_from_audience:\n")
448+
pprint(api_response)
449+
exceptExceptionas e:
450+
print("Exception when calling ActivationsApi->list_supported_destinations_from_audience:%s\n"% e)
451+
```
452+
453+
454+
455+
###Parameters
456+
457+
Name | Type | Description | Notes
458+
------------- | ------------- | ------------- | -------------
459+
**space_id** |**str**| |
460+
**audience_type** |**str**| |
461+
**slug** |**str**| Optional destination slug to filter results. This parameter exists in alpha. |[optional]
462+
**action_id** |**str**| Optional destination action id to filter results. This parameter exists in alpha. |[optional]
463+
464+
###Return type
465+
466+
[**ListSupportedDestinationsFromAudience200Response**](ListSupportedDestinationsFromAudience200Response.md)
467+
468+
###Authorization
469+
470+
[token](../README.md#token)
471+
472+
###HTTP request headers
473+
474+
-**Content-Type**: Not defined
475+
-**Accept**: application/vnd.segment.v1alpha+json, application/json
476+
477+
###HTTP response details
478+
| Status code| Description| Response headers|
479+
|-------------|-------------|------------------|
480+
**200** | OK | - |
481+
**404** | Resource not found | - |
482+
**422** | Validation failure | - |
483+
**429** | Too many requests | - |
484+
485+
[[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)
486+
487+
408488
##Operation: remove_activation_from_audience
409489

410490
>RemoveActivationFromAudience200Response remove_activation_from_audience(space_id, audience_id, id)

‎segment_public_api/__init__.py‎

Lines changed: 4 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: 61.1.4
10+
The version of the OpenAPI document: 61.2.0
1111
Contact: friends@segment.com
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
1414
Do not edit the class manually.
1515
"""# noqa: E501
1616

1717

18-
__version__="61.1.4"
18+
__version__="61.2.0"
1919

2020
# import apis into sdk package
2121
fromsegment_public_api.api.api_calls_apiimportAPICallsApi
@@ -481,6 +481,8 @@
481481
fromsegment_public_api.models.list_spaces_alpha_outputimportListSpacesAlphaOutput
482482
fromsegment_public_api.models.list_subscriptions_from_destination200_responseimportListSubscriptionsFromDestination200Response
483483
fromsegment_public_api.models.list_subscriptions_from_destination_alpha_outputimportListSubscriptionsFromDestinationAlphaOutput
484+
fromsegment_public_api.models.list_supported_destinations_from_audience200_responseimportListSupportedDestinationsFromAudience200Response
485+
fromsegment_public_api.models.list_supported_destinations_from_audience_alpha_outputimportListSupportedDestinationsFromAudienceAlphaOutput
484486
fromsegment_public_api.models.list_suppressions200_responseimportListSuppressions200Response
485487
fromsegment_public_api.models.list_suppressions_v1_outputimportListSuppressionsV1Output
486488
fromsegment_public_api.models.list_syncs_from_warehouse200_responseimportListSyncsFromWarehouse200Response

‎segment_public_api/api/activations_api.py‎

Lines changed: 170 additions & 2 deletions
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: 61.1.4
8+
The version of the OpenAPI document: 61.2.0
99
Contact: friends@segment.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -20,7 +20,7 @@
2020
frompydanticimportvalidate_arguments,ValidationError
2121

2222
fromtyping_extensionsimportAnnotated
23-
frompydanticimportField,constr
23+
frompydanticimportField,StrictStr,constr
2424

2525
fromtypingimportOptional
2626

@@ -31,6 +31,7 @@
3131
fromsegment_public_api.models.get_activation_from_audience200_responseimportGetActivationFromAudience200Response
3232
fromsegment_public_api.models.list_activations_from_audience200_responseimportListActivationsFromAudience200Response
3333
fromsegment_public_api.models.list_destinations_from_audience200_responseimportListDestinationsFromAudience200Response
34+
fromsegment_public_api.models.list_supported_destinations_from_audience200_responseimportListSupportedDestinationsFromAudience200Response
3435
fromsegment_public_api.models.pagination_inputimportPaginationInput
3536
fromsegment_public_api.models.remove_activation_from_audience200_responseimportRemoveActivationFromAudience200Response
3637
fromsegment_public_api.models.update_activation_for_audience200_responseimportUpdateActivationForAudience200Response
@@ -873,6 +874,173 @@ def list_destinations_from_audience_with_http_info(self, space_id : constr(stric
873874
collection_formats=_collection_formats,
874875
_request_auth=_params.get('_request_auth'))
875876

877+
@validate_arguments
878+
deflist_supported_destinations_from_audience(self,space_id :constr(strict=True),audience_type :constr(strict=True),slug :Annotated[Optional[StrictStr],Field(description="Optional destination slug to filter results. This parameter exists in alpha.")]=None,action_id :Annotated[Optional[StrictStr],Field(description="Optional destination action id to filter results. This parameter exists in alpha.")]=None,**kwargs)->ListSupportedDestinationsFromAudience200Response:# noqa: E501
879+
"""List Supported Destinations from Audience # noqa: E501
880+
881+
Lists all Supported Destinations for this audience type that can be activated. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • 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. • When called, this endpoint may generate the `Supported Destinations Listed For Audience` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 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
882+
This method makes a synchronous HTTP request by default. To make an
883+
asynchronous HTTP request, please pass async_req=True
884+
885+
>>> thread = api.list_supported_destinations_from_audience(space_id, audience_type, slug, action_id, async_req=True)
886+
>>> result = thread.get()
887+
888+
:param space_id: (required)
889+
:type space_id: str
890+
:param audience_type: (required)
891+
:type audience_type: str
892+
:param slug: Optional destination slug to filter results. This parameter exists in alpha.
893+
:type slug: str
894+
:param action_id: Optional destination action id to filter results. This parameter exists in alpha.
895+
:type action_id: str
896+
:param async_req: Whether to execute the request asynchronously.
897+
:type async_req: bool, optional
898+
:param _request_timeout: timeout setting for this request.
899+
If one number provided, it will be total request
900+
timeout. It can also be a pair (tuple) of
901+
(connection, read) timeouts.
902+
:return: Returns the result object.
903+
If the method is called asynchronously,
904+
returns the request thread.
905+
:rtype: ListSupportedDestinationsFromAudience200Response
906+
"""
907+
kwargs['_return_http_data_only']=True
908+
if'_preload_content'inkwargs:
909+
message="Error! Please call the list_supported_destinations_from_audience_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"# noqa: E501
910+
raiseValueError(message)
911+
returnself.list_supported_destinations_from_audience_with_http_info(space_id,audience_type,slug,action_id,**kwargs)# noqa: E501
912+
913+
@validate_arguments
914+
deflist_supported_destinations_from_audience_with_http_info(self,space_id :constr(strict=True),audience_type :constr(strict=True),slug :Annotated[Optional[StrictStr],Field(description="Optional destination slug to filter results. This parameter exists in alpha.")]=None,action_id :Annotated[Optional[StrictStr],Field(description="Optional destination action id to filter results. This parameter exists in alpha.")]=None,**kwargs)->ApiResponse:# noqa: E501
915+
"""List Supported Destinations from Audience # noqa: E501
916+
917+
Lists all Supported Destinations for this audience type that can be activated. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • 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. • When called, this endpoint may generate the `Supported Destinations Listed For Audience` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 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
918+
This method makes a synchronous HTTP request by default. To make an
919+
asynchronous HTTP request, please pass async_req=True
920+
921+
>>> thread = api.list_supported_destinations_from_audience_with_http_info(space_id, audience_type, slug, action_id, async_req=True)
922+
>>> result = thread.get()
923+
924+
:param space_id: (required)
925+
:type space_id: str
926+
:param audience_type: (required)
927+
:type audience_type: str
928+
:param slug: Optional destination slug to filter results. This parameter exists in alpha.
929+
:type slug: str
930+
:param action_id: Optional destination action id to filter results. This parameter exists in alpha.
931+
:type action_id: str
932+
:param async_req: Whether to execute the request asynchronously.
933+
:type async_req: bool, optional
934+
:param _preload_content: if False, the ApiResponse.data will
935+
be set to none and raw_data will store the
936+
HTTP response body without reading/decoding.
937+
Default is True.
938+
:type _preload_content: bool, optional
939+
:param _return_http_data_only: response data instead of ApiResponse
940+
object with status code, headers, etc
941+
:type _return_http_data_only: bool, optional
942+
:param _request_timeout: timeout setting for this request. If one
943+
number provided, it will be total request
944+
timeout. It can also be a pair (tuple) of
945+
(connection, read) timeouts.
946+
:param _request_auth: set to override the auth_settings for an a single
947+
request; this effectively ignores the authentication
948+
in the spec for a single request.
949+
:type _request_auth: dict, optional
950+
:type _content_type: string, optional: force content-type for the request
951+
:return: Returns the result object.
952+
If the method is called asynchronously,
953+
returns the request thread.
954+
:rtype: tuple(ListSupportedDestinationsFromAudience200Response, status_code(int), headers(HTTPHeaderDict))
955+
"""
956+
957+
_params=locals()
958+
959+
_all_params= [
960+
'space_id',
961+
'audience_type',
962+
'slug',
963+
'action_id'
964+
]
965+
_all_params.extend(
966+
[
967+
'async_req',
968+
'_return_http_data_only',
969+
'_preload_content',
970+
'_request_timeout',
971+
'_request_auth',
972+
'_content_type',
973+
'_headers'
974+
]
975+
)
976+
977+
# validate the arguments
978+
for_key,_valin_params['kwargs'].items():
979+
if_keynotin_all_params:
980+
raiseApiTypeError(
981+
"Got an unexpected keyword argument '%s'"
982+
" to method list_supported_destinations_from_audience"%_key
983+
)
984+
_params[_key]=_val
985+
del_params['kwargs']
986+
987+
_collection_formats= {}
988+
989+
# process the path parameters
990+
_path_params= {}
991+
if_params['space_id']:
992+
_path_params['spaceId']=_params['space_id']
993+
994+
if_params['audience_type']:
995+
_path_params['audienceType']=_params['audience_type']
996+
997+
998+
# process the query parameters
999+
_query_params= []
1000+
if_params.get('slug')isnotNone:# noqa: E501
1001+
_query_params.append(('slug',_params['slug']))
1002+
1003+
if_params.get('action_id')isnotNone:# noqa: E501
1004+
_query_params.append(('actionId',_params['action_id']))
1005+
1006+
# process the header parameters
1007+
_header_params=dict(_params.get('_headers', {}))
1008+
# process the form parameters
1009+
_form_params= []
1010+
_files= {}
1011+
# process the body parameter
1012+
_body_params=None
1013+
# set the HTTP header `Accept`
1014+
_header_params['Accept']=self.api_client.select_header_accept(
1015+
['application/vnd.segment.v1alpha+json','application/json'])# noqa: E501
1016+
1017+
# authentication setting
1018+
_auth_settings= ['token']# noqa: E501
1019+
1020+
_response_types_map= {
1021+
'200':"ListSupportedDestinationsFromAudience200Response",
1022+
'404':"RequestErrorEnvelope",
1023+
'422':"RequestErrorEnvelope",
1024+
'429':"RequestErrorEnvelope",
1025+
}
1026+
1027+
returnself.api_client.call_api(
1028+
'/spaces/{spaceId}/audienceType/{audienceType}/supported-destinations','GET',
1029+
_path_params,
1030+
_query_params,
1031+
_header_params,
1032+
body=_body_params,
1033+
post_params=_form_params,
1034+
files=_files,
1035+
response_types_map=_response_types_map,
1036+
auth_settings=_auth_settings,
1037+
async_req=_params.get('async_req'),
1038+
_return_http_data_only=_params.get('_return_http_data_only'),# noqa: E501
1039+
_preload_content=_params.get('_preload_content',True),
1040+
_request_timeout=_params.get('_request_timeout'),
1041+
collection_formats=_collection_formats,
1042+
_request_auth=_params.get('_request_auth'))
1043+
8761044
@validate_arguments
8771045
defremove_activation_from_audience(self,space_id :constr(strict=True),audience_id :constr(strict=True),id :constr(strict=True),**kwargs)->RemoveActivationFromAudience200Response:# noqa: E501
8781046
"""Remove Activation from Audience # noqa: E501

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp