def update_params_for_auth(self, headers, querys, auth_settings): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. """ if not auth_settings: return for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: if not auth_setting['value']: continue elif auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] elif auth_setting['in'] == 'query': querys.append((auth_setting['key'], auth_setting['value'])) else: raise ApiValueError( 'Authentication token must be in `query` or `header`' )
def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": return self.rest_client.HEAD(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PUT": return self.rest_client.PUT(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PATCH": return self.rest_client.PATCH(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "DELETE": return self.rest_client.DELETE(url, query_params=query_params, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) else: raise ApiValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." )
def delete_metadata_field_access_control_with_http_info(self, field_name, access_id, **kwargs): # noqa: E501 """Delete an access control entry # noqa: E501 Removes the access control entry with the specified 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.delete_metadata_field_access_control_with_http_info(field_name, access_id, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str field_name: The field name. (required) :param str access_id: The access id. (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['field_name', 'access_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_metadata_field_access_control" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'field_name' is set if ('field_name' not in local_var_params or local_var_params['field_name'] is None): raise ApiValueError("Missing the required parameter `field_name` when calling `delete_metadata_field_access_control`") # noqa: E501 # verify the required parameter 'access_id' is set if ('access_id' not in local_var_params or local_var_params['access_id'] is None): raise ApiValueError("Missing the required parameter `access_id` when calling `delete_metadata_field_access_control`") # noqa: E501 collection_formats = {} path_params = {} if 'field_name' in local_var_params: path_params['field-name'] = local_var_params['field_name'] # noqa: E501 if 'access_id' in local_var_params: path_params['access-id'] = local_var_params['access_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/metadata-field/{field-name}/access/{access-id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def create_entity_external_id_with_http_info(self, type, entity_id, external_id, **kwargs): # noqa: E501 """Create a new external id # noqa: E501 Creates a new external id for the specified entity. # 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_entity_external_id_with_http_info(type, entity_id, external_id, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str type: The type of entity. (required) :param str entity_id: The entity id. (required) :param str external_id: The external id. (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['type', 'entity_id', 'external_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_entity_external_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'type' is set if ('type' not in local_var_params or local_var_params['type'] is None): raise ApiValueError("Missing the required parameter `type` when calling `create_entity_external_id`") # noqa: E501 # verify the required parameter 'entity_id' is set if ('entity_id' not in local_var_params or local_var_params['entity_id'] is None): raise ApiValueError("Missing the required parameter `entity_id` when calling `create_entity_external_id`") # noqa: E501 # verify the required parameter 'external_id' is set if ('external_id' not in local_var_params or local_var_params['external_id'] is None): raise ApiValueError("Missing the required parameter `external_id` when calling `create_entity_external_id`") # noqa: E501 collection_formats = {} path_params = {} if 'type' in local_var_params: path_params['type'] = local_var_params['type'] # noqa: E501 if 'entity_id' in local_var_params: path_params['entity-id'] = local_var_params['entity_id'] # noqa: E501 if 'external_id' in local_var_params: path_params['external-id'] = local_var_params['external_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/{type}/{entity-id}/external-id/{external-id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def get_metadata_entry_with_http_info(self, uuid, **kwargs): # noqa: E501 """Retrieve metadata by UUID # noqa: E501 Retrieves the metadata entry that matches the UUID. # 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_metadata_entry_with_http_info(uuid, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str uuid: The uuid. (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(MetadataEntryType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['uuid'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_metadata_entry" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'uuid' is set if ('uuid' not in local_var_params or local_var_params['uuid'] is None): raise ApiValueError( "Missing the required parameter `uuid` when calling `get_metadata_entry`" ) # noqa: E501 collection_formats = {} path_params = {} if 'uuid' in local_var_params: path_params['uuid'] = local_var_params['uuid'] # 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', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/metadata/{uuid}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MetadataEntryType', # noqa: E501 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)
def update_or_create_site_with_http_info(self, site_id, site_definition_type, **kwargs): # noqa: E501 """Update or create a site # noqa: E501 Adds a new site using the given site definition. The only supported value for `syncPolicy` is currently `ONDEMAND`. # 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_or_create_site_with_http_info(site_id, site_definition_type, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str site_id: The site id. (required) :param SiteDefinitionType site_definition_type: (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(SiteDefinitionType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['site_id', 'site_definition_type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_or_create_site" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'site_id' is set if ('site_id' not in local_var_params or local_var_params['site_id'] is None): raise ApiValueError( "Missing the required parameter `site_id` when calling `update_or_create_site`" ) # noqa: E501 # verify the required parameter 'site_definition_type' is set if ('site_definition_type' not in local_var_params or local_var_params['site_definition_type'] is None): raise ApiValueError( "Missing the required parameter `site_definition_type` when calling `update_or_create_site`" ) # noqa: E501 collection_formats = {} path_params = {} if 'site_id' in local_var_params: path_params['site-id'] = local_var_params['site_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'site_definition_type' in local_var_params: body_params = local_var_params['site_definition_type'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/xml']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/site/{site-id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SiteDefinitionType', # noqa: E501 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)
def get_item_interval_loudness_with_http_info(self, item_id, loudness_type, **kwargs): # noqa: E501 """Get loudness values for interval # noqa: E501 Extracts loudness information from bulky metadata. Start and end range can be specified, as well as custom mixing. # 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_item_interval_loudness_with_http_info(item_id, loudness_type, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str item_id: The item id. (required) :param LoudnessType loudness_type: (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(LoudnessType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['item_id', 'loudness_type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_item_interval_loudness" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `get_item_interval_loudness`" ) # noqa: E501 # verify the required parameter 'loudness_type' is set if ('loudness_type' not in local_var_params or local_var_params['loudness_type'] is None): raise ApiValueError( "Missing the required parameter `loudness_type` when calling `get_item_interval_loudness`" ) # noqa: E501 collection_formats = {} path_params = {} if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'loudness_type' in local_var_params: body_params = local_var_params['loudness_type'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/xml']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/item/{item-id}/loudness', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='LoudnessType', # noqa: E501 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)
def create_vidispine_log_job_upload_with_http_info(self, job_id, uri_list_type, **kwargs): # noqa: E501 """Start an upload # noqa: E501 Starts upload. # 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_vidispine_log_job_upload_with_http_info(job_id, uri_list_type, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str job_id: The job id. (required) :param URIListType uri_list_type: A <em>URIListDocument</em> with URIs from the list of files in the log. (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['job_id', 'uri_list_type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_vidispine_log_job_upload" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'job_id' is set if ('job_id' not in local_var_params or local_var_params['job_id'] is None): raise ApiValueError("Missing the required parameter `job_id` when calling `create_vidispine_log_job_upload`") # noqa: E501 # verify the required parameter 'uri_list_type' is set if ('uri_list_type' not in local_var_params or local_var_params['uri_list_type'] is None): raise ApiValueError("Missing the required parameter `uri_list_type` when calling `create_vidispine_log_job_upload`") # noqa: E501 collection_formats = {} path_params = {} if 'job_id' in local_var_params: path_params['job-id'] = local_var_params['job_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'uri_list_type' in local_var_params: body_params = local_var_params['uri_list_type'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/vidispine-logs/job/{job-id}/upload', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def create_poster_export_job_with_http_info(self, uri, service, item_id, time, **kwargs): # noqa: E501 """Export a thumbnail # noqa: E501 Starts a job that writes the thumbnail or poster to a specific destination. # 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_poster_export_job_with_http_info(uri, service, item_id, time, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str uri: URI of export location of thumbnail or poster (required) :param str service: The service. (required) :param str item_id: The item id. (required) :param str time: The time. (required) :key list[str] jobmetadata: Additional information for the job task. :key str notification_data: Any additional data to include for notifications on this job. :key str format: Image format of destination. E. g. `tiff`. :key str notification: The placeholder job notification to use for this job. :key str priority: The priority to assign to the job. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(JobType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'uri', 'service', 'item_id', 'time', 'jobmetadata', 'notification_data', 'format', 'notification', 'priority' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_poster_export_job" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'uri' is set if ('uri' not in local_var_params or local_var_params['uri'] is None): raise ApiValueError( "Missing the required parameter `uri` when calling `create_poster_export_job`" ) # noqa: E501 # verify the required parameter 'service' is set if ('service' not in local_var_params or local_var_params['service'] is None): raise ApiValueError( "Missing the required parameter `service` when calling `create_poster_export_job`" ) # noqa: E501 # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `create_poster_export_job`" ) # noqa: E501 # verify the required parameter 'time' is set if ('time' not in local_var_params or local_var_params['time'] is None): raise ApiValueError( "Missing the required parameter `time` when calling `create_poster_export_job`" ) # noqa: E501 collection_formats = {} path_params = {} if 'service' in local_var_params: path_params['service'] = local_var_params['service'] # noqa: E501 if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 if 'time' in local_var_params: path_params['time'] = local_var_params['time'] # noqa: E501 query_params = [] if 'jobmetadata' in local_var_params: query_params.append( ('jobmetadata', local_var_params['jobmetadata'])) # noqa: E501 collection_formats['jobmetadata'] = 'multi' # noqa: E501 if 'notification_data' in local_var_params: query_params.append( ('notificationData', local_var_params['notification_data'])) # noqa: E501 if 'format' in local_var_params: query_params.append( ('format', local_var_params['format'])) # noqa: E501 if 'uri' in local_var_params: query_params.append(('uri', local_var_params['uri'])) # noqa: E501 if 'notification' in local_var_params: query_params.append( ('notification', local_var_params['notification'])) # noqa: E501 if 'priority' in local_var_params: query_params.append( ('priority', local_var_params['priority'])) # 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', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/poster/{service}/{item-id}/{time}/export', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='JobType', # noqa: E501 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)
def get_posters_with_http_info(self, service, item_id, **kwargs): # noqa: E501 """List all thumbnails # noqa: E501 Returns thumbnail URIs on which further requests may be performed. # 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_posters_with_http_info(service, item_id, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str service: The service. (required) :param str item_id: The item id. (required) :key bool noauth_url: - `true` Return URIs that do not need authentication. - `false` (default) Return normal URIs :key bool url: - `true` - Return list of URLs. - `false` (default) - Return list of ids. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(URIListType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['service', 'item_id', 'noauth_url', 'url'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_posters" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'service' is set if ('service' not in local_var_params or local_var_params['service'] is None): raise ApiValueError( "Missing the required parameter `service` when calling `get_posters`" ) # noqa: E501 # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `get_posters`" ) # noqa: E501 collection_formats = {} path_params = {} if 'service' in local_var_params: path_params['service'] = local_var_params['service'] # noqa: E501 if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 query_params = [] if 'noauth_url' in local_var_params: query_params.append( ('noauth-url', local_var_params['noauth_url'])) # noqa: E501 if 'url' in local_var_params: query_params.append(('url', local_var_params['url'])) # 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', 'text/plain', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/poster/{service}/{item-id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='URIListType', # noqa: E501 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)
def get_thumbnail_with_http_info(self, service, item_id, time, **kwargs): # noqa: E501 """Retrieve the image representation # noqa: E501 Return the image representation of this thumbnail. # 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_thumbnail_with_http_info(service, item_id, time, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str service: The service. (required) :param str item_id: The item id. (required) :param str time: The time. (required) :key str hash: The checksum of the image. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(file, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['service', 'item_id', 'time', 'hash'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_thumbnail" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'service' is set if ('service' not in local_var_params or local_var_params['service'] is None): raise ApiValueError( "Missing the required parameter `service` when calling `get_thumbnail`" ) # noqa: E501 # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `get_thumbnail`" ) # noqa: E501 # verify the required parameter 'time' is set if ('time' not in local_var_params or local_var_params['time'] is None): raise ApiValueError( "Missing the required parameter `time` when calling `get_thumbnail`" ) # noqa: E501 collection_formats = {} path_params = {} if 'service' in local_var_params: path_params['service'] = local_var_params['service'] # noqa: E501 if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 if 'time' in local_var_params: path_params['time'] = local_var_params['time'] # noqa: E501 query_params = [] if 'hash' in local_var_params: query_params.append( ('hash', local_var_params['hash'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['image/png', 'image/jpeg']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/thumbnail/{service}/{item-id}/{time}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='file', # noqa: E501 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)
def update_or_create_metadata_dataset_with_http_info( self, name, body, **kwargs): # noqa: E501 """Update or create a dataset # noqa: E501 Updates or creates the existing dataset with the specified name. # 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_or_create_metadata_dataset_with_http_info(name, body, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str name: The name. (required) :param str body: The RDF model. (required) :key str id_seed: A property name in the RDF model. If the id of a subject is not provided in the model, the value of this property will be used to generate an id for this subject. If not set or the subject doesn't have this property, a random id will be generated. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['name', 'body', 'id_seed'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_or_create_metadata_dataset" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set if ('name' not in local_var_params or local_var_params['name'] is None): raise ApiValueError( "Missing the required parameter `name` when calling `update_or_create_metadata_dataset`" ) # noqa: E501 # verify the required parameter 'body' is set if ('body' not in local_var_params or local_var_params['body'] is None): raise ApiValueError( "Missing the required parameter `body` when calling `update_or_create_metadata_dataset`" ) # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] if 'id_seed' in local_var_params: query_params.append( ('id-seed', local_var_params['id_seed'])) # noqa: E501 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/rdf+xml', 'text/turtle', 'application/ld+json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/rdf+xml', 'text/turtle', 'application/ld+json']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/metadata/dataset/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 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)
def inspect_project_with_http_info(self, essence_mappings_type, **kwargs): # noqa: E501 """Inspect a project file # noqa: E501 Returns a document listing the sequences and assets referenced from a given project file. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.inspect_project_with_http_info(essence_mappings_type, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param EssenceMappingsType essence_mappings_type: (required) :key str type: The file format. :key str uri: The location of the file to inspect. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(ProjectFileType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['essence_mappings_type', 'type', 'uri'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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 inspect_project" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'essence_mappings_type' is set if ('essence_mappings_type' not in local_var_params or local_var_params['essence_mappings_type'] is None): raise ApiValueError( "Missing the required parameter `essence_mappings_type` when calling `inspect_project`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'type' in local_var_params: query_params.append( ('type', local_var_params['type'])) # noqa: E501 if 'uri' in local_var_params: query_params.append(('uri', local_var_params['uri'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'essence_mappings_type' in local_var_params: body_params = local_var_params['essence_mappings_type'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/xml']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/collection/project/inspect', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ProjectFileType', # noqa: E501 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)
def reindex_with_http_info(self, index, **kwargs): # noqa: E501 """Request a reindex # noqa: E501 Starts a reindex. If a reindex of the same type is already in progress, it is restarted. The types than can be reindexed are: item, collection, ACL, file, thumbnail and document. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reindex_with_http_info(index, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str index: The index to rebuild. (required) :key str status: If current status is `FINISHED` or `ABORTED` then `PAUSED`, `ABORTED` and `IN_PROGRESS` are no-ops. - `IN_QUEUE` (default) - To start or restart reindex. - `PAUSED` - To pause reindex. - `ABORTED` - To cancel reindex. - `IN_PROGRESS`/`IN PROGRESS` - To resume a paused reindex. :key int priority: The priority of this reindex request compare to other request. Requests with a larger/higher priority will be processed first. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(ReindexRequestType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['index', 'status', 'priority'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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 reindex" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'index' is set if ('index' not in local_var_params or local_var_params['index'] is None): raise ApiValueError( "Missing the required parameter `index` when calling `reindex`" ) # noqa: E501 collection_formats = {} path_params = {} if 'index' in local_var_params: path_params['index'] = local_var_params['index'] # noqa: E501 query_params = [] if 'status' in local_var_params: query_params.append( ('status', local_var_params['status'])) # noqa: E501 if 'priority' in local_var_params: query_params.append( ('priority', local_var_params['priority'])) # 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', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/reindex/{index}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ReindexRequestType', # noqa: E501 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)
def disable_vidispine_service_with_http_info(self, service, **kwargs): # noqa: E501 """Disable a service # noqa: E501 Disables this service. No instance in the cluster will run this service. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.disable_vidispine_service_with_http_info(service, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str service: The service. (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['service'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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 disable_vidispine_service" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'service' is set if ('service' not in local_var_params or local_var_params['service'] is None): raise ApiValueError( "Missing the required parameter `service` when calling `disable_vidispine_service`" ) # noqa: E501 collection_formats = {} path_params = {} if 'service' in local_var_params: path_params['service'] = local_var_params['service'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/vidispine-service/service/{service}/disable', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def update_or_create_outgoing_projection_with_http_info( self, projection_id, body, **kwargs): # noqa: E501 """Update or create an outgoing projection # noqa: E501 Creates a new projection if not defined earlier, and sets the outgoing projection to the specified stylesheet. If a new projection is created, the incoming transformation is set to be the identity transform. # 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_or_create_outgoing_projection_with_http_info(projection_id, body, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str projection_id: The projection id. (required) :param str body: XML, XSLT stylesheet (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['projection_id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_or_create_outgoing_projection" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'projection_id' is set if ('projection_id' not in local_var_params or local_var_params['projection_id'] is None): raise ApiValueError( "Missing the required parameter `projection_id` when calling `update_or_create_outgoing_projection`" ) # noqa: E501 # verify the required parameter 'body' is set if ('body' not in local_var_params or local_var_params['body'] is None): raise ApiValueError( "Missing the required parameter `body` when calling `update_or_create_outgoing_projection`" ) # noqa: E501 collection_formats = {} path_params = {} if 'projection_id' in local_var_params: path_params['projection-id'] = local_var_params[ 'projection_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/xml']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/projection/{projection-id}/outgoing', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 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)
def update_export_location_script_with_http_info(self, location_name, body, **kwargs): # noqa: E501 """Update the export location script # noqa: E501 Updates the script of an existing export location. # 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_export_location_script_with_http_info(location_name, body, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str location_name: The location name. (required) :param str body: (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['location_name', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_export_location_script" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'location_name' is set if ('location_name' not in local_var_params or local_var_params['location_name'] is None): raise ApiValueError( "Missing the required parameter `location_name` when calling `update_export_location_script`" ) # noqa: E501 # verify the required parameter 'body' is set if ('body' not in local_var_params or local_var_params['body'] is None): raise ApiValueError( "Missing the required parameter `body` when calling `update_export_location_script`" ) # noqa: E501 collection_formats = {} path_params = {} if 'location_name' in local_var_params: path_params['location-name'] = local_var_params[ 'location_name'] # 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( ['text/plain']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['text/plain']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/export-location/{location-name}/script', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 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)
def update_or_create_poster_with_http_info(self, service, item_id, time, body, **kwargs): # noqa: E501 """Update or create a thumbnail # noqa: E501 Create a new thumbnail at the specified time code. If a thumbnail with the specified time code already exists it is replaced. # 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_or_create_poster_with_http_info(service, item_id, time, body, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str service: The service. (required) :param str item_id: The item id. (required) :param str time: The time. (required) :param file body: Image to insert (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['service', 'item_id', 'time', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_or_create_poster" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'service' is set if ('service' not in local_var_params or local_var_params['service'] is None): raise ApiValueError( "Missing the required parameter `service` when calling `update_or_create_poster`" ) # noqa: E501 # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `update_or_create_poster`" ) # noqa: E501 # verify the required parameter 'time' is set if ('time' not in local_var_params or local_var_params['time'] is None): raise ApiValueError( "Missing the required parameter `time` when calling `update_or_create_poster`" ) # noqa: E501 # verify the required parameter 'body' is set if ('body' not in local_var_params or local_var_params['body'] is None): raise ApiValueError( "Missing the required parameter `body` when calling `update_or_create_poster`" ) # noqa: E501 collection_formats = {} path_params = {} if 'service' in local_var_params: path_params['service'] = local_var_params['service'] # noqa: E501 if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 if 'time' in local_var_params: path_params['time'] = local_var_params['time'] # 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( ['text/plain']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['image/png', 'image/jpeg']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/poster/{service}/{item-id}/{time}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 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)
def get_vidispine_logs_with_http_info(self, endtime, starttime, **kwargs): # noqa: E501 """Retrieve log files # noqa: E501 Retrieves a zip file with the various service log files. # 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_vidispine_logs_with_http_info(endtime, starttime, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str endtime: ISO 8601 end time of time span. (required) :param str starttime: ISO 8601 start time of time span. (required) :key list[str] storage: Comma-separated list of storage ids to retrieve information about. :key str comment: Detailed description of what the problem is, to be written in zip file. :key list[str] item: Comma-separated list of item ids to retrieve information about. :key list[str] user: Comma-separated list of user names to retrieve information about. :key list[str] job: Comma-separated list of job ids to retrieve information about. :key bool selftest: If `true`, includes the result of a self-test. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['endtime', 'starttime', 'storage', 'comment', 'item', 'user', 'job', 'selftest'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_vidispine_logs" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'endtime' is set if ('endtime' not in local_var_params or local_var_params['endtime'] is None): raise ApiValueError("Missing the required parameter `endtime` when calling `get_vidispine_logs`") # noqa: E501 # verify the required parameter 'starttime' is set if ('starttime' not in local_var_params or local_var_params['starttime'] is None): raise ApiValueError("Missing the required parameter `starttime` when calling `get_vidispine_logs`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'endtime' in local_var_params: query_params.append(('endtime', local_var_params['endtime'])) # noqa: E501 if 'storage' in local_var_params: query_params.append(('storage', local_var_params['storage'])) # noqa: E501 collection_formats['storage'] = 'csv' # noqa: E501 if 'comment' in local_var_params: query_params.append(('comment', local_var_params['comment'])) # noqa: E501 if 'item' in local_var_params: query_params.append(('item', local_var_params['item'])) # noqa: E501 collection_formats['item'] = 'csv' # noqa: E501 if 'starttime' in local_var_params: query_params.append(('starttime', local_var_params['starttime'])) # noqa: E501 if 'user' in local_var_params: query_params.append(('user', local_var_params['user'])) # noqa: E501 collection_formats['user'] = '******' # noqa: E501 if 'job' in local_var_params: query_params.append(('job', local_var_params['job'])) # noqa: E501 collection_formats['job'] = 'csv' # noqa: E501 if 'selftest' in local_var_params: query_params.append(('selftest', local_var_params['selftest'])) # 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/zip', 'multipart/mixed', 'multipart/form-data']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/vidispine-logs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 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)
def delete_java_script_session_with_http_info(self, id, **kwargs): # noqa: E501 """Stop a JavaScript session # noqa: E501 Stops an active debugging session. # 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_java_script_session_with_http_info(id, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str id: The id. (required) :key bool stop: - `true` - Kill the running script. - `false` (default) - Stop the debugging session, and leave the script running. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['id', 'stop'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_java_script_session" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'id' is set if ('id' not in local_var_params or local_var_params['id'] is None): raise ApiValueError( "Missing the required parameter `id` when calling `delete_java_script_session`" ) # noqa: E501 collection_formats = {} path_params = {} if 'id' in local_var_params: path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] if 'stop' in local_var_params: query_params.append( ('stop', local_var_params['stop'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/javascript/session/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def get_site_metadata_key_with_http_info(self, id, keypath, **kwargs): # noqa: E501 """Retrieve the metadata for a specific key # noqa: E501 Retrieves the value of a specific key. If a key path is specified, exactly one key-value pair must match the key path, else an error is returned. Key paths can also be specified as well as specific 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.get_site_metadata_key_with_http_info(id, keypath, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str id: The id. (required) :param str keypath: The keypath. (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['id', 'keypath'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_site_metadata_key" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'id' is set if ('id' not in local_var_params or local_var_params['id'] is None): raise ApiValueError( "Missing the required parameter `id` when calling `get_site_metadata_key`" ) # noqa: E501 # verify the required parameter 'keypath' is set if ('keypath' not in local_var_params or local_var_params['keypath'] is None): raise ApiValueError( "Missing the required parameter `keypath` when calling `get_site_metadata_key`" ) # noqa: E501 collection_formats = {} path_params = {} if 'id' in local_var_params: path_params['id'] = local_var_params['id'] # noqa: E501 if 'keypath' in local_var_params: path_params['keypath'] = local_var_params['keypath'] # 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( ['text/plain']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/site/{id}/metadata/{keypath}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 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)
def get_item_shape_bulky_metadata_key_with_http_info( self, item_id, shape_id, key, **kwargs): # noqa: E501 """Read values # noqa: E501 Retrieves all values of a certain key over a specified interval. All values for that key can be retrieved by specifying start as \"-INF\" and end as \"+INF\". # 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_item_shape_bulky_metadata_key_with_http_info(item_id, shape_id, key, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str item_id: The item id. (required) :param str shape_id: The shape id. (required) :param str key: The key. (required) :key str end: A time code that defines the end of the interval. :key str start: A time code that defines the start of the interval. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(BulkyMetadataType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['item_id', 'shape_id', 'key', 'end', 'start'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_item_shape_bulky_metadata_key" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `get_item_shape_bulky_metadata_key`" ) # noqa: E501 # verify the required parameter 'shape_id' is set if ('shape_id' not in local_var_params or local_var_params['shape_id'] is None): raise ApiValueError( "Missing the required parameter `shape_id` when calling `get_item_shape_bulky_metadata_key`" ) # noqa: E501 # verify the required parameter 'key' is set if ('key' not in local_var_params or local_var_params['key'] is None): raise ApiValueError( "Missing the required parameter `key` when calling `get_item_shape_bulky_metadata_key`" ) # noqa: E501 collection_formats = {} path_params = {} if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 if 'shape_id' in local_var_params: path_params['shape-id'] = local_var_params[ 'shape_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = [] if 'end' in local_var_params: query_params.append(('end', local_var_params['end'])) # noqa: E501 if 'start' in local_var_params: query_params.append( ('start', local_var_params['start'])) # 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', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/item/{item-id}/shape/{shape-id}/metadata/bulky/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BulkyMetadataType', # noqa: E501 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)
def update_site_metadata_with_http_info(self, id, simple_metadata_type, **kwargs): # noqa: E501 """Create multiple key-value pairs # noqa: E501 Sets all the specified key-value pairs. # 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_site_metadata_with_http_info(id, simple_metadata_type, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str id: The id. (required) :param SimpleMetadataType simple_metadata_type: (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['id', 'simple_metadata_type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_site_metadata" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'id' is set if ('id' not in local_var_params or local_var_params['id'] is None): raise ApiValueError( "Missing the required parameter `id` when calling `update_site_metadata`" ) # noqa: E501 # verify the required parameter 'simple_metadata_type' is set if ('simple_metadata_type' not in local_var_params or local_var_params['simple_metadata_type'] is None): raise ApiValueError( "Missing the required parameter `simple_metadata_type` when calling `update_site_metadata`" ) # noqa: E501 collection_formats = {} path_params = {} if 'id' in local_var_params: path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'simple_metadata_type' in local_var_params: body_params = local_var_params['simple_metadata_type'] # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/site/{id}/metadata', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def update_item_shape_bulky_metadata_key_with_http_info( self, item_id, shape_id, key, body, **kwargs): # noqa: E501 """Insert values # noqa: E501 Inserts a value at the specified interval for the given key. If the key already has a value at that specific interval then that value will be overwritten. # 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_item_shape_bulky_metadata_key_with_http_info(item_id, shape_id, key, body, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str item_id: The item id. (required) :param str shape_id: The shape id. (required) :param str key: The key. (required) :param str body: The value to set. (required) :key str item_track: The track in the item. :key str end: A time code that defines the end of the interval. :key int channel: The audio channel index. :key int stream: The stream index. :key str start: A time code that defines the start of the interval. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'item_id', 'shape_id', 'key', 'body', 'item_track', 'end', 'channel', 'stream', 'start' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_item_shape_bulky_metadata_key" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `update_item_shape_bulky_metadata_key`" ) # noqa: E501 # verify the required parameter 'shape_id' is set if ('shape_id' not in local_var_params or local_var_params['shape_id'] is None): raise ApiValueError( "Missing the required parameter `shape_id` when calling `update_item_shape_bulky_metadata_key`" ) # noqa: E501 # verify the required parameter 'key' is set if ('key' not in local_var_params or local_var_params['key'] is None): raise ApiValueError( "Missing the required parameter `key` when calling `update_item_shape_bulky_metadata_key`" ) # noqa: E501 # verify the required parameter 'body' is set if ('body' not in local_var_params or local_var_params['body'] is None): raise ApiValueError( "Missing the required parameter `body` when calling `update_item_shape_bulky_metadata_key`" ) # noqa: E501 collection_formats = {} path_params = {} if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 if 'shape_id' in local_var_params: path_params['shape-id'] = local_var_params[ 'shape_id'] # noqa: E501 if 'key' in local_var_params: path_params['key'] = local_var_params['key'] # noqa: E501 query_params = [] if 'item_track' in local_var_params: query_params.append( ('itemTrack', local_var_params['item_track'])) # noqa: E501 if 'end' in local_var_params: query_params.append(('end', local_var_params['end'])) # noqa: E501 if 'channel' in local_var_params: query_params.append( ('channel', local_var_params['channel'])) # noqa: E501 if 'stream' in local_var_params: query_params.append( ('stream', local_var_params['stream'])) # noqa: E501 if 'start' in local_var_params: query_params.append( ('start', local_var_params['start'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in local_var_params: body_params = local_var_params['body'] # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['text/plain']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/item/{item-id}/shape/{shape-id}/metadata/bulky/{key}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def update_global_metadata_with_http_info(self, metadata_type, **kwargs): # noqa: E501 """Update the global metadata # noqa: E501 Modifies the global metadata. This resource shares the same query parameters as the item metadata resource. # 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_global_metadata_with_http_info(metadata_type, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param MetadataType metadata_type: (required) :key str revision: The known revision. If not specified, the change set will attempt to override existing change sets. :key bool only_return_changes: New in version 4. 16. 6. - `true` - Only return the changed entries. - `false` (default) - Return the whole global metadata after the update. :key bool skip_forbidden: Skip fields or groups that the user doesn't have write access to :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(MetadataType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'metadata_type', 'revision', 'only_return_changes', 'skip_forbidden' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_global_metadata" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'metadata_type' is set if ('metadata_type' not in local_var_params or local_var_params['metadata_type'] is None): raise ApiValueError( "Missing the required parameter `metadata_type` when calling `update_global_metadata`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'revision' in local_var_params: query_params.append( ('revision', local_var_params['revision'])) # noqa: E501 if 'only_return_changes' in local_var_params: query_params.append( ('onlyReturnChanges', local_var_params['only_return_changes'])) # noqa: E501 if 'skip_forbidden' in local_var_params: query_params.append( ('skipForbidden', local_var_params['skip_forbidden'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'metadata_type' in local_var_params: body_params = local_var_params['metadata_type'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/xml']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/metadata', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MetadataType', # noqa: E501 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)
def create_shape_storage_name_rule_with_http_info(self, filename, item_id, shape_id, storage_id, **kwargs): # noqa: E501 """Create a new storage name rule # noqa: E501 Creates a new storage name rule that attempts enforce the filename on a certain storage. This operation does not rename the file, it merely creates a rule for it. The file will then be renamed at a later time, if the file is located on that storage. # 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_shape_storage_name_rule_with_http_info(filename, item_id, shape_id, storage_id, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str filename: The desired filename of the file. (required) :param str item_id: The item id. (required) :param str shape_id: The shape id. (required) :param str storage_id: The storage id. (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['filename', 'item_id', 'shape_id', 'storage_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_shape_storage_name_rule" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'filename' is set if ('filename' not in local_var_params or local_var_params['filename'] is None): raise ApiValueError("Missing the required parameter `filename` when calling `create_shape_storage_name_rule`") # noqa: E501 # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError("Missing the required parameter `item_id` when calling `create_shape_storage_name_rule`") # noqa: E501 # verify the required parameter 'shape_id' is set if ('shape_id' not in local_var_params or local_var_params['shape_id'] is None): raise ApiValueError("Missing the required parameter `shape_id` when calling `create_shape_storage_name_rule`") # noqa: E501 # verify the required parameter 'storage_id' is set if ('storage_id' not in local_var_params or local_var_params['storage_id'] is None): raise ApiValueError("Missing the required parameter `storage_id` when calling `create_shape_storage_name_rule`") # noqa: E501 collection_formats = {} path_params = {} if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 if 'shape_id' in local_var_params: path_params['shape-id'] = local_var_params['shape_id'] # noqa: E501 if 'storage_id' in local_var_params: path_params['storage-id'] = local_var_params['storage_id'] # noqa: E501 query_params = [] if 'filename' in local_var_params: query_params.append(('filename', local_var_params['filename'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/item/{item-id}/shape/{shape-id}/filename/{storage-id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 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)
def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :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. """ method = method.upper() assert method in [ 'GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS' ] if post_params and body: raise ApiValueError( "body parameter cannot be used with post_params parameter.") post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers[ 'Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str) or isinstance( body, bytes) or hasattr(body, 'read'): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: raise ApiException(http_resp=r) return r
def get_item_waveform_image_uri_with_http_info(self, item_id, **kwargs): # noqa: E501 """Get waveform image URI # noqa: E501 Returns a URI that does not require authentication to the generated image. The URI expires after 1 hour. # 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_item_waveform_image_uri_with_http_info(item_id, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str item_id: The item id. (required) :key str shape: The shape id to use to get information from. If omitted the shape tag will be used. Note that an analysis of this shape must be done before the information is available. :key str tag: The shape tag to use. :key int height: The height, in pixels, of the image. Default is 100. :key str vgridline: The position of primary vertical gridlines, where 0 is left border and 1 is right border. :key str bgcolor: The background color of the image, as hex triplet. :key str end: The end time code to get waveform information for. :key float max: The audio value that corresponds the top border. Defaults to `1` if `dB` is `false`, and `0` otherwise. :key int width: The number of sample points to return. :key str channel: The channel value of the audio channel within the stream of the component. If `itemTrack` and `stream` are omitted, this value can be used to denote tracks in a linear fashion, regardless of `itemTrack` and `stream`. Then `channel=0` means the first audio track, <pre>channel=1`</pre> the second, etc. :key str hgridline: The position of primary horizontal gridlines, in units of the audio. :key str vgridline2: The position of primary vertical gridlines, where 0 is left border and 1 is right border. :key float min: The audio value that corresponds the bottom border. Defaults to `-1` if `dB` is `false`, and `-80` otherwise. :key str item_track: The `itemTrack` value of the audio channel within the shape. :key bool d_b: - `true` - Return RMS dB values. - `false` (default) - Return RMS 1-based absolute values. :key str vgridlinecolor: The color of primary vertical gridlines :key str vgridline2color: The color of primary vertical gridlines :key str hgridline2: The position of secondary horizontal gridlines, in units of the audio. :key str hgridlinecolor: The color of primary horizontal gridlines. :key str hgridline2color: The color of secondary horizontal gridlines :key str start: The start time code to get waveform information for. :key str fgcolor: The color of the waveform, as hex triplet. :key str stream: The stream value of the audio channel within the component of the shape. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'item_id', 'shape', 'tag', 'height', 'vgridline', 'bgcolor', 'end', 'max', 'width', 'channel', 'hgridline', 'vgridline2', 'min', 'item_track', 'd_b', 'vgridlinecolor', 'vgridline2color', 'hgridline2', 'hgridlinecolor', 'hgridline2color', 'start', 'fgcolor', 'stream' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_item_waveform_image_uri" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `get_item_waveform_image_uri`" ) # noqa: E501 collection_formats = {} path_params = {} if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 query_params = [] if 'shape' in local_var_params: query_params.append( ('shape', local_var_params['shape'])) # noqa: E501 if 'tag' in local_var_params: query_params.append(('tag', local_var_params['tag'])) # noqa: E501 if 'height' in local_var_params: query_params.append( ('height', local_var_params['height'])) # noqa: E501 if 'vgridline' in local_var_params: query_params.append( ('vgridline', local_var_params['vgridline'])) # noqa: E501 if 'bgcolor' in local_var_params: query_params.append( ('bgcolor', local_var_params['bgcolor'])) # noqa: E501 if 'end' in local_var_params: query_params.append(('end', local_var_params['end'])) # noqa: E501 if 'max' in local_var_params: query_params.append(('max', local_var_params['max'])) # noqa: E501 if 'width' in local_var_params: query_params.append( ('width', local_var_params['width'])) # noqa: E501 if 'channel' in local_var_params: query_params.append( ('channel', local_var_params['channel'])) # noqa: E501 if 'hgridline' in local_var_params: query_params.append( ('hgridline', local_var_params['hgridline'])) # noqa: E501 if 'vgridline2' in local_var_params: query_params.append( ('vgridline2', local_var_params['vgridline2'])) # noqa: E501 if 'min' in local_var_params: query_params.append(('min', local_var_params['min'])) # noqa: E501 if 'item_track' in local_var_params: query_params.append( ('itemTrack', local_var_params['item_track'])) # noqa: E501 if 'd_b' in local_var_params: query_params.append(('dB', local_var_params['d_b'])) # noqa: E501 if 'vgridlinecolor' in local_var_params: query_params.append( ('vgridlinecolor', local_var_params['vgridlinecolor'])) # noqa: E501 if 'vgridline2color' in local_var_params: query_params.append( ('vgridline2color', local_var_params['vgridline2color'])) # noqa: E501 if 'hgridline2' in local_var_params: query_params.append( ('hgridline2', local_var_params['hgridline2'])) # noqa: E501 if 'hgridlinecolor' in local_var_params: query_params.append( ('hgridlinecolor', local_var_params['hgridlinecolor'])) # noqa: E501 if 'hgridline2color' in local_var_params: query_params.append( ('hgridline2color', local_var_params['hgridline2color'])) # noqa: E501 if 'start' in local_var_params: query_params.append( ('start', local_var_params['start'])) # noqa: E501 if 'fgcolor' in local_var_params: query_params.append( ('fgcolor', local_var_params['fgcolor'])) # noqa: E501 if 'stream' in local_var_params: query_params.append( ('stream', local_var_params['stream'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/item/{item-id}/waveform/imageURI', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 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)
def create_metadata_field_access_control_with_http_info(self, field_name, metadata_field_access_control_type, **kwargs): # noqa: E501 """Create an access control entry # noqa: E501 Creates an entry in the access control list and returns the created entry together with its 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.create_metadata_field_access_control_with_http_info(field_name, metadata_field_access_control_type, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str field_name: The field name. (required) :param MetadataFieldAccessControlType metadata_field_access_control_type: (required) :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(MetadataFieldAccessControlType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['field_name', 'metadata_field_access_control_type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_metadata_field_access_control" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'field_name' is set if ('field_name' not in local_var_params or local_var_params['field_name'] is None): raise ApiValueError("Missing the required parameter `field_name` when calling `create_metadata_field_access_control`") # noqa: E501 # verify the required parameter 'metadata_field_access_control_type' is set if ('metadata_field_access_control_type' not in local_var_params or local_var_params['metadata_field_access_control_type'] is None): raise ApiValueError("Missing the required parameter `metadata_field_access_control_type` when calling `create_metadata_field_access_control`") # noqa: E501 collection_formats = {} path_params = {} if 'field_name' in local_var_params: path_params['field-name'] = local_var_params['field_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'metadata_field_access_control_type' in local_var_params: body_params = local_var_params['metadata_field_access_control_type'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/xml']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/metadata-field/{field-name}/access', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MetadataFieldAccessControlType', # noqa: E501 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)
def get_item_waveform_with_http_info(self, item_id, **kwargs): # noqa: E501 """Get waveform data # noqa: E501 Returns the waveform data as a *WaveformDataDocument*. # 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_item_waveform_with_http_info(item_id, async_req=True) >>> result = thread.get() :key bool async_req: execute request asynchronously :param str item_id: The item id. (required) :key str shape: The shape id to use to get information from. If omitted the shape tag will be used. Note that an analysis of this shape must be done before the information is available. :key bool d_b: - `true` - Return RMS dB values. - `false` (default) - Return RMS 1-based absolute values. :key str tag: The shape tag to use. :key str start: The start time code to get waveform information for. :key str item_track: The `itemTrack` value of the audio channel within the shape. :key str end: The end time code to get waveform information for. :key int width: The number of sample points to return. :key str channel: The channel value of the audio channel within the stream of the component. If `itemTrack` and `stream` are omitted, this value can be used to denote tracks in a linear fashion, regardless of `itemTrack` and `stream`. Then `channel=0` means the first audio track, <pre>channel=1`</pre> the second, etc. :key str stream: The stream value of the audio channel within the component of the shape. :key _return_http_data_only: response data without head status code and headers :key _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :key _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. :return: tuple(WaveformDataType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'item_id', 'shape', 'd_b', 'tag', 'start', 'item_track', 'end', 'width', 'channel', 'stream' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') 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_item_waveform" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'item_id' is set if ('item_id' not in local_var_params or local_var_params['item_id'] is None): raise ApiValueError( "Missing the required parameter `item_id` when calling `get_item_waveform`" ) # noqa: E501 collection_formats = {} path_params = {} if 'item_id' in local_var_params: path_params['item-id'] = local_var_params['item_id'] # noqa: E501 query_params = [] if 'shape' in local_var_params: query_params.append( ('shape', local_var_params['shape'])) # noqa: E501 if 'd_b' in local_var_params: query_params.append(('dB', local_var_params['d_b'])) # noqa: E501 if 'tag' in local_var_params: query_params.append(('tag', local_var_params['tag'])) # noqa: E501 if 'start' in local_var_params: query_params.append( ('start', local_var_params['start'])) # noqa: E501 if 'item_track' in local_var_params: query_params.append( ('itemTrack', local_var_params['item_track'])) # noqa: E501 if 'end' in local_var_params: query_params.append(('end', local_var_params['end'])) # noqa: E501 if 'width' in local_var_params: query_params.append( ('width', local_var_params['width'])) # noqa: E501 if 'channel' in local_var_params: query_params.append( ('channel', local_var_params['channel'])) # noqa: E501 if 'stream' in local_var_params: query_params.append( ('stream', local_var_params['stream'])) # 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', 'application/xml']) # noqa: E501 # Authentication setting auth_settings = ['basicAuth'] # noqa: E501 return self.api_client.call_api( '/item/{item-id}/waveform/values', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WaveformDataType', # noqa: E501 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)