diff options
| author | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-20 21:02:00 -0700 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-20 21:02:00 -0700 | 
| commit | 0c466a3fb52c69f352453ed0517d417fa7ff7ee1 (patch) | |
| tree | 70616b3a01fb7de9bef3e5f7b7ced8f3e90cef95 | |
| parent | f3243f752f4a1eaae8726674b1978d96ad8da2e4 (diff) | |
| download | fatcat-0c466a3fb52c69f352453ed0517d417fa7ff7ee1.tar.gz fatcat-0c466a3fb52c69f352453ed0517d417fa7ff7ee1.zip | |
codegen python client
| -rw-r--r-- | python/fatcat_client/api/default_api.py | 72 | ||||
| -rw-r--r-- | python/fatcat_client/models/changelog_entry.py | 6 | ||||
| -rw-r--r-- | python/fatcat_client/models/container_entity.py | 12 | ||||
| -rw-r--r-- | python/fatcat_client/models/creator_entity.py | 12 | ||||
| -rw-r--r-- | python/fatcat_client/models/editgroup.py | 12 | ||||
| -rw-r--r-- | python/fatcat_client/models/editor.py | 28 | ||||
| -rw-r--r-- | python/fatcat_client/models/entity_edit.py | 12 | ||||
| -rw-r--r-- | python/fatcat_client/models/file_entity.py | 12 | ||||
| -rw-r--r-- | python/fatcat_client/models/release_entity.py | 12 | ||||
| -rw-r--r-- | python/fatcat_client/models/work_entity.py | 12 | 
10 files changed, 108 insertions, 82 deletions
| diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py index f63a1daf..11e76aa4 100644 --- a/python/fatcat_client/api/default_api.py +++ b/python/fatcat_client/api/default_api.py @@ -42,7 +42,7 @@ class DefaultApi(object):          >>> result = thread.get()          :param async bool -        :param int id: (required) +        :param str id: (required)          :return: Success                   If the method is called asynchronously,                   returns the request thread. @@ -63,7 +63,7 @@ class DefaultApi(object):          >>> result = thread.get()          :param async bool -        :param int id: (required) +        :param str id: (required)          :return: Success                   If the method is called asynchronously,                   returns the request thread. @@ -1889,7 +1889,7 @@ class DefaultApi(object):          >>> result = thread.get()          :param async bool -        :param int id: (required) +        :param str id: (required)          :return: Editgroup                   If the method is called asynchronously,                   returns the request thread. @@ -1910,7 +1910,7 @@ class DefaultApi(object):          >>> result = thread.get()          :param async bool -        :param int id: (required) +        :param str id: (required)          :return: Editgroup                   If the method is called asynchronously,                   returns the request thread. @@ -1977,43 +1977,43 @@ class DefaultApi(object):              _request_timeout=params.get('_request_timeout'),              collection_formats=collection_formats) -    def get_editor(self, username, **kwargs):  # noqa: E501 +    def get_editor(self, id, **kwargs):  # noqa: E501          """get_editor  # noqa: E501          This method makes a synchronous HTTP request by default. To make an          asynchronous HTTP request, please pass async=True -        >>> thread = api.get_editor(username, async=True) +        >>> thread = api.get_editor(id, async=True)          >>> result = thread.get()          :param async bool -        :param str username: (required) +        :param str id: (required)          :return: Editor                   If the method is called asynchronously,                   returns the request thread.          """          kwargs['_return_http_data_only'] = True          if kwargs.get('async'): -            return self.get_editor_with_http_info(username, **kwargs)  # noqa: E501 +            return self.get_editor_with_http_info(id, **kwargs)  # noqa: E501          else: -            (data) = self.get_editor_with_http_info(username, **kwargs)  # noqa: E501 +            (data) = self.get_editor_with_http_info(id, **kwargs)  # noqa: E501              return data -    def get_editor_with_http_info(self, username, **kwargs):  # noqa: E501 +    def get_editor_with_http_info(self, id, **kwargs):  # noqa: E501          """get_editor  # noqa: E501          This method makes a synchronous HTTP request by default. To make an          asynchronous HTTP request, please pass async=True -        >>> thread = api.get_editor_with_http_info(username, async=True) +        >>> thread = api.get_editor_with_http_info(id, async=True)          >>> result = thread.get()          :param async bool -        :param str username: (required) +        :param str id: (required)          :return: Editor                   If the method is called asynchronously,                   returns the request thread.          """ -        all_params = ['username']  # noqa: E501 +        all_params = ['id']  # noqa: E501          all_params.append('async')          all_params.append('_return_http_data_only')          all_params.append('_preload_content') @@ -2028,16 +2028,16 @@ class DefaultApi(object):                  )              params[key] = val          del params['kwargs'] -        # verify the required parameter 'username' is set -        if ('username' not in params or -                params['username'] is None): -            raise ValueError("Missing the required parameter `username` when calling `get_editor`")  # noqa: E501 +        # 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 `get_editor`")  # noqa: E501          collection_formats = {}          path_params = {} -        if 'username' in params: -            path_params['username'] = params['username']  # noqa: E501 +        if 'id' in params: +            path_params['id'] = params['id']  # noqa: E501          query_params = [] @@ -2059,7 +2059,7 @@ class DefaultApi(object):          auth_settings = []  # noqa: E501          return self.api_client.call_api( -            '/editor/{username}', 'GET', +            '/editor/{id}', 'GET',              path_params,              query_params,              header_params, @@ -2074,43 +2074,43 @@ class DefaultApi(object):              _request_timeout=params.get('_request_timeout'),              collection_formats=collection_formats) -    def get_editor_changelog(self, username, **kwargs):  # noqa: E501 +    def get_editor_changelog(self, id, **kwargs):  # noqa: E501          """get_editor_changelog  # noqa: E501          This method makes a synchronous HTTP request by default. To make an          asynchronous HTTP request, please pass async=True -        >>> thread = api.get_editor_changelog(username, async=True) +        >>> thread = api.get_editor_changelog(id, async=True)          >>> result = thread.get()          :param async bool -        :param str username: (required) +        :param str id: (required)          :return: list[ChangelogEntry]                   If the method is called asynchronously,                   returns the request thread.          """          kwargs['_return_http_data_only'] = True          if kwargs.get('async'): -            return self.get_editor_changelog_with_http_info(username, **kwargs)  # noqa: E501 +            return self.get_editor_changelog_with_http_info(id, **kwargs)  # noqa: E501          else: -            (data) = self.get_editor_changelog_with_http_info(username, **kwargs)  # noqa: E501 +            (data) = self.get_editor_changelog_with_http_info(id, **kwargs)  # noqa: E501              return data -    def get_editor_changelog_with_http_info(self, username, **kwargs):  # noqa: E501 +    def get_editor_changelog_with_http_info(self, id, **kwargs):  # noqa: E501          """get_editor_changelog  # noqa: E501          This method makes a synchronous HTTP request by default. To make an          asynchronous HTTP request, please pass async=True -        >>> thread = api.get_editor_changelog_with_http_info(username, async=True) +        >>> thread = api.get_editor_changelog_with_http_info(id, async=True)          >>> result = thread.get()          :param async bool -        :param str username: (required) +        :param str id: (required)          :return: list[ChangelogEntry]                   If the method is called asynchronously,                   returns the request thread.          """ -        all_params = ['username']  # noqa: E501 +        all_params = ['id']  # noqa: E501          all_params.append('async')          all_params.append('_return_http_data_only')          all_params.append('_preload_content') @@ -2125,16 +2125,16 @@ class DefaultApi(object):                  )              params[key] = val          del params['kwargs'] -        # verify the required parameter 'username' is set -        if ('username' not in params or -                params['username'] is None): -            raise ValueError("Missing the required parameter `username` when calling `get_editor_changelog`")  # noqa: E501 +        # 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 `get_editor_changelog`")  # noqa: E501          collection_formats = {}          path_params = {} -        if 'username' in params: -            path_params['username'] = params['username']  # noqa: E501 +        if 'id' in params: +            path_params['id'] = params['id']  # noqa: E501          query_params = [] @@ -2156,7 +2156,7 @@ class DefaultApi(object):          auth_settings = []  # noqa: E501          return self.api_client.call_api( -            '/editor/{username}/changelog', 'GET', +            '/editor/{id}/changelog', 'GET',              path_params,              query_params,              header_params, diff --git a/python/fatcat_client/models/changelog_entry.py b/python/fatcat_client/models/changelog_entry.py index ae9925c5..26f8f8c7 100644 --- a/python/fatcat_client/models/changelog_entry.py +++ b/python/fatcat_client/models/changelog_entry.py @@ -34,7 +34,7 @@ class ChangelogEntry(object):      """      swagger_types = {          'index': 'int', -        'editgroup_id': 'int', +        'editgroup_id': 'str',          'timestamp': 'datetime',          'editgroup': 'Editgroup'      } @@ -90,7 +90,7 @@ class ChangelogEntry(object):          :return: The editgroup_id of this ChangelogEntry.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editgroup_id @@ -100,7 +100,7 @@ class ChangelogEntry(object):          :param editgroup_id: The editgroup_id of this ChangelogEntry.  # noqa: E501 -        :type: int +        :type: str          """          if editgroup_id is None:              raise ValueError("Invalid value for `editgroup_id`, must not be `None`")  # noqa: E501 diff --git a/python/fatcat_client/models/container_entity.py b/python/fatcat_client/models/container_entity.py index 969c046d..967b6de0 100644 --- a/python/fatcat_client/models/container_entity.py +++ b/python/fatcat_client/models/container_entity.py @@ -37,9 +37,9 @@ class ContainerEntity(object):          'publisher': 'str',          'name': 'str',          'extra': 'object', -        'editgroup_id': 'int', +        'editgroup_id': 'str',          'redirect': 'str', -        'revision': 'int', +        'revision': 'str',          'ident': 'str',          'state': 'str'      } @@ -230,7 +230,7 @@ class ContainerEntity(object):          :return: The editgroup_id of this ContainerEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editgroup_id @@ -240,7 +240,7 @@ class ContainerEntity(object):          :param editgroup_id: The editgroup_id of this ContainerEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._editgroup_id = editgroup_id @@ -272,7 +272,7 @@ class ContainerEntity(object):          :return: The revision of this ContainerEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._revision @@ -282,7 +282,7 @@ class ContainerEntity(object):          :param revision: The revision of this ContainerEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._revision = revision diff --git a/python/fatcat_client/models/creator_entity.py b/python/fatcat_client/models/creator_entity.py index 254e3a65..ac221f97 100644 --- a/python/fatcat_client/models/creator_entity.py +++ b/python/fatcat_client/models/creator_entity.py @@ -37,9 +37,9 @@ class CreatorEntity(object):          'display_name': 'str',          'state': 'str',          'ident': 'str', -        'revision': 'int', +        'revision': 'str',          'redirect': 'str', -        'editgroup_id': 'int', +        'editgroup_id': 'str',          'extra': 'object'      } @@ -231,7 +231,7 @@ class CreatorEntity(object):          :return: The revision of this CreatorEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._revision @@ -241,7 +241,7 @@ class CreatorEntity(object):          :param revision: The revision of this CreatorEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._revision = revision @@ -273,7 +273,7 @@ class CreatorEntity(object):          :return: The editgroup_id of this CreatorEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editgroup_id @@ -283,7 +283,7 @@ class CreatorEntity(object):          :param editgroup_id: The editgroup_id of this CreatorEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._editgroup_id = editgroup_id diff --git a/python/fatcat_client/models/editgroup.py b/python/fatcat_client/models/editgroup.py index 0855975d..e350f2e1 100644 --- a/python/fatcat_client/models/editgroup.py +++ b/python/fatcat_client/models/editgroup.py @@ -33,8 +33,8 @@ class Editgroup(object):                              and the value is json key in definition.      """      swagger_types = { -        'id': 'int', -        'editor_id': 'int', +        'id': 'str', +        'editor_id': 'str',          'description': 'str',          'extra': 'object',          'edits': 'EditgroupEdits' @@ -74,7 +74,7 @@ class Editgroup(object):          :return: The id of this Editgroup.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._id @@ -84,7 +84,7 @@ class Editgroup(object):          :param id: The id of this Editgroup.  # noqa: E501 -        :type: int +        :type: str          """          self._id = id @@ -95,7 +95,7 @@ class Editgroup(object):          :return: The editor_id of this Editgroup.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editor_id @@ -105,7 +105,7 @@ class Editgroup(object):          :param editor_id: The editor_id of this Editgroup.  # noqa: E501 -        :type: int +        :type: str          """          if editor_id is None:              raise ValueError("Invalid value for `editor_id`, must not be `None`")  # noqa: E501 diff --git a/python/fatcat_client/models/editor.py b/python/fatcat_client/models/editor.py index da2e0204..d3523090 100644 --- a/python/fatcat_client/models/editor.py +++ b/python/fatcat_client/models/editor.py @@ -31,22 +31,48 @@ class Editor(object):                              and the value is json key in definition.      """      swagger_types = { +        'id': 'str',          'username': 'str'      }      attribute_map = { +        'id': 'id',          'username': 'username'      } -    def __init__(self, username=None):  # noqa: E501 +    def __init__(self, id=None, username=None):  # noqa: E501          """Editor - a model defined in Swagger"""  # noqa: E501 +        self._id = None          self._username = None          self.discriminator = None +        if id is not None: +            self.id = id          self.username = username      @property +    def id(self): +        """Gets the id of this Editor.  # noqa: E501 + + +        :return: The id of this Editor.  # noqa: E501 +        :rtype: str +        """ +        return self._id + +    @id.setter +    def id(self, id): +        """Sets the id of this Editor. + + +        :param id: The id of this Editor.  # noqa: E501 +        :type: str +        """ + +        self._id = id + +    @property      def username(self):          """Gets the username of this Editor.  # noqa: E501 diff --git a/python/fatcat_client/models/entity_edit.py b/python/fatcat_client/models/entity_edit.py index 47437af2..d2d17d85 100644 --- a/python/fatcat_client/models/entity_edit.py +++ b/python/fatcat_client/models/entity_edit.py @@ -33,9 +33,9 @@ class EntityEdit(object):      swagger_types = {          'edit_id': 'int',          'ident': 'str', -        'revision': 'int', +        'revision': 'str',          'redirect_ident': 'str', -        'editgroup_id': 'int', +        'editgroup_id': 'str',          'extra': 'object'      } @@ -121,7 +121,7 @@ class EntityEdit(object):          :return: The revision of this EntityEdit.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._revision @@ -131,7 +131,7 @@ class EntityEdit(object):          :param revision: The revision of this EntityEdit.  # noqa: E501 -        :type: int +        :type: str          """          self._revision = revision @@ -163,7 +163,7 @@ class EntityEdit(object):          :return: The editgroup_id of this EntityEdit.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editgroup_id @@ -173,7 +173,7 @@ class EntityEdit(object):          :param editgroup_id: The editgroup_id of this EntityEdit.  # noqa: E501 -        :type: int +        :type: str          """          if editgroup_id is None:              raise ValueError("Invalid value for `editgroup_id`, must not be `None`")  # noqa: E501 diff --git a/python/fatcat_client/models/file_entity.py b/python/fatcat_client/models/file_entity.py index 070789d5..41884248 100644 --- a/python/fatcat_client/models/file_entity.py +++ b/python/fatcat_client/models/file_entity.py @@ -39,9 +39,9 @@ class FileEntity(object):          'sha1': 'str',          'size': 'int',          'extra': 'object', -        'editgroup_id': 'int', +        'editgroup_id': 'str',          'redirect': 'str', -        'revision': 'int', +        'revision': 'str',          'ident': 'str',          'state': 'str'      } @@ -281,7 +281,7 @@ class FileEntity(object):          :return: The editgroup_id of this FileEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editgroup_id @@ -291,7 +291,7 @@ class FileEntity(object):          :param editgroup_id: The editgroup_id of this FileEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._editgroup_id = editgroup_id @@ -323,7 +323,7 @@ class FileEntity(object):          :return: The revision of this FileEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._revision @@ -333,7 +333,7 @@ class FileEntity(object):          :param revision: The revision of this FileEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._revision = revision diff --git a/python/fatcat_client/models/release_entity.py b/python/fatcat_client/models/release_entity.py index c28d03f7..2c5f273d 100644 --- a/python/fatcat_client/models/release_entity.py +++ b/python/fatcat_client/models/release_entity.py @@ -51,9 +51,9 @@ class ReleaseEntity(object):          'title': 'str',          'state': 'str',          'ident': 'str', -        'revision': 'int', +        'revision': 'str',          'redirect': 'str', -        'editgroup_id': 'int', +        'editgroup_id': 'str',          'extra': 'object'      } @@ -522,7 +522,7 @@ class ReleaseEntity(object):          :return: The revision of this ReleaseEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._revision @@ -532,7 +532,7 @@ class ReleaseEntity(object):          :param revision: The revision of this ReleaseEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._revision = revision @@ -564,7 +564,7 @@ class ReleaseEntity(object):          :return: The editgroup_id of this ReleaseEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editgroup_id @@ -574,7 +574,7 @@ class ReleaseEntity(object):          :param editgroup_id: The editgroup_id of this ReleaseEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._editgroup_id = editgroup_id diff --git a/python/fatcat_client/models/work_entity.py b/python/fatcat_client/models/work_entity.py index ffdc2c43..e1c9ebdf 100644 --- a/python/fatcat_client/models/work_entity.py +++ b/python/fatcat_client/models/work_entity.py @@ -33,9 +33,9 @@ class WorkEntity(object):      swagger_types = {          'work_type': 'str',          'extra': 'object', -        'editgroup_id': 'int', +        'editgroup_id': 'str',          'redirect': 'str', -        'revision': 'int', +        'revision': 'str',          'ident': 'str',          'state': 'str'      } @@ -125,7 +125,7 @@ class WorkEntity(object):          :return: The editgroup_id of this WorkEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._editgroup_id @@ -135,7 +135,7 @@ class WorkEntity(object):          :param editgroup_id: The editgroup_id of this WorkEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._editgroup_id = editgroup_id @@ -167,7 +167,7 @@ class WorkEntity(object):          :return: The revision of this WorkEntity.  # noqa: E501 -        :rtype: int +        :rtype: str          """          return self._revision @@ -177,7 +177,7 @@ class WorkEntity(object):          :param revision: The revision of this WorkEntity.  # noqa: E501 -        :type: int +        :type: str          """          self._revision = revision | 
