diff options
Diffstat (limited to 'python_openapi_client/fatcat_openapi_client/api/editgroups_api.py')
-rw-r--r-- | python_openapi_client/fatcat_openapi_client/api/editgroups_api.py | 1046 |
1 files changed, 1046 insertions, 0 deletions
diff --git a/python_openapi_client/fatcat_openapi_client/api/editgroups_api.py b/python_openapi_client/fatcat_openapi_client/api/editgroups_api.py new file mode 100644 index 00000000..b4da4300 --- /dev/null +++ b/python_openapi_client/fatcat_openapi_client/api/editgroups_api.py @@ -0,0 +1,1046 @@ +""" + fatcat + + Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 + + The version of the OpenAPI document: 0.5.0 + Contact: webservices@archive.org + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint +from fatcat_openapi_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from fatcat_openapi_client.model.editgroup import Editgroup +from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation +from fatcat_openapi_client.model.error_response import ErrorResponse +from fatcat_openapi_client.model.success import Success + + +class EditgroupsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.accept_editgroup_endpoint = _Endpoint( + settings={ + 'response_type': (Success,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/editgroup/{editgroup_id}/accept', + 'operation_id': 'accept_editgroup', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'editgroup_id', + ], + 'required': [ + 'editgroup_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'editgroup_id', + ] + }, + root_map={ + 'validations': { + ('editgroup_id',): { + 'max_length': 26, + 'min_length': 26, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'editgroup_id': + (str,), + }, + 'attribute_map': { + 'editgroup_id': 'editgroup_id', + }, + 'location_map': { + 'editgroup_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.create_editgroup_endpoint = _Endpoint( + settings={ + 'response_type': (Editgroup,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/editgroup', + 'operation_id': 'create_editgroup', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'editgroup', + ], + 'required': [ + 'editgroup', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'editgroup': + (Editgroup,), + }, + 'attribute_map': { + }, + 'location_map': { + 'editgroup': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_editgroup_annotation_endpoint = _Endpoint( + settings={ + 'response_type': (EditgroupAnnotation,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/editgroup/{editgroup_id}/annotation', + 'operation_id': 'create_editgroup_annotation', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'editgroup_id', + 'annotation', + ], + 'required': [ + 'editgroup_id', + 'annotation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'editgroup_id', + ] + }, + root_map={ + 'validations': { + ('editgroup_id',): { + 'max_length': 26, + 'min_length': 26, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'editgroup_id': + (str,), + 'annotation': + (EditgroupAnnotation,), + }, + 'attribute_map': { + 'editgroup_id': 'editgroup_id', + }, + 'location_map': { + 'editgroup_id': 'path', + 'annotation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_editgroup_endpoint = _Endpoint( + settings={ + 'response_type': (Editgroup,), + 'auth': [], + 'endpoint_path': '/editgroup/{editgroup_id}', + 'operation_id': 'get_editgroup', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'editgroup_id', + ], + 'required': [ + 'editgroup_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'editgroup_id', + ] + }, + root_map={ + 'validations': { + ('editgroup_id',): { + 'max_length': 26, + 'min_length': 26, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'editgroup_id': + (str,), + }, + 'attribute_map': { + 'editgroup_id': 'editgroup_id', + }, + 'location_map': { + 'editgroup_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_editgroup_annotations_endpoint = _Endpoint( + settings={ + 'response_type': ([EditgroupAnnotation],), + 'auth': [], + 'endpoint_path': '/editgroup/{editgroup_id}/annotations', + 'operation_id': 'get_editgroup_annotations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'editgroup_id', + 'expand', + ], + 'required': [ + 'editgroup_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'editgroup_id', + ] + }, + root_map={ + 'validations': { + ('editgroup_id',): { + 'max_length': 26, + 'min_length': 26, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'editgroup_id': + (str,), + 'expand': + (str,), + }, + 'attribute_map': { + 'editgroup_id': 'editgroup_id', + 'expand': 'expand', + }, + 'location_map': { + 'editgroup_id': 'path', + 'expand': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_editgroups_reviewable_endpoint = _Endpoint( + settings={ + 'response_type': ([Editgroup],), + 'auth': [], + 'endpoint_path': '/editgroup/reviewable', + 'operation_id': 'get_editgroups_reviewable', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'expand', + 'limit', + 'before', + 'since', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'expand': + (str,), + 'limit': + (int,), + 'before': + (datetime,), + 'since': + (datetime,), + }, + 'attribute_map': { + 'expand': 'expand', + 'limit': 'limit', + 'before': 'before', + 'since': 'since', + }, + 'location_map': { + 'expand': 'query', + 'limit': 'query', + 'before': 'query', + 'since': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_editgroup_endpoint = _Endpoint( + settings={ + 'response_type': (Editgroup,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/editgroup/{editgroup_id}', + 'operation_id': 'update_editgroup', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'editgroup_id', + 'editgroup', + 'submit', + ], + 'required': [ + 'editgroup_id', + 'editgroup', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'editgroup_id', + ] + }, + root_map={ + 'validations': { + ('editgroup_id',): { + 'max_length': 26, + 'min_length': 26, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'editgroup_id': + (str,), + 'editgroup': + (Editgroup,), + 'submit': + (bool,), + }, + 'attribute_map': { + 'editgroup_id': 'editgroup_id', + 'submit': 'submit', + }, + 'location_map': { + 'editgroup_id': 'path', + 'editgroup': 'body', + 'submit': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def accept_editgroup( + self, + editgroup_id, + **kwargs + ): + """accept_editgroup # noqa: E501 + + Accept (\"merge\") the given editgroup into the catalog. The editgroup must be open (not already accepted), and the editor making this request must have the `admin` role. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.accept_editgroup(editgroup_id, async_req=True) + >>> result = thread.get() + + Args: + editgroup_id (str): base32-encoded unique identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Success + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['editgroup_id'] = \ + editgroup_id + return self.accept_editgroup_endpoint.call_with_http_info(**kwargs) + + def create_editgroup( + self, + editgroup, + **kwargs + ): + """create_editgroup # noqa: E501 + + Creates a new editgroup. By default the editor making this request will be the author of the editgroup. # 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_editgroup(editgroup, async_req=True) + >>> result = thread.get() + + Args: + editgroup (Editgroup): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Editgroup + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['editgroup'] = \ + editgroup + return self.create_editgroup_endpoint.call_with_http_info(**kwargs) + + def create_editgroup_annotation( + self, + editgroup_id, + annotation, + **kwargs + ): + """create_editgroup_annotation # noqa: E501 + + Submits a new annotation to the specified editgroup. The editgroup must be open (not already accepted). The annotation will automatically have authorship of the editor making this request. # 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_editgroup_annotation(editgroup_id, annotation, async_req=True) + >>> result = thread.get() + + Args: + editgroup_id (str): base32-encoded unique identifier + annotation (EditgroupAnnotation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + EditgroupAnnotation + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['editgroup_id'] = \ + editgroup_id + kwargs['annotation'] = \ + annotation + return self.create_editgroup_annotation_endpoint.call_with_http_info(**kwargs) + + def get_editgroup( + self, + editgroup_id, + **kwargs + ): + """get_editgroup # noqa: E501 + + Returns a single editgroup object. Unlike some similar methods, this method will return a full/expanded editgroup object, which includes edit lists of each entity type (though will not include the complete entity objects). # 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_editgroup(editgroup_id, async_req=True) + >>> result = thread.get() + + Args: + editgroup_id (str): base32-encoded unique identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Editgroup + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['editgroup_id'] = \ + editgroup_id + return self.get_editgroup_endpoint.call_with_http_info(**kwargs) + + def get_editgroup_annotations( + self, + editgroup_id, + **kwargs + ): + """get_editgroup_annotations # noqa: E501 + + Returns a list of annotations made to a specific editgroup. # 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_editgroup_annotations(editgroup_id, async_req=True) + >>> result = thread.get() + + Args: + editgroup_id (str): base32-encoded unique identifier + + Keyword Args: + expand (str): List of sub-entities to expand in response. For editgroup annotations: 'editors'. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [EditgroupAnnotation] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['editgroup_id'] = \ + editgroup_id + return self.get_editgroup_annotations_endpoint.call_with_http_info(**kwargs) + + def get_editgroups_reviewable( + self, + **kwargs + ): + """get_editgroups_reviewable # noqa: E501 + + Returns a set of editgroups which have been submitted but not yet accepted. Query parameters can be used to sort and paginate the list returned. # 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_editgroups_reviewable(async_req=True) + >>> result = thread.get() + + + Keyword Args: + expand (str): List of sub-entities to expand in response. For editgroups: 'editors'. [optional] + limit (int): Maximum number of reviewable editgroups to return in response. [optional] + before (datetime): Return only reviewable editgroups submitted *before* the given timestamp (not inclusive). Editgroups will be sorted by submission time in descending order (most recent first). For use in pagination. . [optional] + since (datetime): Return only reviewable editgroups submitted *after* the given timestamp (not inclusive). Editgroups will be sorted by submission time in ascending order (most recent last). For use in pagination. . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [Editgroup] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_editgroups_reviewable_endpoint.call_with_http_info(**kwargs) + + def update_editgroup( + self, + editgroup_id, + editgroup, + **kwargs + ): + """update_editgroup # noqa: E501 + + Updates metadata for a single editgroup object. Note that only metadata fields such as the `description` or `extra` metadata can be changed with this method; it does not allow adding or removing edits to the editgroup (for that use the individual entity create/update/delete methods). # 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_editgroup(editgroup_id, editgroup, async_req=True) + >>> result = thread.get() + + Args: + editgroup_id (str): base32-encoded unique identifier + editgroup (Editgroup): + + Keyword Args: + submit (bool): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Editgroup + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['editgroup_id'] = \ + editgroup_id + kwargs['editgroup'] = \ + editgroup + return self.update_editgroup_endpoint.call_with_http_info(**kwargs) + |