def list_exports_with_http_info(self, **kwargs): # noqa: E501 """List property video view export links # noqa: E501 The API has been replaced by the list-exports-views API call. Lists the available video view exports along with URLs to retrieve them. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_exports_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ListExportsResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_exports" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "ListExportsResponse", } return self.api_client.call_api( '/data/v1/exports', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_asset_or_livestream_id_with_http_info(self, playback_id, **kwargs): # noqa: E501 """Retrieve an Asset or Live Stream ID # noqa: E501 Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_asset_or_livestream_id_with_http_info(playback_id, async_req=True) >>> result = thread.get() :param playback_id: The live stream's playback ID. (required) :type playback_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GetAssetOrLiveStreamIdResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['playback_id'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_asset_or_livestream_id" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'playback_id' is set if self.api_client.client_side_validation and ( 'playback_id' not in local_var_params or # noqa: E501 local_var_params['playback_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `playback_id` when calling `get_asset_or_livestream_id`" ) # noqa: E501 collection_formats = {} path_params = {} if 'playback_id' in local_var_params: path_params['PLAYBACK_ID'] = local_var_params[ 'playback_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "GetAssetOrLiveStreamIdResponse", } return self.api_client.call_api( '/video/v1/playback-ids/{PLAYBACK_ID}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_delivery_usage_with_http_info(self, **kwargs): # noqa: E501 """List Usage # noqa: E501 Returns a list of delivery usage records and their associated Asset IDs or Live Stream IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_usage_with_http_info(async_req=True) >>> result = thread.get() :param page: Offset by this many pages, of the size of `limit` :type page: int :param limit: Number of items to include in the response :type limit: int :param asset_id: Filter response to return delivery usage for this asset only. You cannot specify both the `asset_id` and `live_stream_id` parameters together. :type asset_id: str :param live_stream_id: Filter response to return delivery usage for assets for this live stream. You cannot specify both the `asset_id` and `live_stream_id` parameters together. :type live_stream_id: str :param timeframe: Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ListDeliveryUsageResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'page', 'limit', 'asset_id', 'live_stream_id', 'timeframe' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_delivery_usage" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'page' in local_var_params and local_var_params[ 'page'] is not None: # noqa: E501 query_params.append( ('page', local_var_params['page'])) # noqa: E501 if 'limit' in local_var_params and local_var_params[ 'limit'] is not None: # noqa: E501 query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 if 'asset_id' in local_var_params and local_var_params[ 'asset_id'] is not None: # noqa: E501 query_params.append( ('asset_id', local_var_params['asset_id'])) # noqa: E501 if 'live_stream_id' in local_var_params and local_var_params[ 'live_stream_id'] is not None: # noqa: E501 query_params.append( ('live_stream_id', local_var_params['live_stream_id'])) # noqa: E501 if 'timeframe' in local_var_params and local_var_params[ 'timeframe'] is not None: # noqa: E501 query_params.append( ('timeframe[]', local_var_params['timeframe'])) # noqa: E501 collection_formats['timeframe[]'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "ListDeliveryUsageResponse", } return self.api_client.call_api( '/video/v1/delivery-usage', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_insights_with_http_info(self, metric_id, **kwargs): # noqa: E501 """List Insights # noqa: E501 Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_insights_with_http_info(metric_id, async_req=True) >>> result = thread.get() :param metric_id: ID of the Metric (required) :type metric_id: str :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str :param order_direction: Sort order. :type order_direction: str :param timeframe: Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ListInsightsResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'metric_id', 'measurement', 'order_direction', 'timeframe' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_insights" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'metric_id' is set if self.api_client.client_side_validation and ( 'metric_id' not in local_var_params or # noqa: E501 local_var_params['metric_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `metric_id` when calling `list_insights`" ) # noqa: E501 collection_formats = {} path_params = {} if 'metric_id' in local_var_params: path_params['METRIC_ID'] = local_var_params[ 'metric_id'] # noqa: E501 query_params = [] if 'measurement' in local_var_params and local_var_params[ 'measurement'] is not None: # noqa: E501 query_params.append( ('measurement', local_var_params['measurement'])) # noqa: E501 if 'order_direction' in local_var_params and local_var_params[ 'order_direction'] is not None: # noqa: E501 query_params.append( ('order_direction', local_var_params['order_direction'])) # noqa: E501 if 'timeframe' in local_var_params and local_var_params[ 'timeframe'] is not None: # noqa: E501 query_params.append( ('timeframe[]', local_var_params['timeframe'])) # noqa: E501 collection_formats['timeframe[]'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "ListInsightsResponse", } return self.api_client.call_api( '/data/v1/metrics/{METRIC_ID}/insights', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_related_incidents_with_http_info(self, incident_id, **kwargs): # noqa: E501 """List Related Incidents # noqa: E501 Returns all the incidents that seem related to a specific incident. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_related_incidents_with_http_info(incident_id, async_req=True) >>> result = thread.get() :param incident_id: ID of the Incident (required) :type incident_id: str :param limit: Number of items to include in the response :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int :param order_by: Value to order the results by :type order_by: str :param order_direction: Sort order. :type order_direction: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ListRelatedIncidentsResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'incident_id', 'limit', 'page', 'order_by', 'order_direction' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_related_incidents" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'incident_id' is set if self.api_client.client_side_validation and ( 'incident_id' not in local_var_params or # noqa: E501 local_var_params['incident_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `incident_id` when calling `list_related_incidents`" ) # noqa: E501 collection_formats = {} path_params = {} if 'incident_id' in local_var_params: path_params['INCIDENT_ID'] = local_var_params[ 'incident_id'] # noqa: E501 query_params = [] if 'limit' in local_var_params and local_var_params[ 'limit'] is not None: # noqa: E501 query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 if 'page' in local_var_params and local_var_params[ 'page'] is not None: # noqa: E501 query_params.append( ('page', local_var_params['page'])) # noqa: E501 if 'order_by' in local_var_params and local_var_params[ 'order_by'] is not None: # noqa: E501 query_params.append( ('order_by', local_var_params['order_by'])) # noqa: E501 if 'order_direction' in local_var_params and local_var_params[ 'order_direction'] is not None: # noqa: E501 query_params.append( ('order_direction', local_var_params['order_direction'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "ListRelatedIncidentsResponse", } return self.api_client.call_api( '/data/v1/incidents/{INCIDENT_ID}/related', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_all_metric_values_with_http_info(self, **kwargs): # noqa: E501 """List all metric values # noqa: E501 List all of the values across every breakdown for a specific metric. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_all_metric_values_with_http_info(async_req=True) >>> result = thread.get() :param timeframe: Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` :type timeframe: list[str] :param filters: Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` :type filters: list[str] :param dimension: Dimension the specified value belongs to :type dimension: str :param value: Value to show all available metrics for :type value: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ListAllMetricValuesResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['timeframe', 'filters', 'dimension', 'value'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_all_metric_values" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'timeframe' in local_var_params and local_var_params[ 'timeframe'] is not None: # noqa: E501 query_params.append( ('timeframe[]', local_var_params['timeframe'])) # noqa: E501 collection_formats['timeframe[]'] = 'multi' # noqa: E501 if 'filters' in local_var_params and local_var_params[ 'filters'] is not None: # noqa: E501 query_params.append( ('filters[]', local_var_params['filters'])) # noqa: E501 collection_formats['filters[]'] = 'multi' # noqa: E501 if 'dimension' in local_var_params and local_var_params[ 'dimension'] is not None: # noqa: E501 query_params.append( ('dimension', local_var_params['dimension'])) # noqa: E501 if 'value' in local_var_params and local_var_params[ 'value'] is not None: # noqa: E501 query_params.append( ('value', local_var_params['value'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "ListAllMetricValuesResponse", } return self.api_client.call_api( '/data/v1/metrics/comparison', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_metric_timeseries_data_with_http_info(self, metric_id, **kwargs): # noqa: E501 """Get metric timeseries data # noqa: E501 Returns timeseries data for a specific metric. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_metric_timeseries_data_with_http_info(metric_id, async_req=True) >>> result = thread.get() :param metric_id: ID of the Metric (required) :type metric_id: str :param timeframe: Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` :type timeframe: list[str] :param filters: Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` :type filters: list[str] :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str :param order_direction: Sort order. :type order_direction: str :param group_by: Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is `ten_minutes`. Between 6 hours and 15 hours inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 hours is `day`. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity. :type group_by: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GetMetricTimeseriesDataResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'metric_id', 'timeframe', 'filters', 'measurement', 'order_direction', 'group_by' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_metric_timeseries_data" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'metric_id' is set if self.api_client.client_side_validation and ( 'metric_id' not in local_var_params or # noqa: E501 local_var_params['metric_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `metric_id` when calling `get_metric_timeseries_data`" ) # noqa: E501 collection_formats = {} path_params = {} if 'metric_id' in local_var_params: path_params['METRIC_ID'] = local_var_params[ 'metric_id'] # noqa: E501 query_params = [] if 'timeframe' in local_var_params and local_var_params[ 'timeframe'] is not None: # noqa: E501 query_params.append( ('timeframe[]', local_var_params['timeframe'])) # noqa: E501 collection_formats['timeframe[]'] = 'multi' # noqa: E501 if 'filters' in local_var_params and local_var_params[ 'filters'] is not None: # noqa: E501 query_params.append( ('filters[]', local_var_params['filters'])) # noqa: E501 collection_formats['filters[]'] = 'multi' # noqa: E501 if 'measurement' in local_var_params and local_var_params[ 'measurement'] is not None: # noqa: E501 query_params.append( ('measurement', local_var_params['measurement'])) # noqa: E501 if 'order_direction' in local_var_params and local_var_params[ 'order_direction'] is not None: # noqa: E501 query_params.append( ('order_direction', local_var_params['order_direction'])) # noqa: E501 if 'group_by' in local_var_params and local_var_params[ 'group_by'] is not None: # noqa: E501 query_params.append( ('group_by', local_var_params['group_by'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "GetMetricTimeseriesDataResponse", } return self.api_client.call_api( '/data/v1/metrics/{METRIC_ID}/timeseries', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def create_url_signing_key_with_http_info(self, **kwargs): # noqa: E501 """Create a URL signing key # noqa: E501 Creates a new signing key pair. When creating a new signing key, the API will generate a 2048-bit RSA key-pair and return the private key and a generated key-id; the public key will be stored at Mux to validate signed tokens. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_url_signing_key_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SigningKeyResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_url_signing_key" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 201: "SigningKeyResponse", } return self.api_client.call_api( '/video/v1/signing-keys', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_filter_values_with_http_info(self, filter_id, **kwargs): # noqa: E501 """Lists values for a specific filter # noqa: E501 The API has been replaced by the list-dimension-values API call. Lists the values for a filter along with a total count of related views. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_filter_values_with_http_info(filter_id, async_req=True) >>> result = thread.get() :param filter_id: ID of the Filter (required) :type filter_id: str :param limit: Number of items to include in the response :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int :param filters: Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` :type filters: list[str] :param timeframe: Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ListFilterValuesResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'filter_id', 'limit', 'page', 'filters', 'timeframe' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_filter_values" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'filter_id' is set if self.api_client.client_side_validation and ('filter_id' not in local_var_params or # noqa: E501 local_var_params['filter_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `filter_id` when calling `list_filter_values`") # noqa: E501 collection_formats = {} path_params = {} if 'filter_id' in local_var_params: path_params['FILTER_ID'] = local_var_params['filter_id'] # noqa: E501 query_params = [] if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'filters' in local_var_params and local_var_params['filters'] is not None: # noqa: E501 query_params.append(('filters[]', local_var_params['filters'])) # noqa: E501 collection_formats['filters[]'] = 'multi' # noqa: E501 if 'timeframe' in local_var_params and local_var_params['timeframe'] is not None: # noqa: E501 query_params.append(('timeframe[]', local_var_params['timeframe'])) # noqa: E501 collection_formats['timeframe[]'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "ListFilterValuesResponse", } return self.api_client.call_api( '/data/v1/filters/{FILTER_ID}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_url_signing_key_with_http_info(self, signing_key_id, **kwargs): # noqa: E501 """Retrieve a URL signing key # noqa: E501 Retrieves the details of a URL signing key that has previously been created. Supply the unique signing key ID that was returned from your previous request, and Mux will return the corresponding signing key information. **The private key is not returned in this response.** # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_url_signing_key_with_http_info(signing_key_id, async_req=True) >>> result = thread.get() :param signing_key_id: The ID of the signing key. (required) :type signing_key_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SigningKeyResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['signing_key_id'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_url_signing_key" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'signing_key_id' is set if self.api_client.client_side_validation and ( 'signing_key_id' not in local_var_params or # noqa: E501 local_var_params['signing_key_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `signing_key_id` when calling `get_url_signing_key`" ) # noqa: E501 collection_formats = {} path_params = {} if 'signing_key_id' in local_var_params: path_params['SIGNING_KEY_ID'] = local_var_params[ 'signing_key_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "SigningKeyResponse", } return self.api_client.call_api( '/video/v1/signing-keys/{SIGNING_KEY_ID}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_url_signing_keys_with_http_info(self, **kwargs): # noqa: E501 """List URL signing keys # noqa: E501 Returns a list of URL signing keys. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_url_signing_keys_with_http_info(async_req=True) >>> result = thread.get() :param limit: Number of items to include in the response :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ListSigningKeysResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['limit', 'page'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_url_signing_keys" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'limit' in local_var_params and local_var_params[ 'limit'] is not None: # noqa: E501 query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 if 'page' in local_var_params and local_var_params[ 'page'] is not None: # noqa: E501 query_params.append( ('page', local_var_params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "ListSigningKeysResponse", } return self.api_client.call_api( '/video/v1/signing-keys', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def delete_url_signing_key_with_http_info(self, signing_key_id, **kwargs): # noqa: E501 """Delete a URL signing key # noqa: E501 Deletes an existing signing key. Use with caution, as this will invalidate any existing signatures and no URLs can be signed using the key again. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_url_signing_key_with_http_info(signing_key_id, async_req=True) >>> result = thread.get() :param signing_key_id: The ID of the signing key. (required) :type signing_key_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = ['signing_key_id'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method delete_url_signing_key" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'signing_key_id' is set if self.api_client.client_side_validation and ( 'signing_key_id' not in local_var_params or # noqa: E501 local_var_params['signing_key_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `signing_key_id` when calling `delete_url_signing_key`" ) # noqa: E501 collection_formats = {} path_params = {} if 'signing_key_id' in local_var_params: path_params['SIGNING_KEY_ID'] = local_var_params[ 'signing_key_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = {} return self.api_client.call_api( '/video/v1/signing-keys/{SIGNING_KEY_ID}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_realtime_breakdown_with_http_info(self, realtime_metric_id, **kwargs): # noqa: E501 """Get Real-Time Breakdown # noqa: E501 Gets breakdown information for a specific dimension and metric along with the number of concurrent viewers and negative impact score. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_realtime_breakdown_with_http_info(realtime_metric_id, async_req=True) >>> result = thread.get() :param realtime_metric_id: ID of the Realtime Metric (required) :type realtime_metric_id: str :param dimension: Dimension the specified value belongs to :type dimension: str :param timestamp: Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. :type timestamp: float :param filters: Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` :type filters: list[str] :param order_by: Value to order the results by :type order_by: str :param order_direction: Sort order. :type order_direction: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(GetRealTimeBreakdownResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'realtime_metric_id', 'dimension', 'timestamp', 'filters', 'order_by', 'order_direction' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_realtime_breakdown" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'realtime_metric_id' is set if self.api_client.client_side_validation and ( 'realtime_metric_id' not in local_var_params or # noqa: E501 local_var_params['realtime_metric_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `realtime_metric_id` when calling `get_realtime_breakdown`" ) # noqa: E501 collection_formats = {} path_params = {} if 'realtime_metric_id' in local_var_params: path_params['REALTIME_METRIC_ID'] = local_var_params[ 'realtime_metric_id'] # noqa: E501 query_params = [] if 'dimension' in local_var_params and local_var_params[ 'dimension'] is not None: # noqa: E501 query_params.append( ('dimension', local_var_params['dimension'])) # noqa: E501 if 'timestamp' in local_var_params and local_var_params[ 'timestamp'] is not None: # noqa: E501 query_params.append( ('timestamp', local_var_params['timestamp'])) # noqa: E501 if 'filters' in local_var_params and local_var_params[ 'filters'] is not None: # noqa: E501 query_params.append( ('filters[]', local_var_params['filters'])) # noqa: E501 collection_formats['filters[]'] = 'multi' # noqa: E501 if 'order_by' in local_var_params and local_var_params[ 'order_by'] is not None: # noqa: E501 query_params.append( ('order_by', local_var_params['order_by'])) # noqa: E501 if 'order_direction' in local_var_params and local_var_params[ 'order_direction'] is not None: # noqa: E501 query_params.append( ('order_direction', local_var_params['order_direction'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "GetRealTimeBreakdownResponse", } return self.api_client.call_api( '/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def create_playback_restriction_with_http_info( self, create_playback_restriction_request, **kwargs): # noqa: E501 """Create a Playback Restriction # noqa: E501 Create a new Playback Restriction. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_playback_restriction_with_http_info(create_playback_restriction_request, async_req=True) >>> result = thread.get() :param create_playback_restriction_request: (required) :type create_playback_restriction_request: CreatePlaybackRestrictionRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(PlaybackRestriction, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['create_playback_restriction_request'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_playback_restriction" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'create_playback_restriction_request' is set if self.api_client.client_side_validation and ( 'create_playback_restriction_request' not in local_var_params or # noqa: E501 local_var_params['create_playback_restriction_request'] is None ): # noqa: E501 raise ApiValueError( "Missing the required parameter `create_playback_restriction_request` when calling `create_playback_restriction`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_playback_restriction_request' in local_var_params: body_params = local_var_params[ 'create_playback_restriction_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 201: "PlaybackRestriction", } return self.api_client.call_api( '/video/v1/playback-restrictions', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def update_referrer_domain_restriction_with_http_info( self, playback_restriction_id, body, **kwargs): # noqa: E501 """Update the Referrer Playback Restriction # noqa: E501 Allows you to modify the list of domians or change how Mux validates playback requests without the `Referer` HTTP header. The Referrer restriction fully replaces the old list with this new list of domains. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_referrer_domain_restriction_with_http_info(playback_restriction_id, body, async_req=True) >>> result = thread.get() :param playback_restriction_id: ID of the Playback Restriction. (required) :type playback_restriction_id: str :param body: (required) :type body: ReferrerDomainRestriction :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(PlaybackRestriction, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['playback_restriction_id', 'body'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_referrer_domain_restriction" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'playback_restriction_id' is set if self.api_client.client_side_validation and ( 'playback_restriction_id' not in local_var_params or # noqa: E501 local_var_params['playback_restriction_id'] is None ): # noqa: E501 raise ApiValueError( "Missing the required parameter `playback_restriction_id` when calling `update_referrer_domain_restriction`" ) # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ( 'body' not in local_var_params or # noqa: E501 local_var_params['body'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `body` when calling `update_referrer_domain_restriction`" ) # noqa: E501 collection_formats = {} path_params = {} if 'playback_restriction_id' in local_var_params: path_params['PLAYBACK_RESTRICTION_ID'] = local_var_params[ 'playback_restriction_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in local_var_params: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "PlaybackRestriction", } return self.api_client.call_api( '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def cancel_direct_upload_with_http_info(self, upload_id, **kwargs): # noqa: E501 """Cancel a direct upload # noqa: E501 Cancels a direct upload and marks it as cancelled. If a pending upload finishes after this request, no asset will be created. This request will only succeed if the upload is still in the `waiting` state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_direct_upload_with_http_info(upload_id, async_req=True) >>> result = thread.get() :param upload_id: ID of the Upload (required) :type upload_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(UploadResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['upload_id'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method cancel_direct_upload" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'upload_id' is set if self.api_client.client_side_validation and ( 'upload_id' not in local_var_params or # noqa: E501 local_var_params['upload_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `upload_id` when calling `cancel_direct_upload`" ) # noqa: E501 collection_formats = {} path_params = {} if 'upload_id' in local_var_params: path_params['UPLOAD_ID'] = local_var_params[ 'upload_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['accessToken'] # noqa: E501 response_types_map = { 200: "UploadResponse", 403: None, } return self.api_client.call_api( '/video/v1/uploads/{UPLOAD_ID}/cancel', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))