aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-07 22:37:09 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-07 22:37:09 -0700
commit7354899493f6448bed5698ad6ade1dbebcf39379 (patch)
treeb1249a0f356f4d19cbe5b1ea2a07f3ce0251538b
parentfc2025b8db9e058d429136f382749ade52df326c (diff)
downloadfatcat-7354899493f6448bed5698ad6ade1dbebcf39379.tar.gz
fatcat-7354899493f6448bed5698ad6ade1dbebcf39379.zip
TODO and comment
-rw-r--r--python/README_codegen.md10
-rw-r--r--python/fatcat_client/api/default_api.py1030
-rw-r--r--python/tests/codegen_tests/test_default_api.py60
-rw-r--r--rust/TODO2
-rw-r--r--rust/src/api_server.rs1
5 files changed, 1102 insertions, 1 deletions
diff --git a/python/README_codegen.md b/python/README_codegen.md
index 393fae32..0d072dde 100644
--- a/python/README_codegen.md
+++ b/python/README_codegen.md
@@ -80,6 +80,11 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**create_release_batch**](docs/DefaultApi.md#create_release_batch) | **POST** /release/batch |
*DefaultApi* | [**create_work**](docs/DefaultApi.md#create_work) | **POST** /work |
*DefaultApi* | [**create_work_batch**](docs/DefaultApi.md#create_work_batch) | **POST** /work/batch |
+*DefaultApi* | [**delete_container**](docs/DefaultApi.md#delete_container) | **DELETE** /container/{id} |
+*DefaultApi* | [**delete_creator**](docs/DefaultApi.md#delete_creator) | **DELETE** /creator/{id} |
+*DefaultApi* | [**delete_file**](docs/DefaultApi.md#delete_file) | **DELETE** /file/{id} |
+*DefaultApi* | [**delete_release**](docs/DefaultApi.md#delete_release) | **DELETE** /release/{id} |
+*DefaultApi* | [**delete_work**](docs/DefaultApi.md#delete_work) | **DELETE** /work/{id} |
*DefaultApi* | [**get_changelog**](docs/DefaultApi.md#get_changelog) | **GET** /changelog |
*DefaultApi* | [**get_changelog_entry**](docs/DefaultApi.md#get_changelog_entry) | **GET** /changelog/{id} |
*DefaultApi* | [**get_container**](docs/DefaultApi.md#get_container) | **GET** /container/{id} |
@@ -103,6 +108,11 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**lookup_creator**](docs/DefaultApi.md#lookup_creator) | **GET** /creator/lookup |
*DefaultApi* | [**lookup_file**](docs/DefaultApi.md#lookup_file) | **GET** /file/lookup |
*DefaultApi* | [**lookup_release**](docs/DefaultApi.md#lookup_release) | **GET** /release/lookup |
+*DefaultApi* | [**update_container**](docs/DefaultApi.md#update_container) | **PUT** /container/{id} |
+*DefaultApi* | [**update_creator**](docs/DefaultApi.md#update_creator) | **PUT** /creator/{id} |
+*DefaultApi* | [**update_file**](docs/DefaultApi.md#update_file) | **PUT** /file/{id} |
+*DefaultApi* | [**update_release**](docs/DefaultApi.md#update_release) | **PUT** /release/{id} |
+*DefaultApi* | [**update_work**](docs/DefaultApi.md#update_work) | **PUT** /work/{id} |
## Documentation For Models
diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py
index a0298750..23c8d7ca 100644
--- a/python/fatcat_client/api/default_api.py
+++ b/python/fatcat_client/api/default_api.py
@@ -1245,6 +1245,511 @@ class DefaultApi(object):
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
+ def delete_container(self, id, **kwargs): # noqa: E501
+ """delete_container # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_container(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.delete_container_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_container_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ def delete_container_with_http_info(self, id, **kwargs): # noqa: E501
+ """delete_container # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_container_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_container" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `delete_container`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/container/{id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_creator(self, id, **kwargs): # noqa: E501
+ """delete_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_creator(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.delete_creator_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_creator_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ def delete_creator_with_http_info(self, id, **kwargs): # noqa: E501
+ """delete_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_creator_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_creator" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `delete_creator`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/creator/{id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_file(self, id, **kwargs): # noqa: E501
+ """delete_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_file(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.delete_file_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_file_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ def delete_file_with_http_info(self, id, **kwargs): # noqa: E501
+ """delete_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_file_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_file" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `delete_file`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/file/{id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_release(self, id, **kwargs): # noqa: E501
+ """delete_release # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_release(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.delete_release_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_release_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ def delete_release_with_http_info(self, id, **kwargs): # noqa: E501
+ """delete_release # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_release_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_release" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `delete_release`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/release/{id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_work(self, id, **kwargs): # noqa: E501
+ """delete_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_work(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.delete_work_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_work_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ def delete_work_with_http_info(self, id, **kwargs): # noqa: E501
+ """delete_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.delete_work_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_work" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `delete_work`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/work/{id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def get_changelog(self, **kwargs): # noqa: E501
"""get_changelog # noqa: E501
@@ -3531,3 +4036,528 @@ class DefaultApi(object):
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
+
+ def update_container(self, id, entity, **kwargs): # noqa: E501
+ """update_container # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_container(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param ContainerEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.update_container_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_container_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ def update_container_with_http_info(self, id, entity, **kwargs): # noqa: E501
+ """update_container # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_container_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param ContainerEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_container" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `update_container`") # noqa: E501
+ # verify the required parameter 'entity' is set
+ if ('entity' not in params or
+ params['entity'] is None):
+ raise ValueError("Missing the required parameter `entity` when calling `update_container`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'entity' in params:
+ body_params = params['entity']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/container/{id}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_creator(self, id, entity, **kwargs): # noqa: E501
+ """update_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_creator(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param CreatorEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.update_creator_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_creator_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ def update_creator_with_http_info(self, id, entity, **kwargs): # noqa: E501
+ """update_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_creator_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param CreatorEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_creator" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `update_creator`") # noqa: E501
+ # verify the required parameter 'entity' is set
+ if ('entity' not in params or
+ params['entity'] is None):
+ raise ValueError("Missing the required parameter `entity` when calling `update_creator`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'entity' in params:
+ body_params = params['entity']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/creator/{id}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_file(self, id, entity, **kwargs): # noqa: E501
+ """update_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_file(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param FileEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.update_file_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_file_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ def update_file_with_http_info(self, id, entity, **kwargs): # noqa: E501
+ """update_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_file_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param FileEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_file" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `update_file`") # noqa: E501
+ # verify the required parameter 'entity' is set
+ if ('entity' not in params or
+ params['entity'] is None):
+ raise ValueError("Missing the required parameter `entity` when calling `update_file`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'entity' in params:
+ body_params = params['entity']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/file/{id}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_release(self, id, entity, **kwargs): # noqa: E501
+ """update_release # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_release(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param ReleaseEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.update_release_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_release_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ def update_release_with_http_info(self, id, entity, **kwargs): # noqa: E501
+ """update_release # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_release_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param ReleaseEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_release" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `update_release`") # noqa: E501
+ # verify the required parameter 'entity' is set
+ if ('entity' not in params or
+ params['entity'] is None):
+ raise ValueError("Missing the required parameter `entity` when calling `update_release`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'entity' in params:
+ body_params = params['entity']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/release/{id}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_work(self, id, entity, **kwargs): # noqa: E501
+ """update_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_work(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param WorkEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.update_work_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_work_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ def update_work_with_http_info(self, id, entity, **kwargs): # noqa: E501
+ """update_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_work_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param WorkEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # noqa: E501
+ all_params.append('async')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_work" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'id' is set
+ if ('id' not in params or
+ params['id'] is None):
+ raise ValueError("Missing the required parameter `id` when calling `update_work`") # noqa: E501
+ # verify the required parameter 'entity' is set
+ if ('entity' not in params or
+ params['entity'] is None):
+ raise ValueError("Missing the required parameter `entity` when calling `update_work`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'entity' in params:
+ body_params = params['entity']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/work/{id}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # noqa: E501
+ auth_settings=auth_settings,
+ async=params.get('async'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/python/tests/codegen_tests/test_default_api.py b/python/tests/codegen_tests/test_default_api.py
index e3008898..ec36887b 100644
--- a/python/tests/codegen_tests/test_default_api.py
+++ b/python/tests/codegen_tests/test_default_api.py
@@ -101,6 +101,36 @@ class TestDefaultApi(unittest.TestCase):
"""
pass
+ def test_delete_container(self):
+ """Test case for delete_container
+
+ """
+ pass
+
+ def test_delete_creator(self):
+ """Test case for delete_creator
+
+ """
+ pass
+
+ def test_delete_file(self):
+ """Test case for delete_file
+
+ """
+ pass
+
+ def test_delete_release(self):
+ """Test case for delete_release
+
+ """
+ pass
+
+ def test_delete_work(self):
+ """Test case for delete_work
+
+ """
+ pass
+
def test_get_changelog(self):
"""Test case for get_changelog
@@ -239,6 +269,36 @@ class TestDefaultApi(unittest.TestCase):
"""
pass
+ def test_update_container(self):
+ """Test case for update_container
+
+ """
+ pass
+
+ def test_update_creator(self):
+ """Test case for update_creator
+
+ """
+ pass
+
+ def test_update_file(self):
+ """Test case for update_file
+
+ """
+ pass
+
+ def test_update_release(self):
+ """Test case for update_release
+
+ """
+ pass
+
+ def test_update_work(self):
+ """Test case for update_work
+
+ """
+ pass
+
if __name__ == '__main__':
unittest.main()
diff --git a/rust/TODO b/rust/TODO
index ed38b915..05ad76d8 100644
--- a/rust/TODO
+++ b/rust/TODO
@@ -1,4 +1,6 @@
+- database_entity_crud -> api_entity_crud
+- merge autoaccept branch in with http-verbs branch
- fatcat_api -> fatcat_api_schema (or spec? models? types?)
- fatcat -> fatcat-api-server
- refactor rev creation (from an entity) into it's own function, across the board
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index 56fbca19..31b71395 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -39,7 +39,6 @@ macro_rules! entity_batch_handler {
if autoaccept {
let _clr: ChangelogRow = diesel::insert_into(changelog::table)
- // if autoaccept, eg_id is always Some
.values((changelog::editgroup_id.eq(edit_context.editgroup_id.to_uuid()),))
.get_result(conn)?;
}