|
5 | 5 |
|
6 | 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 | 7 |
|
8 |
| - The version of the OpenAPI document: 60.0.0 |
| 8 | + The version of the OpenAPI document: 60.1.0 |
9 | 9 |
|
10 | 10 | Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11 | 11 |
|
|
42 | 42 | from segment_public_api.models.list_audiences_pagination_input import ListAudiencesPaginationInput
|
43 | 43 | from segment_public_api.models.pagination_input import PaginationInput
|
44 | 44 | from segment_public_api.models.remove_audience_from_space200_response import RemoveAudienceFromSpace200Response
|
| 45 | +from segment_public_api.models.remove_audience_schedule_from_audience200_response import RemoveAudienceScheduleFromAudience200Response |
45 | 46 | from segment_public_api.models.update_audience_for_space200_response import UpdateAudienceForSpace200Response
|
46 | 47 | from segment_public_api.models.update_audience_for_space_beta_input import UpdateAudienceForSpaceBetaInput
|
47 | 48 | from segment_public_api.models.update_audience_schedule_for_audience200_response import UpdateAudienceScheduleForAudience200Response
|
@@ -1813,6 +1814,165 @@ def remove_audience_from_space_with_http_info(self, space_id : constr(strict=Tru
|
1813 | 1814 | collection_formats=_collection_formats,
|
1814 | 1815 | _request_auth=_params.get('_request_auth'))
|
1815 | 1816 |
|
| 1817 | + @validate_arguments |
| 1818 | + def remove_audience_schedule_from_audience(self, space_id : constr(strict=True), id : constr(strict=True), schedule_id : constr(strict=True), **kwargs) -> RemoveAudienceScheduleFromAudience200Response: # noqa: E501 |
| 1819 | + """Remove Audience Schedule from Audience # noqa: E501 |
| 1820 | +
|
| 1821 | + Deletes an audience schedule for a Linked Audience (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 |
| 1822 | + This method makes a synchronous HTTP request by default. To make an |
| 1823 | + asynchronous HTTP request, please pass async_req=True |
| 1824 | +
|
| 1825 | + >>> thread = api.remove_audience_schedule_from_audience(space_id, id, schedule_id, async_req=True) |
| 1826 | + >>> result = thread.get() |
| 1827 | +
|
| 1828 | + :param space_id: (required) |
| 1829 | + :type space_id: str |
| 1830 | + :param id: (required) |
| 1831 | + :type id: str |
| 1832 | + :param schedule_id: (required) |
| 1833 | + :type schedule_id: str |
| 1834 | + :param async_req: Whether to execute the request asynchronously. |
| 1835 | + :type async_req: bool, optional |
| 1836 | + :param _request_timeout: timeout setting for this request. |
| 1837 | + If one number provided, it will be total request |
| 1838 | + timeout. It can also be a pair (tuple) of |
| 1839 | + (connection, read) timeouts. |
| 1840 | + :return: Returns the result object. |
| 1841 | + If the method is called asynchronously, |
| 1842 | + returns the request thread. |
| 1843 | + :rtype: RemoveAudienceScheduleFromAudience200Response |
| 1844 | + """ |
| 1845 | + kwargs['_return_http_data_only'] = True |
| 1846 | + if '_preload_content' in kwargs: |
| 1847 | + message = "Error! Please call the remove_audience_schedule_from_audience_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 |
| 1848 | + raise ValueError(message) |
| 1849 | + return self.remove_audience_schedule_from_audience_with_http_info(space_id, id, schedule_id, **kwargs) # noqa: E501 |
| 1850 | + |
| 1851 | + @validate_arguments |
| 1852 | + def remove_audience_schedule_from_audience_with_http_info(self, space_id : constr(strict=True), id : constr(strict=True), schedule_id : constr(strict=True), **kwargs) -> ApiResponse: # noqa: E501 |
| 1853 | + """Remove Audience Schedule from Audience # noqa: E501 |
| 1854 | +
|
| 1855 | + Deletes an audience schedule for a Linked Audience (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 |
| 1856 | + This method makes a synchronous HTTP request by default. To make an |
| 1857 | + asynchronous HTTP request, please pass async_req=True |
| 1858 | +
|
| 1859 | + >>> thread = api.remove_audience_schedule_from_audience_with_http_info(space_id, id, schedule_id, async_req=True) |
| 1860 | + >>> result = thread.get() |
| 1861 | +
|
| 1862 | + :param space_id: (required) |
| 1863 | + :type space_id: str |
| 1864 | + :param id: (required) |
| 1865 | + :type id: str |
| 1866 | + :param schedule_id: (required) |
| 1867 | + :type schedule_id: str |
| 1868 | + :param async_req: Whether to execute the request asynchronously. |
| 1869 | + :type async_req: bool, optional |
| 1870 | + :param _preload_content: if False, the ApiResponse.data will |
| 1871 | + be set to none and raw_data will store the |
| 1872 | + HTTP response body without reading/decoding. |
| 1873 | + Default is True. |
| 1874 | + :type _preload_content: bool, optional |
| 1875 | + :param _return_http_data_only: response data instead of ApiResponse |
| 1876 | + object with status code, headers, etc |
| 1877 | + :type _return_http_data_only: bool, optional |
| 1878 | + :param _request_timeout: timeout setting for this request. If one |
| 1879 | + number provided, it will be total request |
| 1880 | + timeout. It can also be a pair (tuple) of |
| 1881 | + (connection, read) timeouts. |
| 1882 | + :param _request_auth: set to override the auth_settings for an a single |
| 1883 | + request; this effectively ignores the authentication |
| 1884 | + in the spec for a single request. |
| 1885 | + :type _request_auth: dict, optional |
| 1886 | + :type _content_type: string, optional: force content-type for the request |
| 1887 | + :return: Returns the result object. |
| 1888 | + If the method is called asynchronously, |
| 1889 | + returns the request thread. |
| 1890 | + :rtype: tuple(RemoveAudienceScheduleFromAudience200Response, status_code(int), headers(HTTPHeaderDict)) |
| 1891 | + """ |
| 1892 | + |
| 1893 | + _params = locals() |
| 1894 | + |
| 1895 | + _all_params = [ |
| 1896 | + 'space_id', |
| 1897 | + 'id', |
| 1898 | + 'schedule_id' |
| 1899 | + ] |
| 1900 | + _all_params.extend( |
| 1901 | + [ |
| 1902 | + 'async_req', |
| 1903 | + '_return_http_data_only', |
| 1904 | + '_preload_content', |
| 1905 | + '_request_timeout', |
| 1906 | + '_request_auth', |
| 1907 | + '_content_type', |
| 1908 | + '_headers' |
| 1909 | + ] |
| 1910 | + ) |
| 1911 | + |
| 1912 | + # validate the arguments |
| 1913 | + for _key, _val in _params['kwargs'].items(): |
| 1914 | + if _key not in _all_params: |
| 1915 | + raise ApiTypeError( |
| 1916 | + "Got an unexpected keyword argument '%s'" |
| 1917 | + " to method remove_audience_schedule_from_audience" % _key |
| 1918 | + ) |
| 1919 | + _params[_key] = _val |
| 1920 | + del _params['kwargs'] |
| 1921 | + |
| 1922 | + _collection_formats = {} |
| 1923 | + |
| 1924 | + # process the path parameters |
| 1925 | + _path_params = {} |
| 1926 | + if _params['space_id']: |
| 1927 | + _path_params['spaceId'] = _params['space_id'] |
| 1928 | + |
| 1929 | + if _params['id']: |
| 1930 | + _path_params['id'] = _params['id'] |
| 1931 | + |
| 1932 | + if _params['schedule_id']: |
| 1933 | + _path_params['scheduleId'] = _params['schedule_id'] |
| 1934 | + |
| 1935 | + |
| 1936 | + # process the query parameters |
| 1937 | + _query_params = [] |
| 1938 | + # process the header parameters |
| 1939 | + _header_params = dict(_params.get('_headers', {})) |
| 1940 | + # process the form parameters |
| 1941 | + _form_params = [] |
| 1942 | + _files = {} |
| 1943 | + # process the body parameter |
| 1944 | + _body_params = None |
| 1945 | + # set the HTTP header `Accept` |
| 1946 | + _header_params['Accept'] = self.api_client.select_header_accept( |
| 1947 | + ['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501 |
| 1948 | + |
| 1949 | + # authentication setting |
| 1950 | + _auth_settings = ['token'] # noqa: E501 |
| 1951 | + |
| 1952 | + _response_types_map = { |
| 1953 | + '200': "RemoveAudienceScheduleFromAudience200Response", |
| 1954 | + '404': "RequestErrorEnvelope", |
| 1955 | + '422': "RequestErrorEnvelope", |
| 1956 | + '429': "RequestErrorEnvelope", |
| 1957 | + } |
| 1958 | + |
| 1959 | + return self.api_client.call_api( |
| 1960 | + '/spaces/{spaceId}/audiences/{id}/schedules/{scheduleId}', 'DELETE', |
| 1961 | + _path_params, |
| 1962 | + _query_params, |
| 1963 | + _header_params, |
| 1964 | + body=_body_params, |
| 1965 | + post_params=_form_params, |
| 1966 | + files=_files, |
| 1967 | + response_types_map=_response_types_map, |
| 1968 | + auth_settings=_auth_settings, |
| 1969 | + async_req=_params.get('async_req'), |
| 1970 | + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 |
| 1971 | + _preload_content=_params.get('_preload_content', True), |
| 1972 | + _request_timeout=_params.get('_request_timeout'), |
| 1973 | + collection_formats=_collection_formats, |
| 1974 | + _request_auth=_params.get('_request_auth')) |
| 1975 | + |
1816 | 1976 | @validate_arguments
|
1817 | 1977 | def update_audience_for_space(self, space_id : constr(strict=True), id : constr(strict=True), update_audience_for_space_beta_input : UpdateAudienceForSpaceBetaInput, **kwargs) -> UpdateAudienceForSpace200Response: # noqa: E501
|
1818 | 1978 | """Update Audience for Space # noqa: E501
|
|
0 commit comments