commit db10cf7f02dc4b332647867a995dec3ffb6f415c Author: Vasek Sraier Date: Sun Mar 24 11:44:05 2019 +0100 generated client for Gitea 1.8.0 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a655050 --- /dev/null +++ b/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..017674f --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.4.3-SNAPSHOT \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..86211e2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/README.md b/README.md new file mode 100644 index 0000000..77e600a --- /dev/null +++ b/README.md @@ -0,0 +1,391 @@ +# swagger-client +This documentation describes the Gitea API. + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.1.1 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import swagger_client +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import swagger_client +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of the user that will own the created organization +organization = swagger_client.CreateOrgOption() # CreateOrgOption | + +try: + # Create an organization + api_response = api_instance.admin_create_org(username, organization) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_org: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AdminApi* | [**admin_create_org**](docs/AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization +*AdminApi* | [**admin_create_public_key**](docs/AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user +*AdminApi* | [**admin_create_repo**](docs/AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf a user +*AdminApi* | [**admin_create_user**](docs/AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user +*AdminApi* | [**admin_delete_user**](docs/AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user +*AdminApi* | [**admin_delete_user_public_key**](docs/AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key +*AdminApi* | [**admin_edit_user**](docs/AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +*IssueApi* | [**issue_add_label**](docs/IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue +*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{id}/times | Add a tracked time to a issue +*IssueApi* | [**issue_clear_labels**](docs/IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue +*IssueApi* | [**issue_create_comment**](docs/IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue +*IssueApi* | [**issue_create_issue**](docs/IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_create_label**](docs/IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label +*IssueApi* | [**issue_create_milestone**](docs/IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone +*IssueApi* | [**issue_delete_comment**](docs/IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment +*IssueApi* | [**issue_delete_comment_deprecated**](docs/IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment +*IssueApi* | [**issue_delete_label**](docs/IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label +*IssueApi* | [**issue_delete_milestone**](docs/IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone +*IssueApi* | [**issue_edit_comment**](docs/IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment +*IssueApi* | [**issue_edit_comment_deprecated**](docs/IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment +*IssueApi* | [**issue_edit_issue**](docs/IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_edit_issue_deadline**](docs/IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_edit_label**](docs/IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label +*IssueApi* | [**issue_edit_milestone**](docs/IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone +*IssueApi* | [**issue_get_comments**](docs/IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue +*IssueApi* | [**issue_get_issue**](docs/IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +*IssueApi* | [**issue_get_label**](docs/IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label +*IssueApi* | [**issue_get_labels**](docs/IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels +*IssueApi* | [**issue_get_milestone**](docs/IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone +*IssueApi* | [**issue_get_milestones_list**](docs/IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones +*IssueApi* | [**issue_get_repo_comments**](docs/IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository +*IssueApi* | [**issue_list_issues**](docs/IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues +*IssueApi* | [**issue_list_labels**](docs/IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels +*IssueApi* | [**issue_remove_label**](docs/IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue +*IssueApi* | [**issue_replace_labels**](docs/IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels +*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times +*MiscellaneousApi* | [**get_version**](docs/MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application +*MiscellaneousApi* | [**render_markdown**](docs/MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML +*MiscellaneousApi* | [**render_markdown_raw**](docs/MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML +*OrganizationApi* | [**create_org_repo**](docs/OrganizationApi.md#create_org_repo) | **POST** /org/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**org_add_team_member**](docs/OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member +*OrganizationApi* | [**org_add_team_repository**](docs/OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team +*OrganizationApi* | [**org_conceal_member**](docs/OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership +*OrganizationApi* | [**org_create**](docs/OrganizationApi.md#org_create) | **POST** /orgs | Create an organization +*OrganizationApi* | [**org_create_hook**](docs/OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks/ | Create a hook +*OrganizationApi* | [**org_create_team**](docs/OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team +*OrganizationApi* | [**org_delete**](docs/OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization +*OrganizationApi* | [**org_delete_hook**](docs/OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +*OrganizationApi* | [**org_delete_member**](docs/OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization +*OrganizationApi* | [**org_delete_team**](docs/OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team +*OrganizationApi* | [**org_edit**](docs/OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization +*OrganizationApi* | [**org_edit_hook**](docs/OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook +*OrganizationApi* | [**org_edit_team**](docs/OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team +*OrganizationApi* | [**org_get**](docs/OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization +*OrganizationApi* | [**org_get_hook**](docs/OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +*OrganizationApi* | [**org_get_team**](docs/OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team +*OrganizationApi* | [**org_is_member**](docs/OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization +*OrganizationApi* | [**org_is_public_member**](docs/OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization +*OrganizationApi* | [**org_list_current_user_orgs**](docs/OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations +*OrganizationApi* | [**org_list_hooks**](docs/OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks +*OrganizationApi* | [**org_list_members**](docs/OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members +*OrganizationApi* | [**org_list_public_members**](docs/OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members +*OrganizationApi* | [**org_list_repos**](docs/OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos +*OrganizationApi* | [**org_list_team_members**](docs/OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +*OrganizationApi* | [**org_list_team_repos**](docs/OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos +*OrganizationApi* | [**org_list_teams**](docs/OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams +*OrganizationApi* | [**org_list_user_orgs**](docs/OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations +*OrganizationApi* | [**org_publicize_member**](docs/OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership +*OrganizationApi* | [**org_remove_team_member**](docs/OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member +*OrganizationApi* | [**org_remove_team_repository**](docs/OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team +*RepositoryApi* | [**create_current_user_repo**](docs/RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*RepositoryApi* | [**create_fork**](docs/RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +*RepositoryApi* | [**get_tree**](docs/RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +*RepositoryApi* | [**list_forks**](docs/RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +*RepositoryApi* | [**repo_add_collaborator**](docs/RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository +*RepositoryApi* | [**repo_check_collaborator**](docs/RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +*RepositoryApi* | [**repo_create_hook**](docs/RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook +*RepositoryApi* | [**repo_create_key**](docs/RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository +*RepositoryApi* | [**repo_create_pull_request**](docs/RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request +*RepositoryApi* | [**repo_create_release**](docs/RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release +*RepositoryApi* | [**repo_create_release_attachment**](docs/RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment +*RepositoryApi* | [**repo_create_status**](docs/RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status +*RepositoryApi* | [**repo_delete**](docs/RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +*RepositoryApi* | [**repo_delete_collaborator**](docs/RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository +*RepositoryApi* | [**repo_delete_hook**](docs/RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository +*RepositoryApi* | [**repo_delete_key**](docs/RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository +*RepositoryApi* | [**repo_delete_release**](docs/RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release +*RepositoryApi* | [**repo_delete_release_attachment**](docs/RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment +*RepositoryApi* | [**repo_edit_hook**](docs/RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository +*RepositoryApi* | [**repo_edit_pull_request**](docs/RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request +*RepositoryApi* | [**repo_edit_release**](docs/RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release +*RepositoryApi* | [**repo_edit_release_attachment**](docs/RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment +*RepositoryApi* | [**repo_get**](docs/RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository +*RepositoryApi* | [**repo_get_archive**](docs/RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository +*RepositoryApi* | [**repo_get_branch**](docs/RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository +*RepositoryApi* | [**repo_get_by_id**](docs/RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id +*RepositoryApi* | [**repo_get_combined_status_by_ref**](docs/RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's combined status, by branch/tag/commit reference +*RepositoryApi* | [**repo_get_editor_config**](docs/RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository +*RepositoryApi* | [**repo_get_hook**](docs/RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +*RepositoryApi* | [**repo_get_key**](docs/RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id +*RepositoryApi* | [**repo_get_pull_request**](docs/RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +*RepositoryApi* | [**repo_get_raw_file**](docs/RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository +*RepositoryApi* | [**repo_get_release**](docs/RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release +*RepositoryApi* | [**repo_get_release_attachment**](docs/RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment +*RepositoryApi* | [**repo_list_all_git_refs**](docs/RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs +*RepositoryApi* | [**repo_list_branches**](docs/RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches +*RepositoryApi* | [**repo_list_collaborators**](docs/RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators +*RepositoryApi* | [**repo_list_git_refs**](docs/RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs +*RepositoryApi* | [**repo_list_hooks**](docs/RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository +*RepositoryApi* | [**repo_list_keys**](docs/RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys +*RepositoryApi* | [**repo_list_pull_requests**](docs/RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests +*RepositoryApi* | [**repo_list_release_attachments**](docs/RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments +*RepositoryApi* | [**repo_list_releases**](docs/RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases +*RepositoryApi* | [**repo_list_stargazers**](docs/RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers +*RepositoryApi* | [**repo_list_statuses**](docs/RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses +*RepositoryApi* | [**repo_list_subscribers**](docs/RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +*RepositoryApi* | [**repo_merge_pull_request**](docs/RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +*RepositoryApi* | [**repo_migrate**](docs/RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository +*RepositoryApi* | [**repo_mirror_sync**](docs/RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +*RepositoryApi* | [**repo_pull_request_is_merged**](docs/RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged +*RepositoryApi* | [**repo_search**](docs/RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories +*RepositoryApi* | [**repo_test_hook**](docs/RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook +*RepositoryApi* | [**repo_tracked_times**](docs/RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +*RepositoryApi* | [**topic_search**](docs/RepositoryApi.md#topic_search) | **GET** /topics/search | search topics via keyword +*RepositoryApi* | [**user_current_check_subscription**](docs/RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo +*RepositoryApi* | [**user_current_delete_subscription**](docs/RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo +*RepositoryApi* | [**user_current_put_subscription**](docs/RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo +*UserApi* | [**create_current_user_repo**](docs/UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*UserApi* | [**user_add_email**](docs/UserApi.md#user_add_email) | **POST** /user/emails | Add email addresses +*UserApi* | [**user_check_following**](docs/UserApi.md#user_check_following) | **GET** /users/{follower}/following/{followee} | Check if one user is following another user +*UserApi* | [**user_create_token**](docs/UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Create an access token +*UserApi* | [**user_current_check_following**](docs/UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user +*UserApi* | [**user_current_check_starring**](docs/UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo +*UserApi* | [**user_current_delete_follow**](docs/UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user +*UserApi* | [**user_current_delete_gpg_key**](docs/UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG key +*UserApi* | [**user_current_delete_key**](docs/UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key +*UserApi* | [**user_current_delete_star**](docs/UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo +*UserApi* | [**user_current_get_gpg_key**](docs/UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key +*UserApi* | [**user_current_get_key**](docs/UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key +*UserApi* | [**user_current_list_followers**](docs/UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers +*UserApi* | [**user_current_list_following**](docs/UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following +*UserApi* | [**user_current_list_gpg_keys**](docs/UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys +*UserApi* | [**user_current_list_keys**](docs/UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys +*UserApi* | [**user_current_list_repos**](docs/UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns or has access to +*UserApi* | [**user_current_list_starred**](docs/UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred +*UserApi* | [**user_current_list_subscriptions**](docs/UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user +*UserApi* | [**user_current_post_gpg_key**](docs/UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Create a GPG key +*UserApi* | [**user_current_post_key**](docs/UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key +*UserApi* | [**user_current_put_follow**](docs/UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user +*UserApi* | [**user_current_put_star**](docs/UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo +*UserApi* | [**user_current_tracked_times**](docs/UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times +*UserApi* | [**user_delete_access_token**](docs/UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | delete an access token +*UserApi* | [**user_delete_email**](docs/UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses +*UserApi* | [**user_get**](docs/UserApi.md#user_get) | **GET** /users/{username} | Get a user +*UserApi* | [**user_get_current**](docs/UserApi.md#user_get_current) | **GET** /user | Get the authenticated user +*UserApi* | [**user_get_heatmap_data**](docs/UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap +*UserApi* | [**user_get_tokens**](docs/UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens +*UserApi* | [**user_list_emails**](docs/UserApi.md#user_list_emails) | **GET** /user/emails | List the authenticated user's email addresses +*UserApi* | [**user_list_followers**](docs/UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers +*UserApi* | [**user_list_following**](docs/UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following +*UserApi* | [**user_list_gpg_keys**](docs/UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +*UserApi* | [**user_list_keys**](docs/UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys +*UserApi* | [**user_list_repos**](docs/UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user +*UserApi* | [**user_list_starred**](docs/UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred +*UserApi* | [**user_list_subscriptions**](docs/UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user +*UserApi* | [**user_search**](docs/UserApi.md#user_search) | **GET** /users/search | Search for users +*UserApi* | [**user_tracked_times**](docs/UserApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo + + +## Documentation For Models + + - [AccessToken](docs/AccessToken.md) + - [AddCollaboratorOption](docs/AddCollaboratorOption.md) + - [AddTimeOption](docs/AddTimeOption.md) + - [Attachment](docs/Attachment.md) + - [Branch](docs/Branch.md) + - [Comment](docs/Comment.md) + - [CreateEmailOption](docs/CreateEmailOption.md) + - [CreateForkOption](docs/CreateForkOption.md) + - [CreateGPGKeyOption](docs/CreateGPGKeyOption.md) + - [CreateHookOption](docs/CreateHookOption.md) + - [CreateIssueCommentOption](docs/CreateIssueCommentOption.md) + - [CreateIssueOption](docs/CreateIssueOption.md) + - [CreateKeyOption](docs/CreateKeyOption.md) + - [CreateLabelOption](docs/CreateLabelOption.md) + - [CreateMilestoneOption](docs/CreateMilestoneOption.md) + - [CreateOrgOption](docs/CreateOrgOption.md) + - [CreatePullRequestOption](docs/CreatePullRequestOption.md) + - [CreateReleaseOption](docs/CreateReleaseOption.md) + - [CreateRepoOption](docs/CreateRepoOption.md) + - [CreateStatusOption](docs/CreateStatusOption.md) + - [CreateTeamOption](docs/CreateTeamOption.md) + - [CreateUserOption](docs/CreateUserOption.md) + - [DeleteEmailOption](docs/DeleteEmailOption.md) + - [DeployKey](docs/DeployKey.md) + - [EditAttachmentOptions](docs/EditAttachmentOptions.md) + - [EditDeadlineOption](docs/EditDeadlineOption.md) + - [EditHookOption](docs/EditHookOption.md) + - [EditIssueCommentOption](docs/EditIssueCommentOption.md) + - [EditIssueOption](docs/EditIssueOption.md) + - [EditLabelOption](docs/EditLabelOption.md) + - [EditMilestoneOption](docs/EditMilestoneOption.md) + - [EditOrgOption](docs/EditOrgOption.md) + - [EditPullRequestOption](docs/EditPullRequestOption.md) + - [EditReleaseOption](docs/EditReleaseOption.md) + - [EditTeamOption](docs/EditTeamOption.md) + - [EditUserOption](docs/EditUserOption.md) + - [Email](docs/Email.md) + - [GPGKey](docs/GPGKey.md) + - [GPGKeyEmail](docs/GPGKeyEmail.md) + - [GitEntry](docs/GitEntry.md) + - [GitObject](docs/GitObject.md) + - [GitTreeResponse](docs/GitTreeResponse.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [Issue](docs/Issue.md) + - [IssueDeadline](docs/IssueDeadline.md) + - [IssueLabelsOption](docs/IssueLabelsOption.md) + - [Label](docs/Label.md) + - [MarkdownOption](docs/MarkdownOption.md) + - [MigrateRepoForm](docs/MigrateRepoForm.md) + - [Milestone](docs/Milestone.md) + - [Organization](docs/Organization.md) + - [PRBranchInfo](docs/PRBranchInfo.md) + - [PayloadCommit](docs/PayloadCommit.md) + - [PayloadCommitVerification](docs/PayloadCommitVerification.md) + - [PayloadUser](docs/PayloadUser.md) + - [Permission](docs/Permission.md) + - [PublicKey](docs/PublicKey.md) + - [PullRequest](docs/PullRequest.md) + - [PullRequestMeta](docs/PullRequestMeta.md) + - [Reference](docs/Reference.md) + - [Release](docs/Release.md) + - [Repository](docs/Repository.md) + - [SearchResults](docs/SearchResults.md) + - [ServerVersion](docs/ServerVersion.md) + - [StateType](docs/StateType.md) + - [Status](docs/Status.md) + - [StatusState](docs/StatusState.md) + - [Team](docs/Team.md) + - [TimeStamp](docs/TimeStamp.md) + - [TrackedTime](docs/TrackedTime.md) + - [User](docs/User.md) + - [UserHeatmapData](docs/UserHeatmapData.md) + - [WatchInfo](docs/WatchInfo.md) + + +## Documentation For Authorization + + +## AccessToken + +- **Type**: API key +- **API key parameter name**: access_token +- **Location**: URL query string + +## AuthorizationHeaderToken + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +## BasicAuth + +- **Type**: HTTP basic authentication + +## SudoHeader + +- **Type**: API key +- **API key parameter name**: Sudo +- **Location**: HTTP header + +## SudoParam + +- **Type**: API key +- **API key parameter name**: sudo +- **Location**: URL query string + +## Token + +- **Type**: API key +- **API key parameter name**: token +- **Location**: URL query string + + +## Author + + + diff --git a/docs/AccessToken.md b/docs/AccessToken.md new file mode 100644 index 0000000..57c010b --- /dev/null +++ b/docs/AccessToken.md @@ -0,0 +1,10 @@ +# AccessToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddCollaboratorOption.md b/docs/AddCollaboratorOption.md new file mode 100644 index 0000000..c490957 --- /dev/null +++ b/docs/AddCollaboratorOption.md @@ -0,0 +1,10 @@ +# AddCollaboratorOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permission** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddTimeOption.md b/docs/AddTimeOption.md new file mode 100644 index 0000000..dc7c234 --- /dev/null +++ b/docs/AddTimeOption.md @@ -0,0 +1,10 @@ +# AddTimeOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | time in seconds | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminApi.md b/docs/AdminApi.md new file mode 100644 index 0000000..f4ed360 --- /dev/null +++ b/docs/AdminApi.md @@ -0,0 +1,555 @@ +# swagger_client.AdminApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**admin_create_org**](AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization +[**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user +[**admin_create_repo**](AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf a user +[**admin_create_user**](AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user +[**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user +[**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key +[**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user + + +# **admin_create_org** +> Organization admin_create_org(username, organization) + +Create an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of the user that will own the created organization +organization = swagger_client.CreateOrgOption() # CreateOrgOption | + +try: + # Create an organization + api_response = api_instance.admin_create_org(username, organization) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_org: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of the user that will own the created organization | + **organization** | [**CreateOrgOption**](CreateOrgOption.md)| | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **admin_create_public_key** +> PublicKey admin_create_public_key(username, key=key) + +Add a public key on behalf of a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of the user +key = swagger_client.CreateKeyOption() # CreateKeyOption | (optional) + +try: + # Add a public key on behalf of a user + api_response = api_instance.admin_create_public_key(username, key=key) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_public_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of the user | + **key** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + +### Return type + +[**PublicKey**](PublicKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **admin_create_repo** +> Repository admin_create_repo(username, repository) + +Create a repository on behalf a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of the user. This user will own the created repository +repository = swagger_client.CreateRepoOption() # CreateRepoOption | + +try: + # Create a repository on behalf a user + api_response = api_instance.admin_create_repo(username, repository) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of the user. This user will own the created repository | + **repository** | [**CreateRepoOption**](CreateRepoOption.md)| | + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **admin_create_user** +> User admin_create_user(body=body) + +Create a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +body = swagger_client.CreateUserOption() # CreateUserOption | (optional) + +try: + # Create a user + api_response = api_instance.admin_create_user(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateUserOption**](CreateUserOption.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **admin_delete_user** +> admin_delete_user(username) + +Delete a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user to delete + +try: + # Delete a user + api_instance.admin_delete_user(username) +except ApiException as e: + print("Exception when calling AdminApi->admin_delete_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **admin_delete_user_public_key** +> admin_delete_user_public_key(username, id) + +Delete a user's public key + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user +id = 789 # int | id of the key to delete + +try: + # Delete a user's public key + api_instance.admin_delete_user_public_key(username, id) +except ApiException as e: + print("Exception when calling AdminApi->admin_delete_user_public_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **id** | **int**| id of the key to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **admin_edit_user** +> User admin_edit_user(username, body=body) + +Edit an existing user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user to edit +body = swagger_client.EditUserOption() # EditUserOption | (optional) + +try: + # Edit an existing user + api_response = api_instance.admin_edit_user(username, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_edit_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to edit | + **body** | [**EditUserOption**](EditUserOption.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Attachment.md b/docs/Attachment.md new file mode 100644 index 0000000..d5ea21c --- /dev/null +++ b/docs/Attachment.md @@ -0,0 +1,16 @@ +# Attachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**browser_download_url** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**download_count** | **int** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**size** | **int** | | [optional] +**uuid** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Branch.md b/docs/Branch.md new file mode 100644 index 0000000..e2add78 --- /dev/null +++ b/docs/Branch.md @@ -0,0 +1,11 @@ +# Branch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**PayloadCommit**](PayloadCommit.md) | | [optional] +**name** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Comment.md b/docs/Comment.md new file mode 100644 index 0000000..462fe3b --- /dev/null +++ b/docs/Comment.md @@ -0,0 +1,17 @@ +# Comment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**issue_url** | **str** | | [optional] +**pull_request_url** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateEmailOption.md b/docs/CreateEmailOption.md new file mode 100644 index 0000000..9d48586 --- /dev/null +++ b/docs/CreateEmailOption.md @@ -0,0 +1,10 @@ +# CreateEmailOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **list[str]** | email addresses to add | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateForkOption.md b/docs/CreateForkOption.md new file mode 100644 index 0000000..a7a9286 --- /dev/null +++ b/docs/CreateForkOption.md @@ -0,0 +1,10 @@ +# CreateForkOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization** | **str** | organization name, if forking into an organization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGPGKeyOption.md b/docs/CreateGPGKeyOption.md new file mode 100644 index 0000000..2b1ce73 --- /dev/null +++ b/docs/CreateGPGKeyOption.md @@ -0,0 +1,10 @@ +# CreateGPGKeyOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**armored_public_key** | **str** | An armored GPG key to add | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateHookOption.md b/docs/CreateHookOption.md new file mode 100644 index 0000000..873b1cc --- /dev/null +++ b/docs/CreateHookOption.md @@ -0,0 +1,13 @@ +# CreateHookOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] [default to False] +**config** | **dict(str, str)** | | +**events** | **list[str]** | | [optional] +**type** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateIssueCommentOption.md b/docs/CreateIssueCommentOption.md new file mode 100644 index 0000000..734f961 --- /dev/null +++ b/docs/CreateIssueCommentOption.md @@ -0,0 +1,10 @@ +# CreateIssueCommentOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateIssueOption.md b/docs/CreateIssueOption.md new file mode 100644 index 0000000..132a223 --- /dev/null +++ b/docs/CreateIssueOption.md @@ -0,0 +1,17 @@ +# CreateIssueOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | **str** | username of assignee | [optional] +**assignees** | **list[str]** | | [optional] +**body** | **str** | | [optional] +**closed** | **bool** | | [optional] +**due_date** | **datetime** | | [optional] +**labels** | **list[int]** | list of label ids | [optional] +**milestone** | **int** | milestone id | [optional] +**title** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateKeyOption.md b/docs/CreateKeyOption.md new file mode 100644 index 0000000..24a05fe --- /dev/null +++ b/docs/CreateKeyOption.md @@ -0,0 +1,12 @@ +# CreateKeyOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | An armored SSH key to add | +**read_only** | **bool** | Describe if the key has only read access or read/write | [optional] +**title** | **str** | Title of the key to add | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateLabelOption.md b/docs/CreateLabelOption.md new file mode 100644 index 0000000..9984511 --- /dev/null +++ b/docs/CreateLabelOption.md @@ -0,0 +1,11 @@ +# CreateLabelOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | +**name** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateMilestoneOption.md b/docs/CreateMilestoneOption.md new file mode 100644 index 0000000..9344912 --- /dev/null +++ b/docs/CreateMilestoneOption.md @@ -0,0 +1,12 @@ +# CreateMilestoneOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**due_on** | **datetime** | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateOrgOption.md b/docs/CreateOrgOption.md new file mode 100644 index 0000000..0952b27 --- /dev/null +++ b/docs/CreateOrgOption.md @@ -0,0 +1,14 @@ +# CreateOrgOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**username** | **str** | | +**website** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatePullRequestOption.md b/docs/CreatePullRequestOption.md new file mode 100644 index 0000000..809043b --- /dev/null +++ b/docs/CreatePullRequestOption.md @@ -0,0 +1,18 @@ +# CreatePullRequestOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**base** | **str** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**head** | **str** | | [optional] +**labels** | **list[int]** | | [optional] +**milestone** | **int** | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateReleaseOption.md b/docs/CreateReleaseOption.md new file mode 100644 index 0000000..2a05830 --- /dev/null +++ b/docs/CreateReleaseOption.md @@ -0,0 +1,15 @@ +# CreateReleaseOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**draft** | **bool** | | [optional] +**name** | **str** | | [optional] +**prerelease** | **bool** | | [optional] +**tag_name** | **str** | | +**target_commitish** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRepoOption.md b/docs/CreateRepoOption.md new file mode 100644 index 0000000..9f8a314 --- /dev/null +++ b/docs/CreateRepoOption.md @@ -0,0 +1,16 @@ +# CreateRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_init** | **bool** | Whether the repository should be auto-intialized? | [optional] +**description** | **str** | Description of the repository to create | [optional] +**gitignores** | **str** | Gitignores to use | [optional] +**license** | **str** | License to use | [optional] +**name** | **str** | Name of the repository to create | +**private** | **bool** | Whether the repository is private | [optional] +**readme** | **str** | Readme of the repository to create | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateStatusOption.md b/docs/CreateStatusOption.md new file mode 100644 index 0000000..41537c9 --- /dev/null +++ b/docs/CreateStatusOption.md @@ -0,0 +1,13 @@ +# CreateStatusOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **str** | | [optional] +**description** | **str** | | [optional] +**state** | [**StatusState**](StatusState.md) | | [optional] +**target_url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTeamOption.md b/docs/CreateTeamOption.md new file mode 100644 index 0000000..08850ef --- /dev/null +++ b/docs/CreateTeamOption.md @@ -0,0 +1,13 @@ +# CreateTeamOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**name** | **str** | | +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUserOption.md b/docs/CreateUserOption.md new file mode 100644 index 0000000..c2195c3 --- /dev/null +++ b/docs/CreateUserOption.md @@ -0,0 +1,16 @@ +# CreateUserOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**full_name** | **str** | | [optional] +**login_name** | **str** | | [optional] +**password** | **str** | | +**send_notify** | **bool** | | [optional] +**source_id** | **int** | | [optional] +**username** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteEmailOption.md b/docs/DeleteEmailOption.md new file mode 100644 index 0000000..9d5ab95 --- /dev/null +++ b/docs/DeleteEmailOption.md @@ -0,0 +1,10 @@ +# DeleteEmailOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **list[str]** | email addresses to delete | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeployKey.md b/docs/DeployKey.md new file mode 100644 index 0000000..14d1c6b --- /dev/null +++ b/docs/DeployKey.md @@ -0,0 +1,18 @@ +# DeployKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | [optional] +**fingerprint** | **str** | | [optional] +**id** | **int** | | [optional] +**key** | **str** | | [optional] +**key_id** | **int** | | [optional] +**read_only** | **bool** | | [optional] +**repository** | [**Repository**](Repository.md) | | [optional] +**title** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditAttachmentOptions.md b/docs/EditAttachmentOptions.md new file mode 100644 index 0000000..00cac9b --- /dev/null +++ b/docs/EditAttachmentOptions.md @@ -0,0 +1,10 @@ +# EditAttachmentOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditDeadlineOption.md b/docs/EditDeadlineOption.md new file mode 100644 index 0000000..3e7522c --- /dev/null +++ b/docs/EditDeadlineOption.md @@ -0,0 +1,10 @@ +# EditDeadlineOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**due_date** | **datetime** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditHookOption.md b/docs/EditHookOption.md new file mode 100644 index 0000000..9ef96f9 --- /dev/null +++ b/docs/EditHookOption.md @@ -0,0 +1,12 @@ +# EditHookOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] +**config** | **dict(str, str)** | | [optional] +**events** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditIssueCommentOption.md b/docs/EditIssueCommentOption.md new file mode 100644 index 0000000..7641825 --- /dev/null +++ b/docs/EditIssueCommentOption.md @@ -0,0 +1,10 @@ +# EditIssueCommentOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditIssueOption.md b/docs/EditIssueOption.md new file mode 100644 index 0000000..13702e9 --- /dev/null +++ b/docs/EditIssueOption.md @@ -0,0 +1,16 @@ +# EditIssueOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**milestone** | **int** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditLabelOption.md b/docs/EditLabelOption.md new file mode 100644 index 0000000..b6d8351 --- /dev/null +++ b/docs/EditLabelOption.md @@ -0,0 +1,11 @@ +# EditLabelOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | [optional] +**name** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditMilestoneOption.md b/docs/EditMilestoneOption.md new file mode 100644 index 0000000..d6dba97 --- /dev/null +++ b/docs/EditMilestoneOption.md @@ -0,0 +1,13 @@ +# EditMilestoneOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**due_on** | **datetime** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditOrgOption.md b/docs/EditOrgOption.md new file mode 100644 index 0000000..07b1241 --- /dev/null +++ b/docs/EditOrgOption.md @@ -0,0 +1,13 @@ +# EditOrgOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**website** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditPullRequestOption.md b/docs/EditPullRequestOption.md new file mode 100644 index 0000000..393261d --- /dev/null +++ b/docs/EditPullRequestOption.md @@ -0,0 +1,17 @@ +# EditPullRequestOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**labels** | **list[int]** | | [optional] +**milestone** | **int** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditReleaseOption.md b/docs/EditReleaseOption.md new file mode 100644 index 0000000..8a29e5a --- /dev/null +++ b/docs/EditReleaseOption.md @@ -0,0 +1,15 @@ +# EditReleaseOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**draft** | **bool** | | [optional] +**name** | **str** | | [optional] +**prerelease** | **bool** | | [optional] +**tag_name** | **str** | | [optional] +**target_commitish** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditTeamOption.md b/docs/EditTeamOption.md new file mode 100644 index 0000000..dd884db --- /dev/null +++ b/docs/EditTeamOption.md @@ -0,0 +1,13 @@ +# EditTeamOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**name** | **str** | | +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditUserOption.md b/docs/EditUserOption.md new file mode 100644 index 0000000..a82eafd --- /dev/null +++ b/docs/EditUserOption.md @@ -0,0 +1,23 @@ +# EditUserOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] +**admin** | **bool** | | [optional] +**allow_create_organization** | **bool** | | [optional] +**allow_git_hook** | **bool** | | [optional] +**allow_import_local** | **bool** | | [optional] +**email** | **str** | | +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**login_name** | **str** | | [optional] +**max_repo_creation** | **int** | | [optional] +**password** | **str** | | [optional] +**prohibit_login** | **bool** | | [optional] +**source_id** | **int** | | [optional] +**website** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Email.md b/docs/Email.md new file mode 100644 index 0000000..104694e --- /dev/null +++ b/docs/Email.md @@ -0,0 +1,12 @@ +# Email + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**primary** | **bool** | | [optional] +**verified** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GPGKey.md b/docs/GPGKey.md new file mode 100644 index 0000000..264a52e --- /dev/null +++ b/docs/GPGKey.md @@ -0,0 +1,21 @@ +# GPGKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_certify** | **bool** | | [optional] +**can_encrypt_comms** | **bool** | | [optional] +**can_encrypt_storage** | **bool** | | [optional] +**can_sign** | **bool** | | [optional] +**created_at** | **datetime** | | [optional] +**emails** | [**list[GPGKeyEmail]**](GPGKeyEmail.md) | | [optional] +**expires_at** | **datetime** | | [optional] +**id** | **int** | | [optional] +**key_id** | **str** | | [optional] +**primary_key_id** | **str** | | [optional] +**public_key** | **str** | | [optional] +**subkeys** | [**list[GPGKey]**](GPGKey.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GPGKeyEmail.md b/docs/GPGKeyEmail.md new file mode 100644 index 0000000..25ad93f --- /dev/null +++ b/docs/GPGKeyEmail.md @@ -0,0 +1,11 @@ +# GPGKeyEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**verified** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GitEntry.md b/docs/GitEntry.md new file mode 100644 index 0000000..7ebdf32 --- /dev/null +++ b/docs/GitEntry.md @@ -0,0 +1,15 @@ +# GitEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | | [optional] +**path** | **str** | | [optional] +**sha** | **str** | | [optional] +**size** | **int** | | [optional] +**type** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GitObject.md b/docs/GitObject.md new file mode 100644 index 0000000..5052dd5 --- /dev/null +++ b/docs/GitObject.md @@ -0,0 +1,12 @@ +# GitObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha** | **str** | | [optional] +**type** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GitTreeResponse.md b/docs/GitTreeResponse.md new file mode 100644 index 0000000..1d01f2b --- /dev/null +++ b/docs/GitTreeResponse.md @@ -0,0 +1,13 @@ +# GitTreeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha** | **str** | | [optional] +**tree** | [**list[GitEntry]**](GitEntry.md) | | [optional] +**truncated** | **bool** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..7fee8ea --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,11 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[User]**](User.md) | | [optional] +**ok** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Issue.md b/docs/Issue.md new file mode 100644 index 0000000..ffd6ebd --- /dev/null +++ b/docs/Issue.md @@ -0,0 +1,26 @@ +# Issue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | [**User**](User.md) | | [optional] +**assignees** | [**list[User]**](User.md) | | [optional] +**body** | **str** | | [optional] +**closed_at** | **datetime** | | [optional] +**comments** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**due_date** | **datetime** | | [optional] +**id** | **int** | | [optional] +**labels** | [**list[Label]**](Label.md) | | [optional] +**milestone** | [**Milestone**](Milestone.md) | | [optional] +**number** | **int** | | [optional] +**pull_request** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IssueApi.md b/docs/IssueApi.md new file mode 100644 index 0000000..99c2404 --- /dev/null +++ b/docs/IssueApi.md @@ -0,0 +1,2379 @@ +# swagger_client.IssueApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**issue_add_label**](IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue +[**issue_add_time**](IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{id}/times | Add a tracked time to a issue +[**issue_clear_labels**](IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue +[**issue_create_comment**](IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue +[**issue_create_issue**](IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. +[**issue_create_label**](IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label +[**issue_create_milestone**](IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone +[**issue_delete_comment**](IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment +[**issue_delete_comment_deprecated**](IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment +[**issue_delete_label**](IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label +[**issue_delete_milestone**](IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone +[**issue_edit_comment**](IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment +[**issue_edit_comment_deprecated**](IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment +[**issue_edit_issue**](IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. +[**issue_edit_issue_deadline**](IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. +[**issue_edit_label**](IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label +[**issue_edit_milestone**](IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone +[**issue_get_comments**](IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue +[**issue_get_issue**](IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +[**issue_get_label**](IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label +[**issue_get_labels**](IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels +[**issue_get_milestone**](IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone +[**issue_get_milestones_list**](IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones +[**issue_get_repo_comments**](IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository +[**issue_list_issues**](IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues +[**issue_list_labels**](IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels +[**issue_remove_label**](IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue +[**issue_replace_labels**](IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels +[**issue_tracked_times**](IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times + + +# **issue_add_label** +> list[Label] issue_add_label(owner, repo, index, body=body) + +Add a label to an issue + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +body = swagger_client.IssueLabelsOption() # IssueLabelsOption | (optional) + +try: + # Add a label to an issue + api_response = api_instance.issue_add_label(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_add_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **body** | [**IssueLabelsOption**](IssueLabelsOption.md)| | [optional] + +### Return type + +[**list[Label]**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_add_time** +> TrackedTime issue_add_time(owner, repo, id, body=body) + +Add a tracked time to a issue + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | index of the issue to add tracked time to +body = swagger_client.AddTimeOption() # AddTimeOption | (optional) + +try: + # Add a tracked time to a issue + api_response = api_instance.issue_add_time(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_add_time: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| index of the issue to add tracked time to | + **body** | [**AddTimeOption**](AddTimeOption.md)| | [optional] + +### Return type + +[**TrackedTime**](TrackedTime.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_clear_labels** +> issue_clear_labels(owner, repo, index) + +Remove all labels from an issue + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue + +try: + # Remove all labels from an issue + api_instance.issue_clear_labels(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_clear_labels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_create_comment** +> Comment issue_create_comment(owner, repo, index, body=body) + +Add a comment to an issue + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +body = swagger_client.CreateIssueCommentOption() # CreateIssueCommentOption | (optional) + +try: + # Add a comment to an issue + api_response = api_instance.issue_create_comment(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **body** | [**CreateIssueCommentOption**](CreateIssueCommentOption.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_create_issue** +> Issue issue_create_issue(owner, repo, body=body) + +Create an issue. If using deadline only the date will be taken into account, and time of day ignored. + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = swagger_client.CreateIssueOption() # CreateIssueOption | (optional) + +try: + # Create an issue. If using deadline only the date will be taken into account, and time of day ignored. + api_response = api_instance.issue_create_issue(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_issue: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateIssueOption**](CreateIssueOption.md)| | [optional] + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_create_label** +> Label issue_create_label(owner, repo, body=body) + +Create a label + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = swagger_client.CreateLabelOption() # CreateLabelOption | (optional) + +try: + # Create a label + api_response = api_instance.issue_create_label(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateLabelOption**](CreateLabelOption.md)| | [optional] + +### Return type + +[**Label**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_create_milestone** +> Milestone issue_create_milestone(owner, repo, body=body) + +Create a milestone + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = swagger_client.CreateMilestoneOption() # CreateMilestoneOption | (optional) + +try: + # Create a milestone + api_response = api_instance.issue_create_milestone(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_milestone: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateMilestoneOption**](CreateMilestoneOption.md)| | [optional] + +### Return type + +[**Milestone**](Milestone.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_delete_comment** +> issue_delete_comment(owner, repo, id) + +Delete a comment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of comment to delete + +try: + # Delete a comment + api_instance.issue_delete_comment(owner, repo, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of comment to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_delete_comment_deprecated** +> issue_delete_comment_deprecated(owner, repo, index, id) + +Delete a comment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 56 # int | this parameter is ignored +id = 789 # int | id of comment to delete + +try: + # Delete a comment + api_instance.issue_delete_comment_deprecated(owner, repo, index, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_comment_deprecated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| this parameter is ignored | + **id** | **int**| id of comment to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_delete_label** +> issue_delete_label(owner, repo, id) + +Delete a label + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the label to delete + +try: + # Delete a label + api_instance.issue_delete_label(owner, repo, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the label to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_delete_milestone** +> issue_delete_milestone(owner, repo, id) + +Delete a milestone + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the milestone to delete + +try: + # Delete a milestone + api_instance.issue_delete_milestone(owner, repo, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_milestone: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the milestone to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_comment** +> Comment issue_edit_comment(owner, repo, id, body=body) + +Edit a comment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the comment to edit +body = swagger_client.EditIssueCommentOption() # EditIssueCommentOption | (optional) + +try: + # Edit a comment + api_response = api_instance.issue_edit_comment(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the comment to edit | + **body** | [**EditIssueCommentOption**](EditIssueCommentOption.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_comment_deprecated** +> Comment issue_edit_comment_deprecated(owner, repo, index, id, body=body) + +Edit a comment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 56 # int | this parameter is ignored +id = 789 # int | id of the comment to edit +body = swagger_client.EditIssueCommentOption() # EditIssueCommentOption | (optional) + +try: + # Edit a comment + api_response = api_instance.issue_edit_comment_deprecated(owner, repo, index, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_comment_deprecated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| this parameter is ignored | + **id** | **int**| id of the comment to edit | + **body** | [**EditIssueCommentOption**](EditIssueCommentOption.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_issue** +> Issue issue_edit_issue(owner, repo, index, body=body) + +Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue to edit +body = swagger_client.EditIssueOption() # EditIssueOption | (optional) + +try: + # Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. + api_response = api_instance.issue_edit_issue(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_issue: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue to edit | + **body** | [**EditIssueOption**](EditIssueOption.md)| | [optional] + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_issue_deadline** +> IssueDeadline issue_edit_issue_deadline(owner, repo, index, body=body) + +Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue to create or update a deadline on +body = swagger_client.EditDeadlineOption() # EditDeadlineOption | (optional) + +try: + # Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. + api_response = api_instance.issue_edit_issue_deadline(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_issue_deadline: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue to create or update a deadline on | + **body** | [**EditDeadlineOption**](EditDeadlineOption.md)| | [optional] + +### Return type + +[**IssueDeadline**](IssueDeadline.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_label** +> Label issue_edit_label(owner, repo, id, body=body) + +Update a label + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the label to edit +body = swagger_client.EditLabelOption() # EditLabelOption | (optional) + +try: + # Update a label + api_response = api_instance.issue_edit_label(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the label to edit | + **body** | [**EditLabelOption**](EditLabelOption.md)| | [optional] + +### Return type + +[**Label**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_milestone** +> Milestone issue_edit_milestone(owner, repo, id, body=body) + +Update a milestone + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the milestone +body = swagger_client.EditMilestoneOption() # EditMilestoneOption | (optional) + +try: + # Update a milestone + api_response = api_instance.issue_edit_milestone(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_milestone: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the milestone | + **body** | [**EditMilestoneOption**](EditMilestoneOption.md)| | [optional] + +### Return type + +[**Milestone**](Milestone.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_comments** +> list[Comment] issue_get_comments(owner, repo, index, since=since) + +List all comments on an issue + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +since = 'since_example' # str | if provided, only comments updated since the specified time are returned. (optional) + +try: + # List all comments on an issue + api_response = api_instance.issue_get_comments(owner, repo, index, since=since) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_comments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **since** | **str**| if provided, only comments updated since the specified time are returned. | [optional] + +### Return type + +[**list[Comment]**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_issue** +> Issue issue_get_issue(owner, repo, index) + +Get an issue + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue to get + +try: + # Get an issue + api_response = api_instance.issue_get_issue(owner, repo, index) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_issue: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue to get | + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_label** +> Label issue_get_label(owner, repo, id) + +Get a single label + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the label to get + +try: + # Get a single label + api_response = api_instance.issue_get_label(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the label to get | + +### Return type + +[**Label**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_labels** +> list[Label] issue_get_labels(owner, repo, index) + +Get an issue's labels + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue + +try: + # Get an issue's labels + api_response = api_instance.issue_get_labels(owner, repo, index) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_labels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + +### Return type + +[**list[Label]**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_milestone** +> Milestone issue_get_milestone(owner, repo, id) + +Get a milestone + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the milestone + +try: + # Get a milestone + api_response = api_instance.issue_get_milestone(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_milestone: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the milestone | + +### Return type + +[**Milestone**](Milestone.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_milestones_list** +> list[Milestone] issue_get_milestones_list(owner, repo) + +Get all of a repository's opened milestones + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get all of a repository's opened milestones + api_response = api_instance.issue_get_milestones_list(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_milestones_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Milestone]**](Milestone.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_repo_comments** +> list[Comment] issue_get_repo_comments(owner, repo, since=since) + +List all comments in a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +since = 'since_example' # str | if provided, only comments updated since the provided time are returned. (optional) + +try: + # List all comments in a repository + api_response = api_instance.issue_get_repo_comments(owner, repo, since=since) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_repo_comments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **since** | **str**| if provided, only comments updated since the provided time are returned. | [optional] + +### Return type + +[**list[Comment]**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_list_issues** +> list[Issue] issue_list_issues(owner, repo, state=state, page=page, q=q) + +List a repository's issues + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +state = 'state_example' # str | whether issue is open or closed (optional) +page = 56 # int | page number of requested issues (optional) +q = 'q_example' # str | search string (optional) + +try: + # List a repository's issues + api_response = api_instance.issue_list_issues(owner, repo, state=state, page=page, q=q) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_list_issues: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **state** | **str**| whether issue is open or closed | [optional] + **page** | **int**| page number of requested issues | [optional] + **q** | **str**| search string | [optional] + +### Return type + +[**list[Issue]**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_list_labels** +> list[Label] issue_list_labels(owner, repo) + +Get all of a repository's labels + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get all of a repository's labels + api_response = api_instance.issue_list_labels(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_list_labels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Label]**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_remove_label** +> issue_remove_label(owner, repo, index, id) + +Remove a label from an issue + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +id = 789 # int | id of the label to remove + +try: + # Remove a label from an issue + api_instance.issue_remove_label(owner, repo, index, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_remove_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **id** | **int**| id of the label to remove | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_replace_labels** +> list[Label] issue_replace_labels(owner, repo, index, body=body) + +Replace an issue's labels + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +body = swagger_client.IssueLabelsOption() # IssueLabelsOption | (optional) + +try: + # Replace an issue's labels + api_response = api_instance.issue_replace_labels(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_replace_labels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **body** | [**IssueLabelsOption**](IssueLabelsOption.md)| | [optional] + +### Return type + +[**list[Label]**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_tracked_times** +> list[TrackedTime] issue_tracked_times(owner, repo, id) + +List an issue's tracked times + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | index of the issue + +try: + # List an issue's tracked times + api_response = api_instance.issue_tracked_times(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_tracked_times: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| index of the issue | + +### Return type + +[**list[TrackedTime]**](TrackedTime.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/IssueDeadline.md b/docs/IssueDeadline.md new file mode 100644 index 0000000..962a655 --- /dev/null +++ b/docs/IssueDeadline.md @@ -0,0 +1,10 @@ +# IssueDeadline + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**due_date** | **datetime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IssueLabelsOption.md b/docs/IssueLabelsOption.md new file mode 100644 index 0000000..07f00ff --- /dev/null +++ b/docs/IssueLabelsOption.md @@ -0,0 +1,10 @@ +# IssueLabelsOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | **list[int]** | list of label IDs | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Label.md b/docs/Label.md new file mode 100644 index 0000000..ed3f62c --- /dev/null +++ b/docs/Label.md @@ -0,0 +1,13 @@ +# Label + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarkdownOption.md b/docs/MarkdownOption.md new file mode 100644 index 0000000..e2f51d6 --- /dev/null +++ b/docs/MarkdownOption.md @@ -0,0 +1,13 @@ +# MarkdownOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **str** | Context to render in: body | [optional] +**mode** | **str** | Mode to render in: body | [optional] +**text** | **str** | Text markdown to render in: body | [optional] +**wiki** | **bool** | Is it a wiki page ? in: body | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MigrateRepoForm.md b/docs/MigrateRepoForm.md new file mode 100644 index 0000000..f780b2f --- /dev/null +++ b/docs/MigrateRepoForm.md @@ -0,0 +1,17 @@ +# MigrateRepoForm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_password** | **str** | | [optional] +**auth_username** | **str** | | [optional] +**clone_addr** | **str** | | +**description** | **str** | | [optional] +**mirror** | **bool** | | [optional] +**private** | **bool** | | [optional] +**repo_name** | **str** | | +**uid** | **int** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Milestone.md b/docs/Milestone.md new file mode 100644 index 0000000..1275ee3 --- /dev/null +++ b/docs/Milestone.md @@ -0,0 +1,17 @@ +# Milestone + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**closed_at** | **datetime** | | [optional] +**closed_issues** | **int** | | [optional] +**description** | **str** | | [optional] +**due_on** | **datetime** | | [optional] +**id** | **int** | | [optional] +**open_issues** | **int** | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MiscellaneousApi.md b/docs/MiscellaneousApi.md new file mode 100644 index 0000000..e546bec --- /dev/null +++ b/docs/MiscellaneousApi.md @@ -0,0 +1,233 @@ +# swagger_client.MiscellaneousApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_version**](MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application +[**render_markdown**](MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML +[**render_markdown_raw**](MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML + + +# **get_version** +> ServerVersion get_version() + +Returns the version of the Gitea application + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.MiscellaneousApi(swagger_client.ApiClient(configuration)) + +try: + # Returns the version of the Gitea application + api_response = api_instance.get_version() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_version: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ServerVersion**](ServerVersion.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **render_markdown** +> render_markdown(body=body) + +Render a markdown document as HTML + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.MiscellaneousApi(swagger_client.ApiClient(configuration)) +body = swagger_client.MarkdownOption() # MarkdownOption | (optional) + +try: + # Render a markdown document as HTML + api_instance.render_markdown(body=body) +except ApiException as e: + print("Exception when calling MiscellaneousApi->render_markdown: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MarkdownOption**](MarkdownOption.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **render_markdown_raw** +> render_markdown_raw(body) + +Render raw markdown as HTML + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.MiscellaneousApi(swagger_client.ApiClient(configuration)) +body = 'body_example' # str | Request body to render + +try: + # Render raw markdown as HTML + api_instance.render_markdown_raw(body) +except ApiException as e: + print("Exception when calling MiscellaneousApi->render_markdown_raw: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **str**| Request body to render | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: text/plain + - **Accept**: text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Organization.md b/docs/Organization.md new file mode 100644 index 0000000..2fac14b --- /dev/null +++ b/docs/Organization.md @@ -0,0 +1,16 @@ +# Organization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar_url** | **str** | | [optional] +**description** | **str** | | [optional] +**full_name** | **str** | | [optional] +**id** | **int** | | [optional] +**location** | **str** | | [optional] +**username** | **str** | | [optional] +**website** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md new file mode 100644 index 0000000..415b956 --- /dev/null +++ b/docs/OrganizationApi.md @@ -0,0 +1,2421 @@ +# swagger_client.OrganizationApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_org_repo**](OrganizationApi.md#create_org_repo) | **POST** /org/{org}/repos | Create a repository in an organization +[**org_add_team_member**](OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member +[**org_add_team_repository**](OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team +[**org_conceal_member**](OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership +[**org_create**](OrganizationApi.md#org_create) | **POST** /orgs | Create an organization +[**org_create_hook**](OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks/ | Create a hook +[**org_create_team**](OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team +[**org_delete**](OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization +[**org_delete_hook**](OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +[**org_delete_member**](OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization +[**org_delete_team**](OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team +[**org_edit**](OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization +[**org_edit_hook**](OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook +[**org_edit_team**](OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team +[**org_get**](OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization +[**org_get_hook**](OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +[**org_get_team**](OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team +[**org_is_member**](OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization +[**org_is_public_member**](OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization +[**org_list_current_user_orgs**](OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations +[**org_list_hooks**](OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks +[**org_list_members**](OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members +[**org_list_public_members**](OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members +[**org_list_repos**](OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos +[**org_list_team_members**](OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +[**org_list_team_repos**](OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos +[**org_list_teams**](OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams +[**org_list_user_orgs**](OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations +[**org_publicize_member**](OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership +[**org_remove_team_member**](OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member +[**org_remove_team_repository**](OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team + + +# **create_org_repo** +> Repository create_org_repo(org, body=body) + +Create a repository in an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of organization +body = swagger_client.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository in an organization + api_response = api_instance.create_org_repo(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->create_org_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of organization | + **body** | [**CreateRepoOption**](CreateRepoOption.md)| | [optional] + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_add_team_member** +> org_add_team_member(id, username) + +Add a team member + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team +username = 'username_example' # str | username of the user to add + +try: + # Add a team member + api_instance.org_add_team_member(id, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_add_team_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **username** | **str**| username of the user to add | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_add_team_repository** +> org_add_team_repository(id, org, repo) + +Add a repository to a team + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team +org = 'org_example' # str | organization that owns the repo to add +repo = 'repo_example' # str | name of the repo to add + +try: + # Add a repository to a team + api_instance.org_add_team_repository(id, org, repo) +except ApiException as e: + print("Exception when calling OrganizationApi->org_add_team_repository: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **org** | **str**| organization that owns the repo to add | + **repo** | **str**| name of the repo to add | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_conceal_member** +> org_conceal_member(org, username) + +Conceal a user's membership + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Conceal a user's membership + api_instance.org_conceal_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_conceal_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_create** +> Organization org_create(organization) + +Create an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +organization = swagger_client.CreateOrgOption() # CreateOrgOption | + +try: + # Create an organization + api_response = api_instance.org_create(organization) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization** | [**CreateOrgOption**](CreateOrgOption.md)| | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_create_hook** +> list[Branch] org_create_hook(org, body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = swagger_client.CreateHookOption() # CreateHookOption | + +try: + # Create a hook + api_response = api_instance.org_create_hook(org, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **body** | [**CreateHookOption**](CreateHookOption.md)| | + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_create_team** +> Team org_create_team(org, body=body) + +Create a team + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = swagger_client.CreateTeamOption() # CreateTeamOption | (optional) + +try: + # Create a team + api_response = api_instance.org_create_team(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **body** | [**CreateTeamOption**](CreateTeamOption.md)| | [optional] + +### Return type + +[**Team**](Team.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_delete** +> org_delete(org) + +Delete an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | organization that is to be deleted + +try: + # Delete an organization + api_instance.org_delete(org) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| organization that is to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_delete_hook** +> org_delete_hook(org, id) + +Delete a hook + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the hook to delete + +try: + # Delete a hook + api_instance.org_delete_hook(org, id) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the hook to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_delete_member** +> org_delete_member(org, username) + +Remove a member from an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Remove a member from an organization + api_instance.org_delete_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_delete_team** +> org_delete_team(id) + +Delete a team + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team to delete + +try: + # Delete a team + api_instance.org_delete_team(id) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_edit** +> Organization org_edit(org, body=body) + +Edit an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization to edit +body = swagger_client.EditOrgOption() # EditOrgOption | (optional) + +try: + # Edit an organization + api_response = api_instance.org_edit(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization to edit | + **body** | [**EditOrgOption**](EditOrgOption.md)| | [optional] + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_edit_hook** +> list[Branch] org_edit_hook(org, id, body=body) + +Update a hook + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the hook to update +body = swagger_client.EditHookOption() # EditHookOption | (optional) + +try: + # Update a hook + api_response = api_instance.org_edit_hook(org, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the hook to update | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_edit_team** +> Team org_edit_team(id, body=body) + +Edit a team + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 56 # int | id of the team to edit +body = swagger_client.EditTeamOption() # EditTeamOption | (optional) + +try: + # Edit a team + api_response = api_instance.org_edit_team(id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team to edit | + **body** | [**EditTeamOption**](EditTeamOption.md)| | [optional] + +### Return type + +[**Team**](Team.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_get** +> Organization org_get(org) + +Get an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization to get + +try: + # Get an organization + api_response = api_instance.org_get(org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization to get | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_get_hook** +> list[Branch] org_get_hook(org, id) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the hook to get + +try: + # Get a hook + api_response = api_instance.org_get_hook(org, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the hook to get | + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_get_team** +> Team org_get_team(id) + +Get a team + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team to get + +try: + # Get a team + api_response = api_instance.org_get_team(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team to get | + +### Return type + +[**Team**](Team.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_is_member** +> org_is_member(org, username) + +Check if a user is a member of an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Check if a user is a member of an organization + api_instance.org_is_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_is_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_is_public_member** +> org_is_public_member(org, username) + +Check if a user is a public member of an organization + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Check if a user is a public member of an organization + api_instance.org_is_public_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_is_public_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_current_user_orgs** +> list[Organization] org_list_current_user_orgs() + +List the current user's organizations + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) + +try: + # List the current user's organizations + api_response = api_instance.org_list_current_user_orgs() + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_current_user_orgs: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Organization]**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_hooks** +> list[Branch] org_list_hooks(org) + +List an organization's webhooks + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization + +try: + # List an organization's webhooks + api_response = api_instance.org_list_hooks(org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_hooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_members** +> list[User] org_list_members(org) + +List an organization's members + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization + +try: + # List an organization's members + api_response = api_instance.org_list_members(org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_members: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_public_members** +> list[User] org_list_public_members(org) + +List an organization's public members + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization + +try: + # List an organization's public members + api_response = api_instance.org_list_public_members(org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_public_members: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_repos** +> list[Repository] org_list_repos(org) + +List an organization's repos + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization + +try: + # List an organization's repos + api_response = api_instance.org_list_repos(org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_repos: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_team_members** +> list[User] org_list_team_members(id) + +List a team's members + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team + +try: + # List a team's members + api_response = api_instance.org_list_team_members(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_members: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_team_repos** +> list[Repository] org_list_team_repos(id) + +List a team's repos + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team + +try: + # List a team's repos + api_response = api_instance.org_list_team_repos(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_repos: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_teams** +> list[Team] org_list_teams(org) + +List an organization's teams + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization + +try: + # List an organization's teams + api_response = api_instance.org_list_teams(org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_teams: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + +### Return type + +[**list[Team]**](Team.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_list_user_orgs** +> list[Organization] org_list_user_orgs(username) + +List a user's organizations + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # List a user's organizations + api_response = api_instance.org_list_user_orgs(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_user_orgs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +[**list[Organization]**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_publicize_member** +> org_publicize_member(org, username) + +Publicize a user's membership + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Publicize a user's membership + api_instance.org_publicize_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_publicize_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_remove_team_member** +> org_remove_team_member(id, username) + +Remove a team member + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team +username = 'username_example' # str | username of the user to remove + +try: + # Remove a team member + api_instance.org_remove_team_member(id, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_remove_team_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **username** | **str**| username of the user to remove | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_remove_team_repository** +> org_remove_team_repository(id, org, repo) + +Remove a repository from a team + +This does not delete the repository, it only removes the repository from the team. + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the team +org = 'org_example' # str | organization that owns the repo to remove +repo = 'repo_example' # str | name of the repo to remove + +try: + # Remove a repository from a team + api_instance.org_remove_team_repository(id, org, repo) +except ApiException as e: + print("Exception when calling OrganizationApi->org_remove_team_repository: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **org** | **str**| organization that owns the repo to remove | + **repo** | **str**| name of the repo to remove | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/PRBranchInfo.md b/docs/PRBranchInfo.md new file mode 100644 index 0000000..a62f2f7 --- /dev/null +++ b/docs/PRBranchInfo.md @@ -0,0 +1,14 @@ +# PRBranchInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | | [optional] +**ref** | **str** | | [optional] +**repo** | [**Repository**](Repository.md) | | [optional] +**repo_id** | **int** | | [optional] +**sha** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayloadCommit.md b/docs/PayloadCommit.md new file mode 100644 index 0000000..f906e62 --- /dev/null +++ b/docs/PayloadCommit.md @@ -0,0 +1,16 @@ +# PayloadCommit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**PayloadUser**](PayloadUser.md) | | [optional] +**committer** | [**PayloadUser**](PayloadUser.md) | | [optional] +**id** | **str** | sha1 hash of the commit | [optional] +**message** | **str** | | [optional] +**timestamp** | **datetime** | | [optional] +**url** | **str** | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayloadCommitVerification.md b/docs/PayloadCommitVerification.md new file mode 100644 index 0000000..58c52a7 --- /dev/null +++ b/docs/PayloadCommitVerification.md @@ -0,0 +1,13 @@ +# PayloadCommitVerification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payload** | **str** | | [optional] +**reason** | **str** | | [optional] +**signature** | **str** | | [optional] +**verified** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayloadUser.md b/docs/PayloadUser.md new file mode 100644 index 0000000..7189554 --- /dev/null +++ b/docs/PayloadUser.md @@ -0,0 +1,12 @@ +# PayloadUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**name** | **str** | Full name of the commit author | [optional] +**username** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Permission.md b/docs/Permission.md new file mode 100644 index 0000000..123f583 --- /dev/null +++ b/docs/Permission.md @@ -0,0 +1,12 @@ +# Permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admin** | **bool** | | [optional] +**pull** | **bool** | | [optional] +**push** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PublicKey.md b/docs/PublicKey.md new file mode 100644 index 0000000..b6ba83d --- /dev/null +++ b/docs/PublicKey.md @@ -0,0 +1,18 @@ +# PublicKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | [optional] +**fingerprint** | **str** | | [optional] +**id** | **int** | | [optional] +**key** | **str** | | [optional] +**key_type** | **str** | | [optional] +**read_only** | **bool** | | [optional] +**title** | **str** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PullRequest.md b/docs/PullRequest.md new file mode 100644 index 0000000..7eb1569 --- /dev/null +++ b/docs/PullRequest.md @@ -0,0 +1,36 @@ +# PullRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | [**User**](User.md) | | [optional] +**assignees** | [**list[User]**](User.md) | | [optional] +**base** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] +**body** | **str** | | [optional] +**closed_at** | **datetime** | | [optional] +**comments** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**diff_url** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**head** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**labels** | [**list[Label]**](Label.md) | | [optional] +**merge_base** | **str** | | [optional] +**merge_commit_sha** | **str** | | [optional] +**mergeable** | **bool** | | [optional] +**merged** | **bool** | | [optional] +**merged_at** | **datetime** | | [optional] +**merged_by** | [**User**](User.md) | | [optional] +**milestone** | [**Milestone**](Milestone.md) | | [optional] +**number** | **int** | | [optional] +**patch_url** | **str** | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PullRequestMeta.md b/docs/PullRequestMeta.md new file mode 100644 index 0000000..53ba426 --- /dev/null +++ b/docs/PullRequestMeta.md @@ -0,0 +1,11 @@ +# PullRequestMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merged** | **bool** | | [optional] +**merged_at** | **datetime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Reference.md b/docs/Reference.md new file mode 100644 index 0000000..c31e370 --- /dev/null +++ b/docs/Reference.md @@ -0,0 +1,12 @@ +# Reference + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**GitObject**](GitObject.md) | | [optional] +**ref** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Release.md b/docs/Release.md new file mode 100644 index 0000000..6126836 --- /dev/null +++ b/docs/Release.md @@ -0,0 +1,23 @@ +# Release + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**list[Attachment]**](Attachment.md) | | [optional] +**author** | [**User**](User.md) | | [optional] +**body** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**draft** | **bool** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**prerelease** | **bool** | | [optional] +**published_at** | **datetime** | | [optional] +**tag_name** | **str** | | [optional] +**tarball_url** | **str** | | [optional] +**target_commitish** | **str** | | [optional] +**url** | **str** | | [optional] +**zipball_url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Repository.md b/docs/Repository.md new file mode 100644 index 0000000..67e9c38 --- /dev/null +++ b/docs/Repository.md @@ -0,0 +1,33 @@ +# Repository + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archived** | **bool** | | [optional] +**clone_url** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**default_branch** | **str** | | [optional] +**description** | **str** | | [optional] +**empty** | **bool** | | [optional] +**fork** | **bool** | | [optional] +**forks_count** | **int** | | [optional] +**full_name** | **str** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**mirror** | **bool** | | [optional] +**name** | **str** | | [optional] +**open_issues_count** | **int** | | [optional] +**owner** | [**User**](User.md) | | [optional] +**parent** | [**Repository**](Repository.md) | | [optional] +**permissions** | [**Permission**](Permission.md) | | [optional] +**private** | **bool** | | [optional] +**size** | **int** | | [optional] +**ssh_url** | **str** | | [optional] +**stars_count** | **int** | | [optional] +**updated_at** | **datetime** | | [optional] +**watchers_count** | **int** | | [optional] +**website** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md new file mode 100644 index 0000000..14e5dbe --- /dev/null +++ b/docs/RepositoryApi.md @@ -0,0 +1,4605 @@ +# swagger_client.RepositoryApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_current_user_repo**](RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +[**create_fork**](RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +[**get_tree**](RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +[**list_forks**](RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +[**repo_add_collaborator**](RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository +[**repo_check_collaborator**](RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +[**repo_create_hook**](RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook +[**repo_create_key**](RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository +[**repo_create_pull_request**](RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request +[**repo_create_release**](RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release +[**repo_create_release_attachment**](RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment +[**repo_create_status**](RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status +[**repo_delete**](RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +[**repo_delete_collaborator**](RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository +[**repo_delete_hook**](RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository +[**repo_delete_key**](RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository +[**repo_delete_release**](RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release +[**repo_delete_release_attachment**](RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment +[**repo_edit_hook**](RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository +[**repo_edit_pull_request**](RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request +[**repo_edit_release**](RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release +[**repo_edit_release_attachment**](RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment +[**repo_get**](RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository +[**repo_get_archive**](RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository +[**repo_get_branch**](RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository +[**repo_get_by_id**](RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id +[**repo_get_combined_status_by_ref**](RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's combined status, by branch/tag/commit reference +[**repo_get_editor_config**](RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository +[**repo_get_hook**](RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +[**repo_get_key**](RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id +[**repo_get_pull_request**](RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +[**repo_get_raw_file**](RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository +[**repo_get_release**](RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release +[**repo_get_release_attachment**](RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment +[**repo_list_all_git_refs**](RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs +[**repo_list_branches**](RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches +[**repo_list_collaborators**](RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators +[**repo_list_git_refs**](RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs +[**repo_list_hooks**](RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository +[**repo_list_keys**](RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys +[**repo_list_pull_requests**](RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests +[**repo_list_release_attachments**](RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments +[**repo_list_releases**](RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases +[**repo_list_stargazers**](RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers +[**repo_list_statuses**](RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses +[**repo_list_subscribers**](RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +[**repo_merge_pull_request**](RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +[**repo_migrate**](RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository +[**repo_mirror_sync**](RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +[**repo_pull_request_is_merged**](RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged +[**repo_search**](RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories +[**repo_test_hook**](RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook +[**repo_tracked_times**](RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +[**topic_search**](RepositoryApi.md#topic_search) | **GET** /topics/search | search topics via keyword +[**user_current_check_subscription**](RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo +[**user_current_delete_subscription**](RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo +[**user_current_put_subscription**](RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo + + +# **create_current_user_repo** +> Repository create_current_user_repo(body=body) + +Create a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +body = swagger_client.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository + api_response = api_instance.create_current_user_repo(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->create_current_user_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateRepoOption**](CreateRepoOption.md)| | [optional] + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_fork** +> Repository create_fork(owner, repo, body=body) + +Fork a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to fork +repo = 'repo_example' # str | name of the repo to fork +body = swagger_client.CreateForkOption() # CreateForkOption | (optional) + +try: + # Fork a repository + api_response = api_instance.create_fork(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->create_fork: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to fork | + **repo** | **str**| name of the repo to fork | + **body** | [**CreateForkOption**](CreateForkOption.md)| | [optional] + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_tree** +> GitTreeResponse get_tree(owner, repo, sha) + +Gets the tree of a repository. + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +sha = 'sha_example' # str | sha of the commit + +try: + # Gets the tree of a repository. + api_response = api_instance.get_tree(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_tree: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the commit | + +### Return type + +[**GitTreeResponse**](GitTreeResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_forks** +> list[Repository] list_forks(owner, repo) + +List a repository's forks + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repository's forks + api_response = api_instance.list_forks(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->list_forks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_add_collaborator** +> repo_add_collaborator(owner, repo, collaborator, body=body) + +Add a collaborator to a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +collaborator = 'collaborator_example' # str | username of the collaborator to add +body = swagger_client.AddCollaboratorOption() # AddCollaboratorOption | (optional) + +try: + # Add a collaborator to a repository + api_instance.repo_add_collaborator(owner, repo, collaborator, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_add_collaborator: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **collaborator** | **str**| username of the collaborator to add | + **body** | [**AddCollaboratorOption**](AddCollaboratorOption.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_check_collaborator** +> repo_check_collaborator(owner, repo, collaborator) + +Check if a user is a collaborator of a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +collaborator = 'collaborator_example' # str | username of the collaborator + +try: + # Check if a user is a collaborator of a repository + api_instance.repo_check_collaborator(owner, repo, collaborator) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_check_collaborator: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **collaborator** | **str**| username of the collaborator | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_create_hook** +> list[Branch] repo_create_hook(owner, repo, body=body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = swagger_client.CreateHookOption() # CreateHookOption | (optional) + +try: + # Create a hook + api_response = api_instance.repo_create_hook(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateHookOption**](CreateHookOption.md)| | [optional] + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_create_key** +> DeployKey repo_create_key(owner, repo, body=body) + +Add a key to a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = swagger_client.CreateKeyOption() # CreateKeyOption | (optional) + +try: + # Add a key to a repository + api_response = api_instance.repo_create_key(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + +### Return type + +[**DeployKey**](DeployKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_create_pull_request** +> PullRequest repo_create_pull_request(owner, repo, body=body) + +Create a pull request + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = swagger_client.CreatePullRequestOption() # CreatePullRequestOption | (optional) + +try: + # Create a pull request + api_response = api_instance.repo_create_pull_request(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_pull_request: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreatePullRequestOption**](CreatePullRequestOption.md)| | [optional] + +### Return type + +[**PullRequest**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_create_release** +> Release repo_create_release(owner, repo, body=body) + +Create a release + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = swagger_client.CreateReleaseOption() # CreateReleaseOption | (optional) + +try: + # Create a release + api_response = api_instance.repo_create_release(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateReleaseOption**](CreateReleaseOption.md)| | [optional] + +### Return type + +[**Release**](Release.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_create_release_attachment** +> Attachment repo_create_release_attachment(owner, repo, id, attachment, name=name) + +Create a release attachment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release +attachment = '/path/to/file.txt' # file | attachment to upload +name = 'name_example' # str | name of the attachment (optional) + +try: + # Create a release attachment + api_response = api_instance.repo_create_release_attachment(owner, repo, id, attachment, name=name) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_release_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release | + **attachment** | **file**| attachment to upload | + **name** | **str**| name of the attachment | [optional] + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_create_status** +> list[Status] repo_create_status(owner, repo, sha, body=body) + +Create a commit status + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +sha = 'sha_example' # str | sha of the commit +body = swagger_client.CreateStatusOption() # CreateStatusOption | (optional) + +try: + # Create a commit status + api_response = api_instance.repo_create_status(owner, repo, sha, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the commit | + **body** | [**CreateStatusOption**](CreateStatusOption.md)| | [optional] + +### Return type + +[**list[Status]**](Status.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete** +> repo_delete(owner, repo) + +Delete a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to delete +repo = 'repo_example' # str | name of the repo to delete + +try: + # Delete a repository + api_instance.repo_delete(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to delete | + **repo** | **str**| name of the repo to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_collaborator** +> repo_delete_collaborator(owner, repo, collaborator) + +Delete a collaborator from a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +collaborator = 'collaborator_example' # str | username of the collaborator to delete + +try: + # Delete a collaborator from a repository + api_instance.repo_delete_collaborator(owner, repo, collaborator) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_collaborator: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **collaborator** | **str**| username of the collaborator to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_hook** +> repo_delete_hook(owner, repo, id) + +Delete a hook in a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the hook to delete + +try: + # Delete a hook in a repository + api_instance.repo_delete_hook(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the hook to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_key** +> repo_delete_key(owner, repo, id) + +Delete a key from a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the key to delete + +try: + # Delete a key from a repository + api_instance.repo_delete_key(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the key to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_release** +> repo_delete_release(owner, repo, id) + +Delete a release + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release to delete + +try: + # Delete a release + api_instance.repo_delete_release(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_release_attachment** +> repo_delete_release_attachment(owner, repo, id, attachment_id) + +Delete a release attachment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release +attachment_id = 789 # int | id of the attachment to delete + +try: + # Delete a release attachment + api_instance.repo_delete_release_attachment(owner, repo, id, attachment_id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_release_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release | + **attachment_id** | **int**| id of the attachment to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_hook** +> list[Branch] repo_edit_hook(owner, repo, id, body=body) + +Edit a hook in a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | index of the hook +body = swagger_client.EditHookOption() # EditHookOption | (optional) + +try: + # Edit a hook in a repository + api_response = api_instance.repo_edit_hook(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| index of the hook | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_pull_request** +> PullRequest repo_edit_pull_request(owner, repo, index, body=body) + +Update a pull request + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request to edit +body = swagger_client.EditPullRequestOption() # EditPullRequestOption | (optional) + +try: + # Update a pull request + api_response = api_instance.repo_edit_pull_request(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_pull_request: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request to edit | + **body** | [**EditPullRequestOption**](EditPullRequestOption.md)| | [optional] + +### Return type + +[**PullRequest**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_release** +> Release repo_edit_release(owner, repo, id, body=body) + +Update a release + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release to edit +body = swagger_client.EditReleaseOption() # EditReleaseOption | (optional) + +try: + # Update a release + api_response = api_instance.repo_edit_release(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release to edit | + **body** | [**EditReleaseOption**](EditReleaseOption.md)| | [optional] + +### Return type + +[**Release**](Release.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_release_attachment** +> Attachment repo_edit_release_attachment(owner, repo, id, attachment_id, body=body) + +Edit a release attachment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release +attachment_id = 789 # int | id of the attachment to edit +body = swagger_client.EditAttachmentOptions() # EditAttachmentOptions | (optional) + +try: + # Edit a release attachment + api_response = api_instance.repo_edit_release_attachment(owner, repo, id, attachment_id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_release_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release | + **attachment_id** | **int**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get** +> Repository repo_get(owner, repo) + +Get a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get a repository + api_response = api_instance.repo_get(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_archive** +> repo_get_archive(owner, repo, archive) + +Get an archive of a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +archive = 'archive_example' # str | archive to download, consisting of a git reference and archive + +try: + # Get an archive of a repository + api_instance.repo_get_archive(owner, repo, archive) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_archive: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **archive** | **str**| archive to download, consisting of a git reference and archive | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_branch** +> Branch repo_get_branch(owner, repo, branch) + +Retrieve a specific branch from a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +branch = 'branch_example' # str | branch to get + +try: + # Retrieve a specific branch from a repository + api_response = api_instance.repo_get_branch(owner, repo, branch) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_branch: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **branch** | **str**| branch to get | + +### Return type + +[**Branch**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_by_id** +> Repository repo_get_by_id(id) + +Get a repository by id + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of the repo to get + +try: + # Get a repository by id + api_response = api_instance.repo_get_by_id(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the repo to get | + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_combined_status_by_ref** +> Status repo_get_combined_status_by_ref(owner, repo, ref) + +Get a commit's combined status, by branch/tag/commit reference + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +ref = 'ref_example' # str | name of branch/tag/commit + +try: + # Get a commit's combined status, by branch/tag/commit reference + api_response = api_instance.repo_get_combined_status_by_ref(owner, repo, ref) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_combined_status_by_ref: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **ref** | **str**| name of branch/tag/commit | + +### Return type + +[**Status**](Status.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_editor_config** +> repo_get_editor_config(owner, repo, filepath) + +Get the EditorConfig definitions of a file in a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | filepath of file to get + +try: + # Get the EditorConfig definitions of a file in a repository + api_instance.repo_get_editor_config(owner, repo, filepath) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_editor_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| filepath of file to get | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_hook** +> list[Branch] repo_get_hook(owner, repo, id) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the hook to get + +try: + # Get a hook + api_response = api_instance.repo_get_hook(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the hook to get | + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_key** +> DeployKey repo_get_key(owner, repo, id) + +Get a repository's key by id + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the key to get + +try: + # Get a repository's key by id + api_response = api_instance.repo_get_key(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the key to get | + +### Return type + +[**DeployKey**](DeployKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_pull_request** +> PullRequest repo_get_pull_request(owner, repo, index) + +Get a pull request + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request to get + +try: + # Get a pull request + api_response = api_instance.repo_get_pull_request(owner, repo, index) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_pull_request: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request to get | + +### Return type + +[**PullRequest**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_raw_file** +> repo_get_raw_file(owner, repo, filepath) + +Get a file from a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | filepath of the file to get + +try: + # Get a file from a repository + api_instance.repo_get_raw_file(owner, repo, filepath) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_raw_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| filepath of the file to get | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_release** +> Release repo_get_release(owner, repo, id) + +Get a release + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release to get + +try: + # Get a release + api_response = api_instance.repo_get_release(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release to get | + +### Return type + +[**Release**](Release.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_get_release_attachment** +> Attachment repo_get_release_attachment(owner, repo, id, attachment_id) + +Get a release attachment + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release +attachment_id = 789 # int | id of the attachment to get + +try: + # Get a release attachment + api_response = api_instance.repo_get_release_attachment(owner, repo, id, attachment_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_release_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release | + **attachment_id** | **int**| id of the attachment to get | + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_all_git_refs** +> list[Reference] repo_list_all_git_refs(owner, repo) + +Get specified ref or filtered repository's refs + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get specified ref or filtered repository's refs + api_response = api_instance.repo_list_all_git_refs(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_all_git_refs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Reference]**](Reference.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_branches** +> list[Branch] repo_list_branches(owner, repo) + +List a repository's branches + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repository's branches + api_response = api_instance.repo_list_branches(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_branches: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_collaborators** +> list[User] repo_list_collaborators(owner, repo) + +List a repository's collaborators + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repository's collaborators + api_response = api_instance.repo_list_collaborators(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_collaborators: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_git_refs** +> list[Reference] repo_list_git_refs(owner, repo, ref) + +Get specified ref or filtered repository's refs + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +ref = 'ref_example' # str | part or full name of the ref + +try: + # Get specified ref or filtered repository's refs + api_response = api_instance.repo_list_git_refs(owner, repo, ref) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_git_refs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **ref** | **str**| part or full name of the ref | + +### Return type + +[**list[Reference]**](Reference.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_hooks** +> list[Branch] repo_list_hooks(owner, repo) + +List the hooks in a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List the hooks in a repository + api_response = api_instance.repo_list_hooks(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_hooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Branch]**](Branch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_keys** +> list[DeployKey] repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint) + +List a repository's keys + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +key_id = 56 # int | the key_id to search for (optional) +fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) + +try: + # List a repository's keys + api_response = api_instance.repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **key_id** | **int**| the key_id to search for | [optional] + **fingerprint** | **str**| fingerprint of the key | [optional] + +### Return type + +[**list[DeployKey]**](DeployKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_pull_requests** +> list[PullRequest] repo_list_pull_requests(owner, repo, page=page, state=state, sort=sort, milestone=milestone, labels=labels) + +List a repo's pull requests + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | Page number (optional) +state = 'state_example' # str | State of pull request: open or closed (optional) (optional) +sort = 'sort_example' # str | Type of sort (optional) +milestone = 789 # int | ID of the milestone (optional) +labels = [56] # list[int] | Label IDs (optional) + +try: + # List a repo's pull requests + api_response = api_instance.repo_list_pull_requests(owner, repo, page=page, state=state, sort=sort, milestone=milestone, labels=labels) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_pull_requests: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page** | **int**| Page number | [optional] + **state** | **str**| State of pull request: open or closed (optional) | [optional] + **sort** | **str**| Type of sort | [optional] + **milestone** | **int**| ID of the milestone | [optional] + **labels** | [**list[int]**](int.md)| Label IDs | [optional] + +### Return type + +[**list[PullRequest]**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_release_attachments** +> list[Attachment] repo_list_release_attachments(owner, repo, id) + +List release's attachments + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release + +try: + # List release's attachments + api_response = api_instance.repo_list_release_attachments(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_release_attachments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release | + +### Return type + +[**list[Attachment]**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_releases** +> list[Release] repo_list_releases(owner, repo) + +List a repo's releases + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repo's releases + api_response = api_instance.repo_list_releases(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_releases: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Release]**](Release.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_stargazers** +> list[User] repo_list_stargazers(owner, repo) + +List a repo's stargazers + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repo's stargazers + api_response = api_instance.repo_list_stargazers(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_stargazers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_statuses** +> list[Status] repo_list_statuses(owner, repo, sha) + +Get a commit's statuses + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +sha = 'sha_example' # str | sha of the commit + +try: + # Get a commit's statuses + api_response = api_instance.repo_list_statuses(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_statuses: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the commit | + +### Return type + +[**list[Status]**](Status.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_subscribers** +> list[User] repo_list_subscribers(owner, repo) + +List a repo's watchers + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repo's watchers + api_response = api_instance.repo_list_subscribers(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_subscribers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_merge_pull_request** +> repo_merge_pull_request(owner, repo, index) + +Merge a pull request + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request to merge + +try: + # Merge a pull request + api_instance.repo_merge_pull_request(owner, repo, index) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_merge_pull_request: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request to merge | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_migrate** +> Repository repo_migrate(body=body) + +Migrate a remote git repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +body = swagger_client.MigrateRepoForm() # MigrateRepoForm | (optional) + +try: + # Migrate a remote git repository + api_response = api_instance.repo_migrate(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_migrate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MigrateRepoForm**](MigrateRepoForm.md)| | [optional] + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_mirror_sync** +> repo_mirror_sync(owner, repo) + +Sync a mirrored repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to sync +repo = 'repo_example' # str | name of the repo to sync + +try: + # Sync a mirrored repository + api_instance.repo_mirror_sync(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_mirror_sync: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to sync | + **repo** | **str**| name of the repo to sync | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_pull_request_is_merged** +> repo_pull_request_is_merged(owner, repo, index) + +Check if a pull request has been merged + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request + +try: + # Check if a pull request has been merged + api_instance.repo_pull_request_is_merged(owner, repo, index) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_pull_request_is_merged: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_search** +> SearchResults repo_search(q=q, uid=uid, page=page, limit=limit, mode=mode, exclusive=exclusive, sort=sort, order=order) + +Search for repositories + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +q = 'q_example' # str | keyword (optional) +uid = 789 # int | search only for repos that the user with the given id owns or contributes to (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) +mode = 'mode_example' # str | type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" (optional) +exclusive = true # bool | if `uid` is given, search only for repos that the user owns (optional) +sort = 'sort_example' # str | sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" (optional) +order = 'order_example' # str | sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. (optional) + +try: + # Search for repositories + api_response = api_instance.repo_search(q=q, uid=uid, page=page, limit=limit, mode=mode, exclusive=exclusive, sort=sort, order=order) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **q** | **str**| keyword | [optional] + **uid** | **int**| search only for repos that the user with the given id owns or contributes to | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + **mode** | **str**| type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" | [optional] + **exclusive** | **bool**| if `uid` is given, search only for repos that the user owns | [optional] + **sort** | **str**| sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" | [optional] + **order** | **str**| sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. | [optional] + +### Return type + +[**SearchResults**](SearchResults.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_test_hook** +> repo_test_hook(owner, repo, id) + +Test a push webhook + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the hook to test + +try: + # Test a push webhook + api_instance.repo_test_hook(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_test_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the hook to test | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_tracked_times** +> list[TrackedTime] repo_tracked_times(owner, repo) + +List a repo's tracked times + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repo's tracked times + api_response = api_instance.repo_tracked_times(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_tracked_times: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[TrackedTime]**](TrackedTime.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **topic_search** +> Repository topic_search(q) + +search topics via keyword + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +q = 'q_example' # str | keywords to search + +try: + # search topics via keyword + api_response = api_instance.topic_search(q) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->topic_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **q** | **str**| keywords to search | + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_check_subscription** +> WatchInfo user_current_check_subscription(owner, repo) + +Check if the current user is watching a repo + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Check if the current user is watching a repo + api_response = api_instance.user_current_check_subscription(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->user_current_check_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**WatchInfo**](WatchInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_delete_subscription** +> user_current_delete_subscription(owner, repo) + +Unwatch a repo + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Unwatch a repo + api_instance.user_current_delete_subscription(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->user_current_delete_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_put_subscription** +> WatchInfo user_current_put_subscription(owner, repo) + +Watch a repo + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Watch a repo + api_response = api_instance.user_current_put_subscription(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->user_current_put_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**WatchInfo**](WatchInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SearchResults.md b/docs/SearchResults.md new file mode 100644 index 0000000..876e635 --- /dev/null +++ b/docs/SearchResults.md @@ -0,0 +1,11 @@ +# SearchResults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Repository]**](Repository.md) | | [optional] +**ok** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServerVersion.md b/docs/ServerVersion.md new file mode 100644 index 0000000..76b84cd --- /dev/null +++ b/docs/ServerVersion.md @@ -0,0 +1,10 @@ +# ServerVersion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StateType.md b/docs/StateType.md new file mode 100644 index 0000000..4ba45d2 --- /dev/null +++ b/docs/StateType.md @@ -0,0 +1,9 @@ +# StateType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Status.md b/docs/Status.md new file mode 100644 index 0000000..98c4d4c --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,18 @@ +# Status + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**creator** | [**User**](User.md) | | [optional] +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**status** | [**StatusState**](StatusState.md) | | [optional] +**target_url** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StatusState.md b/docs/StatusState.md new file mode 100644 index 0000000..c676f43 --- /dev/null +++ b/docs/StatusState.md @@ -0,0 +1,9 @@ +# StatusState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Team.md b/docs/Team.md new file mode 100644 index 0000000..fb6327d --- /dev/null +++ b/docs/Team.md @@ -0,0 +1,14 @@ +# Team + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TimeStamp.md b/docs/TimeStamp.md new file mode 100644 index 0000000..77f4b28 --- /dev/null +++ b/docs/TimeStamp.md @@ -0,0 +1,9 @@ +# TimeStamp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrackedTime.md b/docs/TrackedTime.md new file mode 100644 index 0000000..bb0c31f --- /dev/null +++ b/docs/TrackedTime.md @@ -0,0 +1,14 @@ +# TrackedTime + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**issue_id** | **int** | | [optional] +**time** | **int** | Time in seconds | [optional] +**user_id** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/User.md b/docs/User.md new file mode 100644 index 0000000..7c9a7d3 --- /dev/null +++ b/docs/User.md @@ -0,0 +1,15 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar_url** | **str** | URL to the user's avatar | [optional] +**email** | **str** | | [optional] +**full_name** | **str** | the user's full name | [optional] +**id** | **int** | the user's id | [optional] +**language** | **str** | User locale | [optional] +**login** | **str** | the user's username | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..d2ab09d --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,3061 @@ +# swagger_client.UserApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_current_user_repo**](UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +[**user_add_email**](UserApi.md#user_add_email) | **POST** /user/emails | Add email addresses +[**user_check_following**](UserApi.md#user_check_following) | **GET** /users/{follower}/following/{followee} | Check if one user is following another user +[**user_create_token**](UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Create an access token +[**user_current_check_following**](UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user +[**user_current_check_starring**](UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo +[**user_current_delete_follow**](UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user +[**user_current_delete_gpg_key**](UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG key +[**user_current_delete_key**](UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key +[**user_current_delete_star**](UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo +[**user_current_get_gpg_key**](UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key +[**user_current_get_key**](UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key +[**user_current_list_followers**](UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers +[**user_current_list_following**](UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following +[**user_current_list_gpg_keys**](UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys +[**user_current_list_keys**](UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys +[**user_current_list_repos**](UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns or has access to +[**user_current_list_starred**](UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred +[**user_current_list_subscriptions**](UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user +[**user_current_post_gpg_key**](UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Create a GPG key +[**user_current_post_key**](UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key +[**user_current_put_follow**](UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user +[**user_current_put_star**](UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo +[**user_current_tracked_times**](UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times +[**user_delete_access_token**](UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | delete an access token +[**user_delete_email**](UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses +[**user_get**](UserApi.md#user_get) | **GET** /users/{username} | Get a user +[**user_get_current**](UserApi.md#user_get_current) | **GET** /user | Get the authenticated user +[**user_get_heatmap_data**](UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap +[**user_get_tokens**](UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens +[**user_list_emails**](UserApi.md#user_list_emails) | **GET** /user/emails | List the authenticated user's email addresses +[**user_list_followers**](UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers +[**user_list_following**](UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following +[**user_list_gpg_keys**](UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +[**user_list_keys**](UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys +[**user_list_repos**](UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user +[**user_list_starred**](UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred +[**user_list_subscriptions**](UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user +[**user_search**](UserApi.md#user_search) | **GET** /users/search | Search for users +[**user_tracked_times**](UserApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo + + +# **create_current_user_repo** +> Repository create_current_user_repo(body=body) + +Create a repository + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +body = swagger_client.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository + api_response = api_instance.create_current_user_repo(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->create_current_user_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateRepoOption**](CreateRepoOption.md)| | [optional] + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_add_email** +> list[Email] user_add_email(body=body) + +Add email addresses + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +body = swagger_client.CreateEmailOption() # CreateEmailOption | (optional) + +try: + # Add email addresses + api_response = api_instance.user_add_email(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_add_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateEmailOption**](CreateEmailOption.md)| | [optional] + +### Return type + +[**list[Email]**](Email.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_check_following** +> user_check_following(follower, followee) + +Check if one user is following another user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +follower = 'follower_example' # str | username of following user +followee = 'followee_example' # str | username of followed user + +try: + # Check if one user is following another user + api_instance.user_check_following(follower, followee) +except ApiException as e: + print("Exception when calling UserApi->user_check_following: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **follower** | **str**| username of following user | + **followee** | **str**| username of followed user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_create_token** +> user_create_token(username, access_token=access_token) + +Create an access token + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user +access_token = swagger_client.AccessToken() # AccessToken | (optional) + +try: + # Create an access token + api_instance.user_create_token(username, access_token=access_token) +except ApiException as e: + print("Exception when calling UserApi->user_create_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **access_token** | [**AccessToken**](AccessToken.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_check_following** +> user_current_check_following(username) + +Check whether a user is followed by the authenticated user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of followed user + +try: + # Check whether a user is followed by the authenticated user + api_instance.user_current_check_following(username) +except ApiException as e: + print("Exception when calling UserApi->user_current_check_following: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of followed user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_check_starring** +> user_current_check_starring(owner, repo) + +Whether the authenticated is starring the repo + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Whether the authenticated is starring the repo + api_instance.user_current_check_starring(owner, repo) +except ApiException as e: + print("Exception when calling UserApi->user_current_check_starring: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_delete_follow** +> user_current_delete_follow(username) + +Unfollow a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user to unfollow + +try: + # Unfollow a user + api_instance.user_current_delete_follow(username) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_follow: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to unfollow | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_delete_gpg_key** +> user_current_delete_gpg_key(id) + +Remove a GPG key + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of key to delete + +try: + # Remove a GPG key + api_instance.user_current_delete_gpg_key(id) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_gpg_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of key to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_delete_key** +> user_current_delete_key(id) + +Delete a public key + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of key to delete + +try: + # Delete a public key + api_instance.user_current_delete_key(id) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of key to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_delete_star** +> user_current_delete_star(owner, repo) + +Unstar the given repo + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to unstar +repo = 'repo_example' # str | name of the repo to unstar + +try: + # Unstar the given repo + api_instance.user_current_delete_star(owner, repo) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_star: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to unstar | + **repo** | **str**| name of the repo to unstar | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_get_gpg_key** +> GPGKey user_current_get_gpg_key(id) + +Get a GPG key + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of key to get + +try: + # Get a GPG key + api_response = api_instance.user_current_get_gpg_key(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_get_gpg_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of key to get | + +### Return type + +[**GPGKey**](GPGKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_get_key** +> PublicKey user_current_get_key(id) + +Get a public key + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +id = 789 # int | id of key to get + +try: + # Get a public key + api_response = api_instance.user_current_get_key(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_get_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of key to get | + +### Return type + +[**PublicKey**](PublicKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_list_followers** +> list[User] user_current_list_followers() + +List the authenticated user's followers + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # List the authenticated user's followers + api_response = api_instance.user_current_list_followers() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_followers: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_list_following** +> list[User] user_current_list_following() + +List the users that the authenticated user is following + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # List the users that the authenticated user is following + api_response = api_instance.user_current_list_following() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_following: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_list_gpg_keys** +> list[GPGKey] user_current_list_gpg_keys() + +List the authenticated user's GPG keys + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # List the authenticated user's GPG keys + api_response = api_instance.user_current_list_gpg_keys() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_gpg_keys: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[GPGKey]**](GPGKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_list_keys** +> list[PublicKey] user_current_list_keys(fingerprint=fingerprint) + +List the authenticated user's public keys + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) + +try: + # List the authenticated user's public keys + api_response = api_instance.user_current_list_keys(fingerprint=fingerprint) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fingerprint** | **str**| fingerprint of the key | [optional] + +### Return type + +[**list[PublicKey]**](PublicKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_list_repos** +> list[Repository] user_current_list_repos() + +List the repos that the authenticated user owns or has access to + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # List the repos that the authenticated user owns or has access to + api_response = api_instance.user_current_list_repos() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_repos: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_list_starred** +> list[Repository] user_current_list_starred() + +The repos that the authenticated user has starred + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # The repos that the authenticated user has starred + api_response = api_instance.user_current_list_starred() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_starred: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_list_subscriptions** +> list[Repository] user_current_list_subscriptions() + +List repositories watched by the authenticated user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # List repositories watched by the authenticated user + api_response = api_instance.user_current_list_subscriptions() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_subscriptions: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_post_gpg_key** +> GPGKey user_current_post_gpg_key(form=form) + +Create a GPG key + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +form = swagger_client.CreateGPGKeyOption() # CreateGPGKeyOption | (optional) + +try: + # Create a GPG key + api_response = api_instance.user_current_post_gpg_key(form=form) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_post_gpg_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **form** | [**CreateGPGKeyOption**](CreateGPGKeyOption.md)| | [optional] + +### Return type + +[**GPGKey**](GPGKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_post_key** +> PublicKey user_current_post_key(body=body) + +Create a public key + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +body = swagger_client.CreateKeyOption() # CreateKeyOption | (optional) + +try: + # Create a public key + api_response = api_instance.user_current_post_key(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_post_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + +### Return type + +[**PublicKey**](PublicKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_put_follow** +> user_current_put_follow(username) + +Follow a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user to follow + +try: + # Follow a user + api_instance.user_current_put_follow(username) +except ApiException as e: + print("Exception when calling UserApi->user_current_put_follow: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to follow | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_put_star** +> user_current_put_star(owner, repo) + +Star the given repo + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to star +repo = 'repo_example' # str | name of the repo to star + +try: + # Star the given repo + api_instance.user_current_put_star(owner, repo) +except ApiException as e: + print("Exception when calling UserApi->user_current_put_star: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to star | + **repo** | **str**| name of the repo to star | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_current_tracked_times** +> list[TrackedTime] user_current_tracked_times() + +List the current user's tracked times + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # List the current user's tracked times + api_response = api_instance.user_current_tracked_times() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_tracked_times: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[TrackedTime]**](TrackedTime.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_delete_access_token** +> user_delete_access_token(username, token) + +delete an access token + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user +token = 789 # int | token to be deleted + +try: + # delete an access token + api_instance.user_delete_access_token(username, token) +except ApiException as e: + print("Exception when calling UserApi->user_delete_access_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **token** | **int**| token to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_delete_email** +> user_delete_email(body=body) + +Delete email addresses + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +body = swagger_client.DeleteEmailOption() # DeleteEmailOption | (optional) + +try: + # Delete email addresses + api_instance.user_delete_email(body=body) +except ApiException as e: + print("Exception when calling UserApi->user_delete_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DeleteEmailOption**](DeleteEmailOption.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_get** +> User user_get(username) + +Get a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user to get + +try: + # Get a user + api_response = api_instance.user_get(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to get | + +### Return type + +[**User**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_get_current** +> User user_get_current() + +Get the authenticated user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # Get the authenticated user + api_response = api_instance.user_get_current() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_current: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**User**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_get_heatmap_data** +> list[UserHeatmapData] user_get_heatmap_data(username) + +Get a user's heatmap + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user to get + +try: + # Get a user's heatmap + api_response = api_instance.user_get_heatmap_data(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_heatmap_data: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to get | + +### Return type + +[**list[UserHeatmapData]**](UserHeatmapData.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_get_tokens** +> user_get_tokens(username) + +List the authenticated user's access tokens + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # List the authenticated user's access tokens + api_instance.user_get_tokens(username) +except ApiException as e: + print("Exception when calling UserApi->user_get_tokens: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_emails** +> list[Email] user_list_emails() + +List the authenticated user's email addresses + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) + +try: + # List the authenticated user's email addresses + api_response = api_instance.user_list_emails() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_emails: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Email]**](Email.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_followers** +> list[User] user_list_followers(username) + +List the given user's followers + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # List the given user's followers + api_response = api_instance.user_list_followers(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_followers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_following** +> list[User] user_list_following(username) + +List the users that the given user is following + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # List the users that the given user is following + api_response = api_instance.user_list_following(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_following: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +[**list[User]**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_gpg_keys** +> list[GPGKey] user_list_gpg_keys(username) + +List the given user's GPG keys + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # List the given user's GPG keys + api_response = api_instance.user_list_gpg_keys(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_gpg_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +[**list[GPGKey]**](GPGKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_keys** +> list[PublicKey] user_list_keys(username, fingerprint=fingerprint) + +List the given user's public keys + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user +fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) + +try: + # List the given user's public keys + api_response = api_instance.user_list_keys(username, fingerprint=fingerprint) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **fingerprint** | **str**| fingerprint of the key | [optional] + +### Return type + +[**list[PublicKey]**](PublicKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_repos** +> list[Repository] user_list_repos(username) + +List the repos owned by the given user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # List the repos owned by the given user + api_response = api_instance.user_list_repos(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_repos: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_starred** +> list[Repository] user_list_starred(username) + +The repos that the given user has starred + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # The repos that the given user has starred + api_response = api_instance.user_list_starred(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_starred: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_list_subscriptions** +> list[Repository] user_list_subscriptions(username) + +List the repositories watched by a user + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +username = 'username_example' # str | username of the user + +try: + # List the repositories watched by a user + api_response = api_instance.user_list_subscriptions(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_subscriptions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of the user | + +### Return type + +[**list[Repository]**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_search** +> InlineResponse200 user_search(q=q, uid=uid, limit=limit) + +Search for users + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +q = 'q_example' # str | keyword (optional) +uid = 789 # int | ID of the user to search for (optional) +limit = 56 # int | maximum number of users to return (optional) + +try: + # Search for users + api_response = api_instance.user_search(q=q, uid=uid, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **q** | **str**| keyword | [optional] + **uid** | **int**| ID of the user to search for | [optional] + **limit** | **int**| maximum number of users to return | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_tracked_times** +> list[TrackedTime] user_tracked_times(owner, repo, user) + +List a user's tracked times in a repo + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +user = 'user_example' # str | username of user + +try: + # List a user's tracked times in a repo + api_response = api_instance.user_tracked_times(owner, repo, user) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_tracked_times: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **user** | **str**| username of user | + +### Return type + +[**list[TrackedTime]**](TrackedTime.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UserHeatmapData.md b/docs/UserHeatmapData.md new file mode 100644 index 0000000..8aaba2b --- /dev/null +++ b/docs/UserHeatmapData.md @@ -0,0 +1,11 @@ +# UserHeatmapData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contributions** | **int** | | [optional] +**timestamp** | [**TimeStamp**](TimeStamp.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WatchInfo.md b/docs/WatchInfo.md new file mode 100644 index 0000000..ce71b23 --- /dev/null +++ b/docs/WatchInfo.md @@ -0,0 +1,15 @@ +# WatchInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | [optional] +**ignored** | **bool** | | [optional] +**reason** | **object** | | [optional] +**repository_url** | **str** | | [optional] +**subscribed** | **bool** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..ae01b18 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bafdc07 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..4806a9c --- /dev/null +++ b/setup.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "swagger-client" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "certifi>=2017.4.17", + "python-dateutil>=2.1", + "six>=1.10", + "urllib3>=1.23" +] + + +setup( + name=NAME, + version=VERSION, + description="Gitea API.", + author_email="", + url="", + keywords=["Swagger", "Gitea API."], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + This documentation describes the Gitea API. # noqa: E501 + """ +) diff --git a/swagger_client/__init__.py b/swagger_client/__init__.py new file mode 100644 index 0000000..3c281a3 --- /dev/null +++ b/swagger_client/__init__.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from swagger_client.api.admin_api import AdminApi +from swagger_client.api.issue_api import IssueApi +from swagger_client.api.miscellaneous_api import MiscellaneousApi +from swagger_client.api.organization_api import OrganizationApi +from swagger_client.api.repository_api import RepositoryApi +from swagger_client.api.user_api import UserApi + +# import ApiClient +from swagger_client.api_client import ApiClient +from swagger_client.configuration import Configuration +# import models into sdk package +from swagger_client.models.access_token import AccessToken +from swagger_client.models.add_collaborator_option import AddCollaboratorOption +from swagger_client.models.add_time_option import AddTimeOption +from swagger_client.models.attachment import Attachment +from swagger_client.models.branch import Branch +from swagger_client.models.comment import Comment +from swagger_client.models.create_email_option import CreateEmailOption +from swagger_client.models.create_fork_option import CreateForkOption +from swagger_client.models.create_gpg_key_option import CreateGPGKeyOption +from swagger_client.models.create_hook_option import CreateHookOption +from swagger_client.models.create_issue_comment_option import CreateIssueCommentOption +from swagger_client.models.create_issue_option import CreateIssueOption +from swagger_client.models.create_key_option import CreateKeyOption +from swagger_client.models.create_label_option import CreateLabelOption +from swagger_client.models.create_milestone_option import CreateMilestoneOption +from swagger_client.models.create_org_option import CreateOrgOption +from swagger_client.models.create_pull_request_option import CreatePullRequestOption +from swagger_client.models.create_release_option import CreateReleaseOption +from swagger_client.models.create_repo_option import CreateRepoOption +from swagger_client.models.create_status_option import CreateStatusOption +from swagger_client.models.create_team_option import CreateTeamOption +from swagger_client.models.create_user_option import CreateUserOption +from swagger_client.models.delete_email_option import DeleteEmailOption +from swagger_client.models.deploy_key import DeployKey +from swagger_client.models.edit_attachment_options import EditAttachmentOptions +from swagger_client.models.edit_deadline_option import EditDeadlineOption +from swagger_client.models.edit_hook_option import EditHookOption +from swagger_client.models.edit_issue_comment_option import EditIssueCommentOption +from swagger_client.models.edit_issue_option import EditIssueOption +from swagger_client.models.edit_label_option import EditLabelOption +from swagger_client.models.edit_milestone_option import EditMilestoneOption +from swagger_client.models.edit_org_option import EditOrgOption +from swagger_client.models.edit_pull_request_option import EditPullRequestOption +from swagger_client.models.edit_release_option import EditReleaseOption +from swagger_client.models.edit_team_option import EditTeamOption +from swagger_client.models.edit_user_option import EditUserOption +from swagger_client.models.email import Email +from swagger_client.models.gpg_key import GPGKey +from swagger_client.models.gpg_key_email import GPGKeyEmail +from swagger_client.models.git_entry import GitEntry +from swagger_client.models.git_object import GitObject +from swagger_client.models.git_tree_response import GitTreeResponse +from swagger_client.models.inline_response200 import InlineResponse200 +from swagger_client.models.issue import Issue +from swagger_client.models.issue_deadline import IssueDeadline +from swagger_client.models.issue_labels_option import IssueLabelsOption +from swagger_client.models.label import Label +from swagger_client.models.markdown_option import MarkdownOption +from swagger_client.models.migrate_repo_form import MigrateRepoForm +from swagger_client.models.milestone import Milestone +from swagger_client.models.organization import Organization +from swagger_client.models.pr_branch_info import PRBranchInfo +from swagger_client.models.payload_commit import PayloadCommit +from swagger_client.models.payload_commit_verification import PayloadCommitVerification +from swagger_client.models.payload_user import PayloadUser +from swagger_client.models.permission import Permission +from swagger_client.models.public_key import PublicKey +from swagger_client.models.pull_request import PullRequest +from swagger_client.models.pull_request_meta import PullRequestMeta +from swagger_client.models.reference import Reference +from swagger_client.models.release import Release +from swagger_client.models.repository import Repository +from swagger_client.models.search_results import SearchResults +from swagger_client.models.server_version import ServerVersion +from swagger_client.models.state_type import StateType +from swagger_client.models.status import Status +from swagger_client.models.status_state import StatusState +from swagger_client.models.team import Team +from swagger_client.models.time_stamp import TimeStamp +from swagger_client.models.tracked_time import TrackedTime +from swagger_client.models.user import User +from swagger_client.models.user_heatmap_data import UserHeatmapData +from swagger_client.models.watch_info import WatchInfo diff --git a/swagger_client/api/__init__.py b/swagger_client/api/__init__.py new file mode 100644 index 0000000..c01d56b --- /dev/null +++ b/swagger_client/api/__init__.py @@ -0,0 +1,11 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from swagger_client.api.admin_api import AdminApi +from swagger_client.api.issue_api import IssueApi +from swagger_client.api.miscellaneous_api import MiscellaneousApi +from swagger_client.api.organization_api import OrganizationApi +from swagger_client.api.repository_api import RepositoryApi +from swagger_client.api.user_api import UserApi diff --git a/swagger_client/api/admin_api.py b/swagger_client/api/admin_api.py new file mode 100644 index 0000000..107101f --- /dev/null +++ b/swagger_client/api/admin_api.py @@ -0,0 +1,741 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from swagger_client.api_client import ApiClient + + +class AdminApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def admin_create_org(self, username, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_org(username, organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user that will own the created organization (required) + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_org_with_http_info(username, organization, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_org_with_http_info(username, organization, **kwargs) # noqa: E501 + return data + + def admin_create_org_with_http_info(self, username, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_org_with_http_info(username, organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user that will own the created organization (required) + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'organization'] # noqa: E501 + all_params.append('async_req') + 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 admin_create_org" % key + ) + 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 `admin_create_org`") # noqa: E501 + # verify the required parameter 'organization' is set + if ('organization' not in params or + params['organization'] is None): + raise ValueError("Missing the required parameter `organization` when calling `admin_create_org`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization' in params: + body_params = params['organization'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/orgs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 admin_create_public_key(self, username, **kwargs): # noqa: E501 + """Add a public key on behalf of a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_public_key(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user (required) + :param CreateKeyOption key: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_public_key_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_public_key_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_create_public_key_with_http_info(self, username, **kwargs): # noqa: E501 + """Add a public key on behalf of a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_public_key_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user (required) + :param CreateKeyOption key: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'key'] # noqa: E501 + all_params.append('async_req') + 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 admin_create_public_key" % key + ) + 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 `admin_create_public_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'key' in params: + body_params = params['key'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 admin_create_repo(self, username, repository, **kwargs): # noqa: E501 + """Create a repository on behalf a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_repo(username, repository, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user. This user will own the created repository (required) + :param CreateRepoOption repository: (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_repo_with_http_info(username, repository, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_repo_with_http_info(username, repository, **kwargs) # noqa: E501 + return data + + def admin_create_repo_with_http_info(self, username, repository, **kwargs): # noqa: E501 + """Create a repository on behalf a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_repo_with_http_info(username, repository, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user. This user will own the created repository (required) + :param CreateRepoOption repository: (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'repository'] # noqa: E501 + all_params.append('async_req') + 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 admin_create_repo" % key + ) + 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 `admin_create_repo`") # noqa: E501 + # verify the required parameter 'repository' is set + if ('repository' not in params or + params['repository'] is None): + raise ValueError("Missing the required parameter `repository` when calling `admin_create_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'repository' in params: + body_params = params['repository'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 admin_create_user(self, **kwargs): # noqa: E501 + """Create a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_user(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_user_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_create_user_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_create_user_with_http_info(self, **kwargs): # noqa: E501 + """Create a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_user_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 admin_create_user" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 admin_delete_user(self, username, **kwargs): # noqa: E501 + """Delete a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_delete_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_delete_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Delete a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 admin_delete_user" % key + ) + 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 `admin_delete_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}', '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=params.get('async_req'), + _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 admin_delete_user_public_key(self, username, id, **kwargs): # noqa: E501 + """Delete a user's public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_public_key(username, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_delete_user_public_key_with_http_info(username, id, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_public_key_with_http_info(username, id, **kwargs) # noqa: E501 + return data + + def admin_delete_user_public_key_with_http_info(self, username, id, **kwargs): # noqa: E501 + """Delete a user's public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_public_key_with_http_info(username, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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') + + 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 admin_delete_user_public_key" % key + ) + 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 `admin_delete_user_public_key`") # 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 `admin_delete_user_public_key`") # 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 = [] + + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/keys/{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=params.get('async_req'), + _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 admin_edit_user(self, username, **kwargs): # noqa: E501 + """Edit an existing user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_edit_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to edit (required) + :param EditUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_edit_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_edit_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_edit_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Edit an existing user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_edit_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to edit (required) + :param EditUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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') + + 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 admin_edit_user" % key + ) + 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 `admin_edit_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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/swagger_client/api/issue_api.py b/swagger_client/api/issue_api.py new file mode 100644 index 0000000..cad64fe --- /dev/null +++ b/swagger_client/api/issue_api.py @@ -0,0 +1,3351 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from swagger_client.api_client import ApiClient + + +class IssueApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def issue_add_label(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a label to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_label(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_add_label_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_label_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_add_label_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a label to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_label_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_add_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_add_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_add_label`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_add_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_add_time(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a tracked time to a issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_time(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the issue to add tracked time to (required) + :param AddTimeOption body: + :return: TrackedTime + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_add_time_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_time_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_add_time_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a tracked time to a issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_time_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the issue to add tracked time to (required) + :param AddTimeOption body: + :return: TrackedTime + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_add_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_add_time`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_add_time`") # 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 `issue_add_time`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{id}/times', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TrackedTime', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_clear_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove all labels from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_clear_labels(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_clear_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_clear_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_clear_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove all labels from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_clear_labels_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + 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 issue_clear_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_clear_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_clear_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_clear_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', '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=params.get('async_req'), + _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 issue_create_comment(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a comment to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_comment(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param CreateIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_comment_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_comment_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_create_comment_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a comment to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_comment_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param CreateIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_create_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_create_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_create_comment`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_create_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_create_issue(self, owner, repo, **kwargs): # noqa: E501 + """Create an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_issue_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_create_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_create_label(self, owner, repo, **kwargs): # noqa: E501 + """Create a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_label(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_label_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_label_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_label_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_label_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_create_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_create_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_create_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_create_milestone(self, owner, repo, **kwargs): # noqa: E501 + """Create a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_milestone(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_milestone_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_milestone_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_milestone_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_milestone_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_create_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_create_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_create_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_delete_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_delete_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment`") # 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 `issue_delete_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{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=params.get('async_req'), + _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 issue_delete_comment_deprecated(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_deprecated(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_deprecated_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_deprecated_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_delete_comment_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_delete_comment_deprecated`") # 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 `issue_delete_comment_deprecated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments/{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=params.get('async_req'), + _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 issue_delete_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_delete_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_label`") # 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 `issue_delete_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{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=params.get('async_req'), + _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 issue_delete_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_delete_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_milestone`") # 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 `issue_delete_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{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=params.get('async_req'), + _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 issue_edit_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_edit_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment`") # 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 `issue_edit_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_edit_comment_deprecated(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment_deprecated(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_edit_comment_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_edit_comment_deprecated`") # 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 `issue_edit_comment_deprecated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_edit_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to edit (required) + :param EditIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to edit (required) + :param EditIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_edit_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_edit_issue_deadline(self, owner, repo, index, **kwargs): # noqa: E501 + """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_deadline(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create or update a deadline on (required) + :param EditDeadlineOption body: + :return: IssueDeadline + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_deadline_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create or update a deadline on (required) + :param EditDeadlineOption body: + :return: IssueDeadline + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_edit_issue_deadline" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue_deadline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/deadline', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IssueDeadline', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_edit_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_edit_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_label`") # 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 `issue_edit_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_edit_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :param EditMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :param EditMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_edit_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_milestone`") # 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 `issue_edit_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_get_comments(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments on an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comments(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str since: if provided, only comments updated since the specified time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments on an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comments_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str since: if provided, only comments updated since the specified time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'since'] # noqa: E501 + all_params.append('async_req') + 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 issue_get_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_get_comments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Comment]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_get_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to get (required) + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to get (required) + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + 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 issue_get_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_get_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_get_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_label`") # 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 `issue_get_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_get_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_labels(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_labels_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + 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 issue_get_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_get_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_get_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_get_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestone`") # 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 `issue_get_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_get_milestones_list(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's opened milestones # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestones_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Milestone] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's opened milestones # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestones_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Milestone] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 issue_get_milestones_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestones_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestones_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Milestone]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_get_repo_comments(self, owner, repo, **kwargs): # noqa: E501 + """List all comments in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_repo_comments(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str since: if provided, only comments updated since the provided time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List all comments in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_repo_comments_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str since: if provided, only comments updated since the provided time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'since'] # noqa: E501 + all_params.append('async_req') + 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 issue_get_repo_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_repo_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_repo_comments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Comment]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_list_issues(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issues(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: whether issue is open or closed + :param int page: page number of requested issues + :param str q: search string + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issues_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: whether issue is open or closed + :param int page: page number of requested issues + :param str q: search string + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'state', 'page', 'q'] # noqa: E501 + all_params.append('async_req') + 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 issue_list_issues" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issues`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issues`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Issue]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_list_labels(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_labels(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_labels_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 issue_list_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_list_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_list_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_remove_label(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Remove a label from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_label(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int id: id of the label to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_remove_label_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Remove a label from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_label_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int id: id of the label to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_remove_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_remove_label`") # 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 `issue_remove_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels/{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=params.get('async_req'), + _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 issue_replace_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Replace an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_replace_labels(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Replace an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_replace_labels_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 issue_replace_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_replace_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_replace_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_replace_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 issue_tracked_times(self, owner, repo, id, **kwargs): # noqa: E501 + """List an issue's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_tracked_times(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the issue (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_tracked_times_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_tracked_times_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_tracked_times_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """List an issue's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_tracked_times_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the issue (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 issue_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_tracked_times`") # 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 `issue_tracked_times`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{id}/times', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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/swagger_client/api/miscellaneous_api.py b/swagger_client/api/miscellaneous_api.py new file mode 100644 index 0000000..b40f934 --- /dev/null +++ b/swagger_client/api/miscellaneous_api.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from swagger_client.api_client import ApiClient + + +class MiscellaneousApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_version(self, **kwargs): # noqa: E501 + """Returns the version of the Gitea application # 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_version(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ServerVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_version_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_version_with_http_info(**kwargs) # noqa: E501 + return data + + def get_version_with_http_info(self, **kwargs): # noqa: E501 + """Returns the version of the Gitea application # 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_version_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ServerVersion + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 get_version" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/version', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ServerVersion', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 render_markdown(self, **kwargs): # noqa: E501 + """Render a markdown document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkdownOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.render_markdown_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.render_markdown_with_http_info(**kwargs) # noqa: E501 + return data + + def render_markdown_with_http_info(self, **kwargs): # noqa: E501 + """Render a markdown document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkdownOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 render_markdown" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markdown', '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=params.get('async_req'), + _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 render_markdown_raw(self, body, **kwargs): # noqa: E501 + """Render raw markdown as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_raw(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: Request body to render (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.render_markdown_raw_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.render_markdown_raw_with_http_info(body, **kwargs) # noqa: E501 + return data + + def render_markdown_raw_with_http_info(self, body, **kwargs): # noqa: E501 + """Render raw markdown as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_raw_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: Request body to render (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 render_markdown_raw" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `render_markdown_raw`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/html']) # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markdown/raw', '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=params.get('async_req'), + _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/swagger_client/api/organization_api.py b/swagger_client/api/organization_api.py new file mode 100644 index 0000000..f22ed16 --- /dev/null +++ b/swagger_client/api/organization_api.py @@ -0,0 +1,3175 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from swagger_client.api_client import ApiClient + + +class OrganizationApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_org_repo(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # 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_org_repo(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_org_repo_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.create_org_repo_with_http_info(org, **kwargs) # noqa: E501 + return data + + def create_org_repo_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # 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_org_repo_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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') + + 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 create_org_repo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `create_org_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/org/{org}/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_add_team_member(self, id, username, **kwargs): # noqa: E501 + """Add a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_add_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """Add a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # noqa: E501 + all_params.append('async_req') + 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 org_add_team_member" % 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 `org_add_team_member`") # noqa: E501 + # 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 `org_add_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members/{username}', '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=params.get('async_req'), + _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 org_add_team_repository(self, id, org, repo, **kwargs): # noqa: E501 + """Add a repository to a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_repository(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to add (required) + :param str repo: name of the repo to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_add_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """Add a repository to a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_repository_with_http_info(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to add (required) + :param str repo: name of the repo to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'org', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 org_add_team_repository" % 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 `org_add_team_repository`") # noqa: E501 + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_add_team_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `org_add_team_repository`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos/{org}/{repo}', '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=params.get('async_req'), + _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 org_conceal_member(self, org, username, **kwargs): # noqa: E501 + """Conceal a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_conceal_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_conceal_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Conceal a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_conceal_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # noqa: E501 + all_params.append('async_req') + 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 org_conceal_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_conceal_member`") # noqa: E501 + # 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 `org_conceal_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members/{username}', '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=params.get('async_req'), + _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 org_create(self, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create(organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_with_http_info(organization, **kwargs) # noqa: E501 + else: + (data) = self.org_create_with_http_info(organization, **kwargs) # noqa: E501 + return data + + def org_create_with_http_info(self, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_with_http_info(organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['organization'] # noqa: E501 + all_params.append('async_req') + 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 org_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'organization' is set + if ('organization' not in params or + params['organization'] is None): + raise ValueError("Missing the required parameter `organization` when calling `org_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization' in params: + body_params = params['organization'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_create_hook(self, org, body, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_hook(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateHookOption body: (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_hook_with_http_info(org, body, **kwargs) # noqa: E501 + else: + (data) = self.org_create_hook_with_http_info(org, body, **kwargs) # noqa: E501 + return data + + def org_create_hook_with_http_info(self, org, body, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_hook_with_http_info(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateHookOption body: (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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') + + 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 org_create_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_create_hook`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `org_create_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_create_team(self, org, **kwargs): # noqa: E501 + """Create a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_team(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_team_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_create_team_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_create_team_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_team_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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') + + 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 org_create_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_create_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/teams', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_delete(self, org, **kwargs): # noqa: E501 + """Delete an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: organization that is to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_delete_with_http_info(self, org, **kwargs): # noqa: E501 + """Delete an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: organization that is to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + 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 org_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}', '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=params.get('async_req'), + _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 org_delete_hook(self, org, id, **kwargs): # noqa: E501 + """Delete a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_hook(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_delete_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Delete a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_hook_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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') + + 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 org_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_delete_hook`") # 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 `org_delete_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/{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=params.get('async_req'), + _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 org_delete_member(self, org, username, **kwargs): # noqa: E501 + """Remove a member from an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Remove a member from an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # noqa: E501 + all_params.append('async_req') + 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 org_delete_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_delete_member`") # noqa: E501 + # 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 `org_delete_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/members/{username}', '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=params.get('async_req'), + _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 org_delete_team(self, id, **kwargs): # noqa: E501 + """Delete a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 org_delete_team" % 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 `org_delete_team`") # 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{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=params.get('async_req'), + _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 org_edit(self, org, **kwargs): # noqa: E501 + """Edit an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_edit_with_http_info(self, org, **kwargs): # noqa: E501 + """Edit an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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') + + 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 org_edit" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_edit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_edit_hook(self, org, id, **kwargs): # noqa: E501 + """Update a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_hook(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_edit_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Update a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_hook_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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') + + 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 org_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_edit_hook`") # 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 `org_edit_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_edit_team(self, id, **kwargs): # noqa: E501 + """Edit a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to edit (required) + :param EditTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Edit a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to edit (required) + :param EditTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 org_edit_team" % 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 `org_edit_team`") # 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 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_get(self, org, **kwargs): # noqa: E501 + """Get an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to get (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_get_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_get_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to get (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + 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 org_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_get_hook(self, org, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_hook(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to get (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_get_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_hook_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to get (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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') + + 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 org_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_get_hook`") # 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 `org_get_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_get_team(self, id, **kwargs): # noqa: E501 + """Get a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to get (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_get_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to get (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 org_get_team" % 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 `org_get_team`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_is_member(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_is_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_is_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_is_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # noqa: E501 + all_params.append('async_req') + 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 org_is_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_is_member`") # noqa: E501 + # 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 `org_is_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/members/{username}', 'GET', + 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=params.get('async_req'), + _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 org_is_public_member(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a public member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_public_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_is_public_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a public member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_public_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # noqa: E501 + all_params.append('async_req') + 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 org_is_public_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_is_public_member`") # noqa: E501 + # 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 `org_is_public_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members/{username}', 'GET', + 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=params.get('async_req'), + _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 org_list_current_user_orgs(self, **kwargs): # noqa: E501 + """List the current user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_current_user_orgs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.org_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501 + return data + + def org_list_current_user_orgs_with_http_info(self, **kwargs): # noqa: E501 + """List the current user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_current_user_orgs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 org_list_current_user_orgs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Organization]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_hooks(self, org, **kwargs): # noqa: E501 + """List an organization's webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_hooks(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_hooks_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_hooks_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_hooks_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_hooks_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + 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 org_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_list_hooks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_members(self, org, **kwargs): # noqa: E501 + """List an organization's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_members(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_members_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_members_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_members_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_members_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + 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 org_list_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_list_members`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_public_members(self, org, **kwargs): # noqa: E501 + """List an organization's public members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_public_members(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_public_members_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_public_members_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_public_members_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's public members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_public_members_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + 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 org_list_public_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_list_public_members`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_repos(self, org, **kwargs): # noqa: E501 + """List an organization's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_repos(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_repos_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_repos_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_repos_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_repos_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + 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 org_list_repos" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_list_repos`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_team_members(self, id, **kwargs): # noqa: E501 + """List a team's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_members(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_members_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_members_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 org_list_team_members" % 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 `org_list_team_members`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_team_repos(self, id, **kwargs): # noqa: E501 + """List a team's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_repos(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_repos_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_repos_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 org_list_team_repos" % 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 `org_list_team_repos`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_teams(self, org, **kwargs): # noqa: E501 + """List an organization's teams # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_teams(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_teams_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_teams_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_teams_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's teams # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_teams_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + 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 org_list_teams" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_list_teams`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/teams', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Team]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_list_user_orgs(self, username, **kwargs): # noqa: E501 + """List a user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_user_orgs(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501 + return data + + def org_list_user_orgs_with_http_info(self, username, **kwargs): # noqa: E501 + """List a user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_user_orgs_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 org_list_user_orgs" % key + ) + 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 `org_list_user_orgs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Organization]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 org_publicize_member(self, org, username, **kwargs): # noqa: E501 + """Publicize a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_publicize_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_publicize_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Publicize a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_publicize_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # noqa: E501 + all_params.append('async_req') + 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 org_publicize_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_publicize_member`") # noqa: E501 + # 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 `org_publicize_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members/{username}', '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=params.get('async_req'), + _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 org_remove_team_member(self, id, username, **kwargs): # noqa: E501 + """Remove a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_remove_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """Remove a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # noqa: E501 + all_params.append('async_req') + 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 org_remove_team_member" % 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 `org_remove_team_member`") # noqa: E501 + # 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 `org_remove_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members/{username}', '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=params.get('async_req'), + _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 org_remove_team_repository(self, id, org, repo, **kwargs): # noqa: E501 + """Remove a repository from a team # noqa: E501 + + This does not delete the repository, it only removes the repository from the team. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_repository(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to remove (required) + :param str repo: name of the repo to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_remove_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """Remove a repository from a team # noqa: E501 + + This does not delete the repository, it only removes the repository from the team. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_repository_with_http_info(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to remove (required) + :param str repo: name of the repo to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'org', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 org_remove_team_repository" % 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 `org_remove_team_repository`") # noqa: E501 + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_remove_team_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `org_remove_team_repository`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos/{org}/{repo}', '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=params.get('async_req'), + _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/swagger_client/api/repository_api.py b/swagger_client/api/repository_api.py new file mode 100644 index 0000000..2a2b1cd --- /dev/null +++ b/swagger_client/api/repository_api.py @@ -0,0 +1,6344 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from swagger_client.api_client import ApiClient + + +class RepositoryApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_current_user_repo(self, **kwargs): # noqa: E501 + """Create a repository # 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_current_user_repo(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + return data + + def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 + """Create a repository # 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_current_user_repo_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 create_current_user_repo" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 create_fork(self, owner, repo, **kwargs): # noqa: E501 + """Fork a repository # 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_fork(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to fork (required) + :param str repo: name of the repo to fork (required) + :param CreateForkOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def create_fork_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Fork a repository # 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_fork_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to fork (required) + :param str repo: name of the repo to fork (required) + :param CreateForkOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 create_fork" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `create_fork`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `create_fork`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/forks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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_tree(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tree of a repository. # 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_tree(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :return: GitTreeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_tree_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tree of a repository. # 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_tree_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :return: GitTreeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # noqa: E501 + all_params.append('async_req') + 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 get_tree" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `get_tree`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `get_tree`") # noqa: E501 + # verify the required parameter 'sha' is set + if ('sha' not in params or + params['sha'] is None): + raise ValueError("Missing the required parameter `sha` when calling `get_tree`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/trees/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitTreeResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 list_forks(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's forks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_forks(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_forks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's forks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_forks_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 list_forks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `list_forks`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `list_forks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/forks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_add_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Add a collaborator to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_collaborator(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator to add (required) + :param AddCollaboratorOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_add_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Add a collaborator to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_collaborator_with_http_info(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator to add (required) + :param AddCollaboratorOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator', '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') + + 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 repo_add_collaborator" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_add_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_add_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if ('collaborator' not in params or + params['collaborator'] is None): + raise ValueError("Missing the required parameter `collaborator` when calling `repo_add_collaborator`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}', '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=params.get('async_req'), + _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 repo_check_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Check if a user is a collaborator of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_check_collaborator(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_check_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Check if a user is a collaborator of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_check_collaborator_with_http_info(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 + all_params.append('async_req') + 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 repo_check_collaborator" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_check_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_check_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if ('collaborator' not in params or + params['collaborator'] is None): + raise ValueError("Missing the required parameter `collaborator` when calling `repo_check_collaborator`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}', 'GET', + 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=params.get('async_req'), + _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 repo_create_hook(self, owner, repo, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_hook(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateHookOption body: + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_hook_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_hook_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateHookOption body: + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_create_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_create_key(self, owner, repo, **kwargs): # noqa: E501 + """Add a key to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_key(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateKeyOption body: + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Add a key to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_key_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateKeyOption body: + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_create_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeployKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_create_pull_request(self, owner, repo, **kwargs): # noqa: E501 + """Create a pull 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.repo_create_pull_request(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreatePullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_pull_request_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a pull 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.repo_create_pull_request_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreatePullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_create_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_create_release(self, owner, repo, **kwargs): # noqa: E501 + """Create a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_create_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_create_release_attachment(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release_attachment(owner, repo, id, attachment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param file attachment: attachment to upload (required) + :param str name: name of the attachment + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_release_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_release_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + return data + + def repo_create_release_attachment_with_http_info(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release_attachment_with_http_info(owner, repo, id, attachment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param file attachment: attachment to upload (required) + :param str name: name of the attachment + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment', 'name'] # noqa: E501 + all_params.append('async_req') + 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 repo_create_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_release_attachment`") # 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 `repo_create_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment' is set + if ('attachment' not in params or + params['attachment'] is None): + raise ValueError("Missing the required parameter `attachment` when calling `repo_create_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + if 'attachment' in params: + local_var_files['attachment'] = params['attachment'] # noqa: E501 + + 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 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_create_status(self, owner, repo, sha, **kwargs): # noqa: E501 + """Create a commit status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_status(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param CreateStatusOption body: + :return: list[Status] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_create_status_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Create a commit status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_status_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param CreateStatusOption body: + :return: list[Status] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', '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') + + 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 repo_create_status" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_status`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_status`") # noqa: E501 + # verify the required parameter 'sha' is set + if ('sha' not in params or + params['sha'] is None): + raise ValueError("Missing the required parameter `sha` when calling `repo_create_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/statuses/{sha}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Status]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_delete(self, owner, repo, **kwargs): # noqa: E501 + """Delete a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to delete (required) + :param str repo: name of the repo to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_delete_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Delete a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to delete (required) + :param str repo: name of the repo to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_delete`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}', '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=params.get('async_req'), + _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 repo_delete_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Delete a collaborator from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_collaborator(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Delete a collaborator from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_collaborator_with_http_info(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 + all_params.append('async_req') + 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 repo_delete_collaborator" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if ('collaborator' not in params or + params['collaborator'] is None): + raise ValueError("Missing the required parameter `collaborator` when calling `repo_delete_collaborator`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}', '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=params.get('async_req'), + _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 repo_delete_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_hook`") # 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 `repo_delete_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{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=params.get('async_req'), + _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 repo_delete_key(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a key from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_key(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a key from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_key_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_delete_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_key`") # 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 `repo_delete_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys/{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=params.get('async_req'), + _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 repo_delete_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_delete_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release`") # 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 `repo_delete_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{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=params.get('async_req'), + _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 repo_delete_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_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') + + 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 repo_delete_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_attachment`") # 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 `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if ('attachment_id' not in params or + params['attachment_id'] is None): + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_delete_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_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=params.get('async_req'), + _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 repo_edit_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the hook (required) + :param EditHookOption body: + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the hook (required) + :param EditHookOption body: + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_hook`") # 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 `repo_edit_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_edit_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Update a pull 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.repo_edit_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to edit (required) + :param EditPullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Update a pull 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.repo_edit_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to edit (required) + :param EditPullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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') + + 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 repo_edit_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_edit_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_edit_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to edit (required) + :param EditReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to edit (required) + :param EditReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_edit_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release`") # 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 `repo_edit_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_edit_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_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') + + 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 repo_edit_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release_attachment`") # 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 `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if ('attachment_id' not in params or + params['attachment_id'] is None): + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_edit_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_archive(self, owner, repo, archive, **kwargs): # noqa: E501 + """Get an archive of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_archive(owner, repo, archive, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str archive: archive to download, consisting of a git reference and archive (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 + return data + + def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # noqa: E501 + """Get an archive of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_archive_with_http_info(owner, repo, archive, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str archive: archive to download, consisting of a git reference and archive (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'archive'] # noqa: E501 + all_params.append('async_req') + 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 repo_get_archive" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_archive`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_archive`") # noqa: E501 + # verify the required parameter 'archive' is set + if ('archive' not in params or + params['archive'] is None): + raise ValueError("Missing the required parameter `archive` when calling `repo_get_archive`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'archive' in params: + path_params['archive'] = params['archive'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/archive/{archive}', 'GET', + 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=params.get('async_req'), + _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 repo_get_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Retrieve a specific branch from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_branch(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: branch to get (required) + :return: Branch + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return data + + def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Retrieve a specific branch from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_branch_with_http_info(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: branch to get (required) + :return: Branch + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'branch'] # noqa: E501 + all_params.append('async_req') + 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 repo_get_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if ('branch' not in params or + params['branch'] is None): + raise ValueError("Missing the required parameter `branch` when calling `repo_get_branch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'branch' in params: + path_params['branch'] = params['branch'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches/{branch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Branch', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_by_id(self, id, **kwargs): # noqa: E501 + """Get a repository by 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.repo_get_by_id(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the repo to get (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + return data + + def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a repository by 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.repo_get_by_id_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the repo to get (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 repo_get_by_id" % 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 `repo_get_by_id`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repositories/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_combined_status_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_combined_status_by_ref(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :return: Status + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :return: Status + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref'] # noqa: E501 + all_params.append('async_req') + 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 repo_get_combined_status_by_ref" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + # verify the required parameter 'ref' is set + if ('ref' not in params or + params['ref'] is None): + raise ValueError("Missing the required parameter `ref` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'ref' in params: + path_params['ref'] = params['ref'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits/{ref}/statuses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Status', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_editor_config(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get the EditorConfig definitions of a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_editor_config(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of file to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get the EditorConfig definitions of a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_editor_config_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of file to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath'] # noqa: E501 + all_params.append('async_req') + 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 repo_get_editor_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'filepath' is set + if ('filepath' not in params or + params['filepath'] is None): + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_editor_config`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/editorconfig/{filepath}', 'GET', + 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=params.get('async_req'), + _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 repo_get_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to get (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to get (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_hook`") # 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 `repo_get_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_key(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a repository's key by 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.repo_get_key(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to get (required) + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a repository's key by 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.repo_get_key_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to get (required) + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_get_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_key`") # 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 `repo_get_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeployKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a pull 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.repo_get_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a pull 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.repo_get_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + 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 repo_get_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_raw_file(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_raw_file(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of the file to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_raw_file_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of the file to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath'] # noqa: E501 + all_params.append('async_req') + 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 repo_get_raw_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if ('filepath' not in params or + params['filepath'] is None): + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/raw/{filepath}', 'GET', + 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=params.get('async_req'), + _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 repo_get_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to get (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to get (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_get_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release`") # 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 `repo_get_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_get_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_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') + + 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 repo_get_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_attachment`") # 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 `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if ('attachment_id' not in params or + params['attachment_id'] is None): + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_get_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_all_git_refs(self, owner, repo, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_all_git_refs(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_all_git_refs_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_all_git_refs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_all_git_refs`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_all_git_refs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/refs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reference]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_branches(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's branches # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_branches(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_branches_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's branches # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_branches_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_branches" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_branches`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_branches`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_collaborators(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's collaborators # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_collaborators(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's collaborators # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_collaborators_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_collaborators" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_collaborators`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_collaborators`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_git_refs(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_git_refs(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: part or full name of the ref (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_list_git_refs_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_git_refs_with_http_info(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: part or full name of the ref (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_git_refs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_refs`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_refs`") # noqa: E501 + # verify the required parameter 'ref' is set + if ('ref' not in params or + params['ref'] is None): + raise ValueError("Missing the required parameter `ref` when calling `repo_list_git_refs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'ref' in params: + path_params['ref'] = params['ref'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/refs/{ref}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reference]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_hooks(self, owner, repo, **kwargs): # noqa: E501 + """List the hooks in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_hooks(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List the hooks in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_hooks_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_hooks`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_hooks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_keys(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's 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.repo_list_keys(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int key_id: the key_id to search for + :param str fingerprint: fingerprint of the key + :return: list[DeployKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's 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.repo_list_keys_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int key_id: the key_id to search for + :param str fingerprint: fingerprint of the key + :return: list[DeployKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'key_id', 'fingerprint'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_keys`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'key_id' in params: + query_params.append(('key_id', params['key_id'])) # noqa: E501 + if 'fingerprint' in params: + query_params.append(('fingerprint', params['fingerprint'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DeployKey]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_pull_requests(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pull requests # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pull_requests(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: Page number + :param str state: State of pull request: open or closed (optional) + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pull requests # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pull_requests_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: Page number + :param str state: State of pull request: open or closed (optional) + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'state', 'sort', 'milestone', 'labels'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_pull_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_requests`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + if 'milestone' in params: + query_params.append(('milestone', params['milestone'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + collection_formats['labels'] = 'multi' # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullRequest]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_release_attachments(self, owner, repo, id, **kwargs): # noqa: E501 + """List release's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_release_attachments(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_list_release_attachments_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """List release's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_release_attachments_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_list_release_attachments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_release_attachments`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_release_attachments`") # 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 `repo_list_release_attachments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Attachment]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_releases(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's releases # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_releases(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Release] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's releases # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_releases_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Release] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_releases" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_releases`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_releases`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Release]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_stargazers(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's stargazers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_stargazers(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_stargazers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's stargazers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_stargazers_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_stargazers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_stargazers`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_stargazers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/stargazers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_statuses(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a commit's statuses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_statuses(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :return: list[Status] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_list_statuses_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a commit's statuses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_statuses_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :return: list[Status] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_statuses" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses`") # noqa: E501 + # verify the required parameter 'sha' is set + if ('sha' not in params or + params['sha'] is None): + raise ValueError("Missing the required parameter `sha` when calling `repo_list_statuses`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/statuses/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Status]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_list_subscribers(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's watchers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_subscribers(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_subscribers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's watchers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_subscribers_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_list_subscribers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_subscribers`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_subscribers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscribers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_merge_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge a pull 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.repo_merge_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to merge (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_merge_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge a pull 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.repo_merge_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to merge (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + 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 repo_merge_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_merge_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_merge_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_merge_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/merge', '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=params.get('async_req'), + _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 repo_migrate(self, **kwargs): # noqa: E501 + """Migrate a remote git repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_migrate(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MigrateRepoForm body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_migrate_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.repo_migrate_with_http_info(**kwargs) # noqa: E501 + return data + + def repo_migrate_with_http_info(self, **kwargs): # noqa: E501 + """Migrate a remote git repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_migrate_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MigrateRepoForm body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 repo_migrate" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/migrate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_mirror_sync(self, owner, repo, **kwargs): # noqa: E501 + """Sync a mirrored repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_mirror_sync(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Sync a mirrored repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_mirror_sync_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_mirror_sync" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_mirror_sync`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_mirror_sync`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/mirror-sync', '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=params.get('async_req'), + _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 repo_pull_request_is_merged(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if a pull request has been merged # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_pull_request_is_merged(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_pull_request_is_merged_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if a pull request has been merged # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_pull_request_is_merged_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + 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 repo_pull_request_is_merged" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_pull_request_is_merged`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_pull_request_is_merged`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_pull_request_is_merged`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/merge', 'GET', + 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=params.get('async_req'), + _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 repo_search(self, **kwargs): # noqa: E501 + """Search for repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_search(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: search only for repos that the user with the given id owns or contributes to + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" + :param bool exclusive: if `uid` is given, search only for repos that the user owns + :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" + :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. + :return: SearchResults + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_search_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.repo_search_with_http_info(**kwargs) # noqa: E501 + return data + + def repo_search_with_http_info(self, **kwargs): # noqa: E501 + """Search for repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_search_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: search only for repos that the user with the given id owns or contributes to + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" + :param bool exclusive: if `uid` is given, search only for repos that the user owns + :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" + :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. + :return: SearchResults + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'uid', 'page', 'limit', 'mode', 'exclusive', 'sort', 'order'] # noqa: E501 + all_params.append('async_req') + 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 repo_search" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'uid' in params: + query_params.append(('uid', params['uid'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'mode' in params: + query_params.append(('mode', params['mode'])) # noqa: E501 + if 'exclusive' in params: + query_params.append(('exclusive', params['exclusive'])) # noqa: E501 + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + if 'order' in params: + query_params.append(('order', params['order'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SearchResults', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 repo_test_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Test a push webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_test_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to test (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_test_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Test a push webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_test_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to test (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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') + + 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 repo_test_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_test_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_test_hook`") # 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 `repo_test_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}/tests', '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=params.get('async_req'), + _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 repo_tracked_times(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_tracked_times(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_tracked_times_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 repo_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_tracked_times`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/times', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 topic_search(self, q, **kwargs): # noqa: E501 + """search topics via keyword # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.topic_search(q, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keywords to search (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.topic_search_with_http_info(q, **kwargs) # noqa: E501 + else: + (data) = self.topic_search_with_http_info(q, **kwargs) # noqa: E501 + return data + + def topic_search_with_http_info(self, q, **kwargs): # noqa: E501 + """search topics via keyword # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.topic_search_with_http_info(q, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keywords to search (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q'] # noqa: E501 + all_params.append('async_req') + 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 topic_search" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'q' is set + if ('q' not in params or + params['q'] is None): + raise ValueError("Missing the required parameter `q` when calling `topic_search`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/topics/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_check_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Check if the current user is watching a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_check_subscription(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_check_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Check if the current user is watching a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_check_subscription_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 user_current_check_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_current_check_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_current_check_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscription', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WatchInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_delete_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Unwatch a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_subscription(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_delete_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Unwatch a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_subscription_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 user_current_delete_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_current_delete_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscription', '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=params.get('async_req'), + _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 user_current_put_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Watch a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_put_subscription(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_put_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Watch a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_put_subscription_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 user_current_put_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_current_put_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_current_put_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscription', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WatchInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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/swagger_client/api/user_api.py b/swagger_client/api/user_api.py new file mode 100644 index 0000000..8d919d8 --- /dev/null +++ b/swagger_client/api/user_api.py @@ -0,0 +1,3886 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from swagger_client.api_client import ApiClient + + +class UserApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_current_user_repo(self, **kwargs): # noqa: E501 + """Create a repository # 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_current_user_repo(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + return data + + def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 + """Create a repository # 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_current_user_repo_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 create_current_user_repo" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_add_email(self, **kwargs): # noqa: E501 + """Add email addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_add_email(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateEmailOption body: + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_add_email_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_add_email_with_http_info(**kwargs) # noqa: E501 + return data + + def user_add_email_with_http_info(self, **kwargs): # noqa: E501 + """Add email addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_add_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateEmailOption body: + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 user_add_email" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/emails', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_check_following(self, follower, followee, **kwargs): # noqa: E501 + """Check if one user is following another user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_check_following(follower, followee, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str follower: username of following user (required) + :param str followee: username of followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_check_following_with_http_info(follower, followee, **kwargs) # noqa: E501 + else: + (data) = self.user_check_following_with_http_info(follower, followee, **kwargs) # noqa: E501 + return data + + def user_check_following_with_http_info(self, follower, followee, **kwargs): # noqa: E501 + """Check if one user is following another user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_check_following_with_http_info(follower, followee, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str follower: username of following user (required) + :param str followee: username of followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['follower', 'followee'] # noqa: E501 + all_params.append('async_req') + 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 user_check_following" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'follower' is set + if ('follower' not in params or + params['follower'] is None): + raise ValueError("Missing the required parameter `follower` when calling `user_check_following`") # noqa: E501 + # verify the required parameter 'followee' is set + if ('followee' not in params or + params['followee'] is None): + raise ValueError("Missing the required parameter `followee` when calling `user_check_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'follower' in params: + path_params['follower'] = params['follower'] # noqa: E501 + if 'followee' in params: + path_params['followee'] = params['followee'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{follower}/following/{followee}', 'GET', + 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=params.get('async_req'), + _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 user_create_token(self, username, **kwargs): # noqa: E501 + """Create an access token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_create_token(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param AccessToken access_token: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_create_token_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_create_token_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_create_token_with_http_info(self, username, **kwargs): # noqa: E501 + """Create an access token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_create_token_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param AccessToken access_token: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'access_token'] # noqa: E501 + all_params.append('async_req') + 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 user_create_token" % key + ) + 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 `user_create_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'access_token' in params: + body_params = params['access_token'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/tokens', '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=params.get('async_req'), + _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 user_current_check_following(self, username, **kwargs): # noqa: E501 + """Check whether a user is followed by the authenticated user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_check_following(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_check_following_with_http_info(self, username, **kwargs): # noqa: E501 + """Check whether a user is followed by the authenticated user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_check_following_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_current_check_following" % key + ) + 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 `user_current_check_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following/{username}', 'GET', + 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=params.get('async_req'), + _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 user_current_check_starring(self, owner, repo, **kwargs): # noqa: E501 + """Whether the authenticated is starring the repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_check_starring(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_check_starring_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Whether the authenticated is starring the repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_check_starring_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 user_current_check_starring" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_current_check_starring`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_current_check_starring`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred/{owner}/{repo}', 'GET', + 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=params.get('async_req'), + _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 user_current_delete_follow(self, username, **kwargs): # noqa: E501 + """Unfollow a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_follow(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to unfollow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_delete_follow_with_http_info(self, username, **kwargs): # noqa: E501 + """Unfollow a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_follow_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to unfollow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_current_delete_follow" % key + ) + 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 `user_current_delete_follow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following/{username}', '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=params.get('async_req'), + _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 user_current_delete_gpg_key(self, id, **kwargs): # noqa: E501 + """Remove a GPG key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_gpg_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_delete_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Remove a GPG key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_gpg_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 user_current_delete_gpg_key" % 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 `user_current_delete_gpg_key`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys/{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=params.get('async_req'), + _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 user_current_delete_key(self, id, **kwargs): # noqa: E501 + """Delete a public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_delete_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 user_current_delete_key" % 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 `user_current_delete_key`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys/{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=params.get('async_req'), + _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 user_current_delete_star(self, owner, repo, **kwargs): # noqa: E501 + """Unstar the given repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_star(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to unstar (required) + :param str repo: name of the repo to unstar (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_delete_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Unstar the given repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_delete_star_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to unstar (required) + :param str repo: name of the repo to unstar (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 user_current_delete_star" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_star`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_current_delete_star`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred/{owner}/{repo}', '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=params.get('async_req'), + _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 user_current_get_gpg_key(self, id, **kwargs): # noqa: E501 + """Get a GPG key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_get_gpg_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_get_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a GPG key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_get_gpg_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 user_current_get_gpg_key" % 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 `user_current_get_gpg_key`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GPGKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_get_key(self, id, **kwargs): # noqa: E501 + """Get a public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_get_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_get_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_get_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 user_current_get_key" % 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 `user_current_get_key`") # 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 + # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_list_followers(self, **kwargs): # noqa: E501 + """List the authenticated user's followers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_followers(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_followers_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's followers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_followers_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_current_list_followers" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/followers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_list_following(self, **kwargs): # noqa: E501 + """List the users that the authenticated user is following # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_following(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_following_with_http_info(self, **kwargs): # noqa: E501 + """List the users that the authenticated user is following # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_following_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_current_list_following" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_list_gpg_keys(self, **kwargs): # noqa: E501 + """List the authenticated user's GPG 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.user_current_list_gpg_keys(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_gpg_keys_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's GPG 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.user_current_list_gpg_keys_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_current_list_gpg_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GPGKey]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_list_keys(self, **kwargs): # noqa: E501 + """List the authenticated user's public 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.user_current_list_keys(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str fingerprint: fingerprint of the key + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_keys_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's public 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.user_current_list_keys_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str fingerprint: fingerprint of the key + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['fingerprint'] # noqa: E501 + all_params.append('async_req') + 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 user_current_list_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'fingerprint' in params: + query_params.append(('fingerprint', params['fingerprint'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PublicKey]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_list_repos(self, **kwargs): # noqa: E501 + """List the repos that the authenticated user owns or has access to # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_repos(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_repos_with_http_info(self, **kwargs): # noqa: E501 + """List the repos that the authenticated user owns or has access to # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_repos_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_current_list_repos" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_list_starred(self, **kwargs): # noqa: E501 + """The repos that the authenticated user has starred # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_starred(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_starred_with_http_info(self, **kwargs): # noqa: E501 + """The repos that the authenticated user has starred # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_starred_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_current_list_starred" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_list_subscriptions(self, **kwargs): # noqa: E501 + """List repositories watched by the authenticated user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_subscriptions(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_subscriptions_with_http_info(self, **kwargs): # noqa: E501 + """List repositories watched by the authenticated user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_list_subscriptions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_current_list_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_post_gpg_key(self, **kwargs): # noqa: E501 + """Create a GPG key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_post_gpg_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateGPGKeyOption form: + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_post_gpg_key_with_http_info(self, **kwargs): # noqa: E501 + """Create a GPG key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_post_gpg_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateGPGKeyOption form: + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['form'] # noqa: E501 + all_params.append('async_req') + 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 user_current_post_gpg_key" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'form' in params: + body_params = params['form'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GPGKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_post_key(self, **kwargs): # noqa: E501 + """Create a public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_post_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateKeyOption body: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_post_key_with_http_info(self, **kwargs): # noqa: E501 + """Create a public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_post_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateKeyOption body: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 user_current_post_key" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_current_put_follow(self, username, **kwargs): # noqa: E501 + """Follow a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_put_follow(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to follow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_put_follow_with_http_info(self, username, **kwargs): # noqa: E501 + """Follow a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_put_follow_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to follow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_current_put_follow" % key + ) + 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 `user_current_put_follow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following/{username}', '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=params.get('async_req'), + _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 user_current_put_star(self, owner, repo, **kwargs): # noqa: E501 + """Star the given repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_put_star(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to star (required) + :param str repo: name of the repo to star (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_put_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Star the given repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_put_star_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to star (required) + :param str repo: name of the repo to star (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + 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 user_current_put_star" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_current_put_star`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_current_put_star`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred/{owner}/{repo}', '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=params.get('async_req'), + _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 user_current_tracked_times(self, **kwargs): # noqa: E501 + """List the current user's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_tracked_times(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_tracked_times_with_http_info(self, **kwargs): # noqa: E501 + """List the current user's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_current_tracked_times_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_current_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/times', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_delete_access_token(self, username, token, **kwargs): # noqa: E501 + """delete an access token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_delete_access_token(username, token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param int token: token to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_access_token_with_http_info(username, token, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_access_token_with_http_info(username, token, **kwargs) # noqa: E501 + return data + + def user_delete_access_token_with_http_info(self, username, token, **kwargs): # noqa: E501 + """delete an access token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_delete_access_token_with_http_info(username, token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param int token: token to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'token'] # noqa: E501 + all_params.append('async_req') + 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 user_delete_access_token" % key + ) + 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 `user_delete_access_token`") # noqa: E501 + # verify the required parameter 'token' is set + if ('token' not in params or + params['token'] is None): + raise ValueError("Missing the required parameter `token` when calling `user_delete_access_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + if 'token' in params: + path_params['token'] = params['token'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/tokens/{token}', '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=params.get('async_req'), + _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 user_delete_email(self, **kwargs): # noqa: E501 + """Delete email addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_delete_email(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeleteEmailOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_email_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_delete_email_with_http_info(**kwargs) # noqa: E501 + return data + + def user_delete_email_with_http_info(self, **kwargs): # noqa: E501 + """Delete email addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_delete_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeleteEmailOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + + 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 user_delete_email" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/emails', '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=params.get('async_req'), + _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 user_get(self, username, **kwargs): # noqa: E501 + """Get a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_with_http_info(self, username, **kwargs): # noqa: E501 + """Get a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_get" % key + ) + 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 `user_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_get_current(self, **kwargs): # noqa: E501 + """Get the authenticated user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_current(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_current_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_current_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_current_with_http_info(self, **kwargs): # noqa: E501 + """Get the authenticated user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_current_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_get_current" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_get_heatmap_data(self, username, **kwargs): # noqa: E501 + """Get a user's heatmap # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_heatmap_data(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: list[UserHeatmapData] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_heatmap_data_with_http_info(self, username, **kwargs): # noqa: E501 + """Get a user's heatmap # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_heatmap_data_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: list[UserHeatmapData] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_get_heatmap_data" % key + ) + 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 `user_get_heatmap_data`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/heatmap', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UserHeatmapData]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_get_tokens(self, username, **kwargs): # noqa: E501 + """List the authenticated user's access tokens # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_tokens(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_tokens_with_http_info(self, username, **kwargs): # noqa: E501 + """List the authenticated user's access tokens # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_tokens_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_get_tokens" % key + ) + 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 `user_get_tokens`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/tokens', 'GET', + 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=params.get('async_req'), + _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 user_list_emails(self, **kwargs): # noqa: E501 + """List the authenticated user's email addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_emails_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_emails_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_emails_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's email addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + 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 user_list_emails" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_list_followers(self, username, **kwargs): # noqa: E501 + """List the given user's followers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_followers(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_followers_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's followers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_followers_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_list_followers" % key + ) + 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 `user_list_followers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/followers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_list_following(self, username, **kwargs): # noqa: E501 + """List the users that the given user is following # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_following(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_following_with_http_info(self, username, **kwargs): # noqa: E501 + """List the users that the given user is following # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_following_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_list_following" % key + ) + 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 `user_list_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/following', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_list_gpg_keys(self, username, **kwargs): # noqa: E501 + """List the given user's GPG 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.user_list_gpg_keys(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_gpg_keys_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's GPG 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.user_list_gpg_keys_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_list_gpg_keys" % key + ) + 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 `user_list_gpg_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/gpg_keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GPGKey]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_list_keys(self, username, **kwargs): # noqa: E501 + """List the given user's public 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.user_list_keys(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param str fingerprint: fingerprint of the key + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_keys_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's public 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.user_list_keys_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param str fingerprint: fingerprint of the key + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'fingerprint'] # noqa: E501 + all_params.append('async_req') + 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 user_list_keys" % key + ) + 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 `user_list_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'fingerprint' in params: + query_params.append(('fingerprint', params['fingerprint'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PublicKey]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_list_repos(self, username, **kwargs): # noqa: E501 + """List the repos owned by the given user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_repos(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_repos_with_http_info(self, username, **kwargs): # noqa: E501 + """List the repos owned by the given user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_repos_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_list_repos" % key + ) + 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 `user_list_repos`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_list_starred(self, username, **kwargs): # noqa: E501 + """The repos that the given user has starred # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_starred(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_starred_with_http_info(self, username, **kwargs): # noqa: E501 + """The repos that the given user has starred # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_starred_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_list_starred" % key + ) + 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 `user_list_starred`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/starred', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_list_subscriptions(self, username, **kwargs): # noqa: E501 + """List the repositories watched by a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_subscriptions(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_subscriptions_with_http_info(self, username, **kwargs): # noqa: E501 + """List the repositories watched by a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_list_subscriptions_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user (required) + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + 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 user_list_subscriptions" % key + ) + 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 `user_list_subscriptions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_search(self, **kwargs): # noqa: E501 + """Search for users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_search(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: ID of the user to search for + :param int limit: maximum number of users to return + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_search_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_search_with_http_info(**kwargs) # noqa: E501 + return data + + def user_search_with_http_info(self, **kwargs): # noqa: E501 + """Search for users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_search_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: ID of the user to search for + :param int limit: maximum number of users to return + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'uid', 'limit'] # noqa: E501 + all_params.append('async_req') + 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 user_search" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'uid' in params: + query_params.append(('uid', params['uid'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse200', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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 user_tracked_times(self, owner, repo, user, **kwargs): # noqa: E501 + """List a user's tracked times in a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_tracked_times(owner, repo, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: username of user (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + else: + (data) = self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + return data + + def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noqa: E501 + """List a user's tracked times in a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_tracked_times_with_http_info(owner, repo, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: username of user (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'user'] # noqa: E501 + all_params.append('async_req') + 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 user_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'user' is set + if ('user' not in params or + params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `user_tracked_times`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'user' in params: + path_params['user'] = params['user'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/times/{user}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _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/swagger_client/api_client.py b/swagger_client/api_client.py new file mode 100644 index 0000000..8066389 --- /dev/null +++ b/swagger_client/api_client.py @@ -0,0 +1,638 @@ +# coding: utf-8 +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from swagger_client.configuration import Configuration +import swagger_client.models +from swagger_client import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + # Use the pool property to lazily initialize the ThreadPool. + self._pool = None + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/1.0.0/python' + + def __del__(self): + if self._pool is not None: + self._pool.close() + self._pool.join() + + @property + def pool(self): + if self._pool is None: + self._pool = ThreadPool() + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(swagger_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + 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 ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + 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'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __hasattr(self, object, name): + return name in object.__class__.__dict__ + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if (not klass.swagger_types and + not self.__hasattr(klass, 'get_real_child_model')): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if (isinstance(instance, dict) and + klass.swagger_types is not None and + isinstance(data, dict)): + for key, value in data.items(): + if key not in klass.swagger_types: + instance[key] = value + if self.__hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/swagger_client/configuration.py b/swagger_client/configuration.py new file mode 100644 index 0000000..e2c2b65 --- /dev/null +++ b/swagger_client/configuration.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + _default = None + + def __init__(self): + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + + # Default Base url + self.host = "http://localhost/api/v1" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("swagger_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @classmethod + def set_default(cls, default): + cls._default = default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'AccessToken': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'access_token', + 'value': self.get_api_key_with_prefix('access_token') + }, + 'AuthorizationHeaderToken': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix('Authorization') + }, + 'BasicAuth': + { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + }, + 'SudoHeader': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Sudo', + 'value': self.get_api_key_with_prefix('Sudo') + }, + 'SudoParam': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'sudo', + 'value': self.get_api_key_with_prefix('sudo') + }, + 'Token': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'token', + 'value': self.get_api_key_with_prefix('token') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.1.1\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/swagger_client/models/__init__.py b/swagger_client/models/__init__.py new file mode 100644 index 0000000..4d0db61 --- /dev/null +++ b/swagger_client/models/__init__.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +# flake8: noqa +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from swagger_client.models.access_token import AccessToken +from swagger_client.models.add_collaborator_option import AddCollaboratorOption +from swagger_client.models.add_time_option import AddTimeOption +from swagger_client.models.attachment import Attachment +from swagger_client.models.branch import Branch +from swagger_client.models.comment import Comment +from swagger_client.models.create_email_option import CreateEmailOption +from swagger_client.models.create_fork_option import CreateForkOption +from swagger_client.models.create_gpg_key_option import CreateGPGKeyOption +from swagger_client.models.create_hook_option import CreateHookOption +from swagger_client.models.create_issue_comment_option import CreateIssueCommentOption +from swagger_client.models.create_issue_option import CreateIssueOption +from swagger_client.models.create_key_option import CreateKeyOption +from swagger_client.models.create_label_option import CreateLabelOption +from swagger_client.models.create_milestone_option import CreateMilestoneOption +from swagger_client.models.create_org_option import CreateOrgOption +from swagger_client.models.create_pull_request_option import CreatePullRequestOption +from swagger_client.models.create_release_option import CreateReleaseOption +from swagger_client.models.create_repo_option import CreateRepoOption +from swagger_client.models.create_status_option import CreateStatusOption +from swagger_client.models.create_team_option import CreateTeamOption +from swagger_client.models.create_user_option import CreateUserOption +from swagger_client.models.delete_email_option import DeleteEmailOption +from swagger_client.models.deploy_key import DeployKey +from swagger_client.models.edit_attachment_options import EditAttachmentOptions +from swagger_client.models.edit_deadline_option import EditDeadlineOption +from swagger_client.models.edit_hook_option import EditHookOption +from swagger_client.models.edit_issue_comment_option import EditIssueCommentOption +from swagger_client.models.edit_issue_option import EditIssueOption +from swagger_client.models.edit_label_option import EditLabelOption +from swagger_client.models.edit_milestone_option import EditMilestoneOption +from swagger_client.models.edit_org_option import EditOrgOption +from swagger_client.models.edit_pull_request_option import EditPullRequestOption +from swagger_client.models.edit_release_option import EditReleaseOption +from swagger_client.models.edit_team_option import EditTeamOption +from swagger_client.models.edit_user_option import EditUserOption +from swagger_client.models.email import Email +from swagger_client.models.gpg_key import GPGKey +from swagger_client.models.gpg_key_email import GPGKeyEmail +from swagger_client.models.git_entry import GitEntry +from swagger_client.models.git_object import GitObject +from swagger_client.models.git_tree_response import GitTreeResponse +from swagger_client.models.inline_response200 import InlineResponse200 +from swagger_client.models.issue import Issue +from swagger_client.models.issue_deadline import IssueDeadline +from swagger_client.models.issue_labels_option import IssueLabelsOption +from swagger_client.models.label import Label +from swagger_client.models.markdown_option import MarkdownOption +from swagger_client.models.migrate_repo_form import MigrateRepoForm +from swagger_client.models.milestone import Milestone +from swagger_client.models.organization import Organization +from swagger_client.models.pr_branch_info import PRBranchInfo +from swagger_client.models.payload_commit import PayloadCommit +from swagger_client.models.payload_commit_verification import PayloadCommitVerification +from swagger_client.models.payload_user import PayloadUser +from swagger_client.models.permission import Permission +from swagger_client.models.public_key import PublicKey +from swagger_client.models.pull_request import PullRequest +from swagger_client.models.pull_request_meta import PullRequestMeta +from swagger_client.models.reference import Reference +from swagger_client.models.release import Release +from swagger_client.models.repository import Repository +from swagger_client.models.search_results import SearchResults +from swagger_client.models.server_version import ServerVersion +from swagger_client.models.state_type import StateType +from swagger_client.models.status import Status +from swagger_client.models.status_state import StatusState +from swagger_client.models.team import Team +from swagger_client.models.time_stamp import TimeStamp +from swagger_client.models.tracked_time import TrackedTime +from swagger_client.models.user import User +from swagger_client.models.user_heatmap_data import UserHeatmapData +from swagger_client.models.watch_info import WatchInfo diff --git a/swagger_client/models/access_token.py b/swagger_client/models/access_token.py new file mode 100644 index 0000000..069727d --- /dev/null +++ b/swagger_client/models/access_token.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AccessToken(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): # noqa: E501 + """AccessToken - a model defined in Swagger""" # noqa: E501 + + self._name = None + self.discriminator = None + + self.name = name + + @property + def name(self): + """Gets the name of this AccessToken. # noqa: E501 + + + :return: The name of this AccessToken. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AccessToken. + + + :param name: The name of this AccessToken. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AccessToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccessToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/add_collaborator_option.py b/swagger_client/models/add_collaborator_option.py new file mode 100644 index 0000000..32f942e --- /dev/null +++ b/swagger_client/models/add_collaborator_option.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AddCollaboratorOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'permission': 'str' + } + + attribute_map = { + 'permission': 'permission' + } + + def __init__(self, permission=None): # noqa: E501 + """AddCollaboratorOption - a model defined in Swagger""" # noqa: E501 + + self._permission = None + self.discriminator = None + + if permission is not None: + self.permission = permission + + @property + def permission(self): + """Gets the permission of this AddCollaboratorOption. # noqa: E501 + + + :return: The permission of this AddCollaboratorOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this AddCollaboratorOption. + + + :param permission: The permission of this AddCollaboratorOption. # noqa: E501 + :type: str + """ + + self._permission = permission + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AddCollaboratorOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AddCollaboratorOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/add_time_option.py b/swagger_client/models/add_time_option.py new file mode 100644 index 0000000..03bf039 --- /dev/null +++ b/swagger_client/models/add_time_option.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AddTimeOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'time': 'int' + } + + attribute_map = { + 'time': 'time' + } + + def __init__(self, time=None): # noqa: E501 + """AddTimeOption - a model defined in Swagger""" # noqa: E501 + + self._time = None + self.discriminator = None + + self.time = time + + @property + def time(self): + """Gets the time of this AddTimeOption. # noqa: E501 + + time in seconds # noqa: E501 + + :return: The time of this AddTimeOption. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this AddTimeOption. + + time in seconds # noqa: E501 + + :param time: The time of this AddTimeOption. # noqa: E501 + :type: int + """ + if time is None: + raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 + + self._time = time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AddTimeOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AddTimeOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/attachment.py b/swagger_client/models/attachment.py new file mode 100644 index 0000000..23493a5 --- /dev/null +++ b/swagger_client/models/attachment.py @@ -0,0 +1,271 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Attachment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'browser_download_url': 'str', + 'created_at': 'datetime', + 'download_count': 'int', + 'id': 'int', + 'name': 'str', + 'size': 'int', + 'uuid': 'str' + } + + attribute_map = { + 'browser_download_url': 'browser_download_url', + 'created_at': 'created_at', + 'download_count': 'download_count', + 'id': 'id', + 'name': 'name', + 'size': 'size', + 'uuid': 'uuid' + } + + def __init__(self, browser_download_url=None, created_at=None, download_count=None, id=None, name=None, size=None, uuid=None): # noqa: E501 + """Attachment - a model defined in Swagger""" # noqa: E501 + + self._browser_download_url = None + self._created_at = None + self._download_count = None + self._id = None + self._name = None + self._size = None + self._uuid = None + self.discriminator = None + + if browser_download_url is not None: + self.browser_download_url = browser_download_url + if created_at is not None: + self.created_at = created_at + if download_count is not None: + self.download_count = download_count + if id is not None: + self.id = id + if name is not None: + self.name = name + if size is not None: + self.size = size + if uuid is not None: + self.uuid = uuid + + @property + def browser_download_url(self): + """Gets the browser_download_url of this Attachment. # noqa: E501 + + + :return: The browser_download_url of this Attachment. # noqa: E501 + :rtype: str + """ + return self._browser_download_url + + @browser_download_url.setter + def browser_download_url(self, browser_download_url): + """Sets the browser_download_url of this Attachment. + + + :param browser_download_url: The browser_download_url of this Attachment. # noqa: E501 + :type: str + """ + + self._browser_download_url = browser_download_url + + @property + def created_at(self): + """Gets the created_at of this Attachment. # noqa: E501 + + + :return: The created_at of this Attachment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Attachment. + + + :param created_at: The created_at of this Attachment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def download_count(self): + """Gets the download_count of this Attachment. # noqa: E501 + + + :return: The download_count of this Attachment. # noqa: E501 + :rtype: int + """ + return self._download_count + + @download_count.setter + def download_count(self, download_count): + """Sets the download_count of this Attachment. + + + :param download_count: The download_count of this Attachment. # noqa: E501 + :type: int + """ + + self._download_count = download_count + + @property + def id(self): + """Gets the id of this Attachment. # noqa: E501 + + + :return: The id of this Attachment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Attachment. + + + :param id: The id of this Attachment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Attachment. # noqa: E501 + + + :return: The name of this Attachment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Attachment. + + + :param name: The name of this Attachment. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def size(self): + """Gets the size of this Attachment. # noqa: E501 + + + :return: The size of this Attachment. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Attachment. + + + :param size: The size of this Attachment. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def uuid(self): + """Gets the uuid of this Attachment. # noqa: E501 + + + :return: The uuid of this Attachment. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this Attachment. + + + :param uuid: The uuid of this Attachment. # noqa: E501 + :type: str + """ + + self._uuid = uuid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Attachment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Attachment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/branch.py b/swagger_client/models/branch.py new file mode 100644 index 0000000..2726dfd --- /dev/null +++ b/swagger_client/models/branch.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.payload_commit import PayloadCommit # noqa: F401,E501 + + +class Branch(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'commit': 'PayloadCommit', + 'name': 'str' + } + + attribute_map = { + 'commit': 'commit', + 'name': 'name' + } + + def __init__(self, commit=None, name=None): # noqa: E501 + """Branch - a model defined in Swagger""" # noqa: E501 + + self._commit = None + self._name = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if name is not None: + self.name = name + + @property + def commit(self): + """Gets the commit of this Branch. # noqa: E501 + + + :return: The commit of this Branch. # noqa: E501 + :rtype: PayloadCommit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Branch. + + + :param commit: The commit of this Branch. # noqa: E501 + :type: PayloadCommit + """ + + self._commit = commit + + @property + def name(self): + """Gets the name of this Branch. # noqa: E501 + + + :return: The name of this Branch. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Branch. + + + :param name: The name of this Branch. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Branch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Branch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/comment.py b/swagger_client/models/comment.py new file mode 100644 index 0000000..6f22f92 --- /dev/null +++ b/swagger_client/models/comment.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.user import User # noqa: F401,E501 + + +class Comment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'created_at': 'datetime', + 'html_url': 'str', + 'id': 'int', + 'issue_url': 'str', + 'pull_request_url': 'str', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'created_at': 'created_at', + 'html_url': 'html_url', + 'id': 'id', + 'issue_url': 'issue_url', + 'pull_request_url': 'pull_request_url', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, body=None, created_at=None, html_url=None, id=None, issue_url=None, pull_request_url=None, updated_at=None, user=None): # noqa: E501 + """Comment - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._created_at = None + self._html_url = None + self._id = None + self._issue_url = None + self._pull_request_url = None + self._updated_at = None + self._user = None + self.discriminator = None + + if body is not None: + self.body = body + if created_at is not None: + self.created_at = created_at + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if issue_url is not None: + self.issue_url = issue_url + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if updated_at is not None: + self.updated_at = updated_at + if user is not None: + self.user = user + + @property + def body(self): + """Gets the body of this Comment. # noqa: E501 + + + :return: The body of this Comment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Comment. + + + :param body: The body of this Comment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this Comment. # noqa: E501 + + + :return: The created_at of this Comment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Comment. + + + :param created_at: The created_at of this Comment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def html_url(self): + """Gets the html_url of this Comment. # noqa: E501 + + + :return: The html_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Comment. + + + :param html_url: The html_url of this Comment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Comment. # noqa: E501 + + + :return: The id of this Comment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Comment. + + + :param id: The id of this Comment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def issue_url(self): + """Gets the issue_url of this Comment. # noqa: E501 + + + :return: The issue_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._issue_url + + @issue_url.setter + def issue_url(self, issue_url): + """Sets the issue_url of this Comment. + + + :param issue_url: The issue_url of this Comment. # noqa: E501 + :type: str + """ + + self._issue_url = issue_url + + @property + def pull_request_url(self): + """Gets the pull_request_url of this Comment. # noqa: E501 + + + :return: The pull_request_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._pull_request_url + + @pull_request_url.setter + def pull_request_url(self, pull_request_url): + """Sets the pull_request_url of this Comment. + + + :param pull_request_url: The pull_request_url of this Comment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def updated_at(self): + """Gets the updated_at of this Comment. # noqa: E501 + + + :return: The updated_at of this Comment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Comment. + + + :param updated_at: The updated_at of this Comment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this Comment. # noqa: E501 + + + :return: The user of this Comment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Comment. + + + :param user: The user of this Comment. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Comment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Comment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_email_option.py b/swagger_client/models/create_email_option.py new file mode 100644 index 0000000..3693156 --- /dev/null +++ b/swagger_client/models/create_email_option.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateEmailOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'emails': 'list[str]' + } + + attribute_map = { + 'emails': 'emails' + } + + def __init__(self, emails=None): # noqa: E501 + """CreateEmailOption - a model defined in Swagger""" # noqa: E501 + + self._emails = None + self.discriminator = None + + if emails is not None: + self.emails = emails + + @property + def emails(self): + """Gets the emails of this CreateEmailOption. # noqa: E501 + + email addresses to add # noqa: E501 + + :return: The emails of this CreateEmailOption. # noqa: E501 + :rtype: list[str] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this CreateEmailOption. + + email addresses to add # noqa: E501 + + :param emails: The emails of this CreateEmailOption. # noqa: E501 + :type: list[str] + """ + + self._emails = emails + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateEmailOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateEmailOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_fork_option.py b/swagger_client/models/create_fork_option.py new file mode 100644 index 0000000..252921c --- /dev/null +++ b/swagger_client/models/create_fork_option.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateForkOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organization': 'str' + } + + attribute_map = { + 'organization': 'organization' + } + + def __init__(self, organization=None): # noqa: E501 + """CreateForkOption - a model defined in Swagger""" # noqa: E501 + + self._organization = None + self.discriminator = None + + if organization is not None: + self.organization = organization + + @property + def organization(self): + """Gets the organization of this CreateForkOption. # noqa: E501 + + organization name, if forking into an organization # noqa: E501 + + :return: The organization of this CreateForkOption. # noqa: E501 + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this CreateForkOption. + + organization name, if forking into an organization # noqa: E501 + + :param organization: The organization of this CreateForkOption. # noqa: E501 + :type: str + """ + + self._organization = organization + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateForkOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateForkOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_gpg_key_option.py b/swagger_client/models/create_gpg_key_option.py new file mode 100644 index 0000000..a8094e2 --- /dev/null +++ b/swagger_client/models/create_gpg_key_option.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateGPGKeyOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'armored_public_key': 'str' + } + + attribute_map = { + 'armored_public_key': 'armored_public_key' + } + + def __init__(self, armored_public_key=None): # noqa: E501 + """CreateGPGKeyOption - a model defined in Swagger""" # noqa: E501 + + self._armored_public_key = None + self.discriminator = None + + self.armored_public_key = armored_public_key + + @property + def armored_public_key(self): + """Gets the armored_public_key of this CreateGPGKeyOption. # noqa: E501 + + An armored GPG key to add # noqa: E501 + + :return: The armored_public_key of this CreateGPGKeyOption. # noqa: E501 + :rtype: str + """ + return self._armored_public_key + + @armored_public_key.setter + def armored_public_key(self, armored_public_key): + """Sets the armored_public_key of this CreateGPGKeyOption. + + An armored GPG key to add # noqa: E501 + + :param armored_public_key: The armored_public_key of this CreateGPGKeyOption. # noqa: E501 + :type: str + """ + if armored_public_key is None: + raise ValueError("Invalid value for `armored_public_key`, must not be `None`") # noqa: E501 + + self._armored_public_key = armored_public_key + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateGPGKeyOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateGPGKeyOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_hook_option.py b/swagger_client/models/create_hook_option.py new file mode 100644 index 0000000..7738085 --- /dev/null +++ b/swagger_client/models/create_hook_option.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateHookOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'active': 'bool', + 'config': 'dict(str, str)', + 'events': 'list[str]', + 'type': 'str' + } + + attribute_map = { + 'active': 'active', + 'config': 'config', + 'events': 'events', + 'type': 'type' + } + + def __init__(self, active=False, config=None, events=None, type=None): # noqa: E501 + """CreateHookOption - a model defined in Swagger""" # noqa: E501 + + self._active = None + self._config = None + self._events = None + self._type = None + self.discriminator = None + + if active is not None: + self.active = active + self.config = config + if events is not None: + self.events = events + self.type = type + + @property + def active(self): + """Gets the active of this CreateHookOption. # noqa: E501 + + + :return: The active of this CreateHookOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this CreateHookOption. + + + :param active: The active of this CreateHookOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def config(self): + """Gets the config of this CreateHookOption. # noqa: E501 + + + :return: The config of this CreateHookOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this CreateHookOption. + + + :param config: The config of this CreateHookOption. # noqa: E501 + :type: dict(str, str) + """ + if config is None: + raise ValueError("Invalid value for `config`, must not be `None`") # noqa: E501 + + self._config = config + + @property + def events(self): + """Gets the events of this CreateHookOption. # noqa: E501 + + + :return: The events of this CreateHookOption. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this CreateHookOption. + + + :param events: The events of this CreateHookOption. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def type(self): + """Gets the type of this CreateHookOption. # noqa: E501 + + + :return: The type of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CreateHookOption. + + + :param type: The type of this CreateHookOption. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["gitea", "gogs", "slack", "discord"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateHookOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateHookOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_issue_comment_option.py b/swagger_client/models/create_issue_comment_option.py new file mode 100644 index 0000000..8377c3b --- /dev/null +++ b/swagger_client/models/create_issue_comment_option.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateIssueCommentOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): # noqa: E501 + """CreateIssueCommentOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self.discriminator = None + + self.body = body + + @property + def body(self): + """Gets the body of this CreateIssueCommentOption. # noqa: E501 + + + :return: The body of this CreateIssueCommentOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateIssueCommentOption. + + + :param body: The body of this CreateIssueCommentOption. # noqa: E501 + :type: str + """ + if body is None: + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateIssueCommentOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateIssueCommentOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_issue_option.py b/swagger_client/models/create_issue_option.py new file mode 100644 index 0000000..147d13e --- /dev/null +++ b/swagger_client/models/create_issue_option.py @@ -0,0 +1,304 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateIssueOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'body': 'str', + 'closed': 'bool', + 'due_date': 'datetime', + 'labels': 'list[int]', + 'milestone': 'int', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed': 'closed', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, body=None, closed=None, due_date=None, labels=None, milestone=None, title=None): # noqa: E501 + """CreateIssueOption - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._body = None + self._closed = None + self._due_date = None + self._labels = None + self._milestone = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if closed is not None: + self.closed = closed + if due_date is not None: + self.due_date = due_date + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + self.title = title + + @property + def assignee(self): + """Gets the assignee of this CreateIssueOption. # noqa: E501 + + username of assignee # noqa: E501 + + :return: The assignee of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this CreateIssueOption. + + username of assignee # noqa: E501 + + :param assignee: The assignee of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this CreateIssueOption. # noqa: E501 + + + :return: The assignees of this CreateIssueOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this CreateIssueOption. + + + :param assignees: The assignees of this CreateIssueOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this CreateIssueOption. # noqa: E501 + + + :return: The body of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateIssueOption. + + + :param body: The body of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed(self): + """Gets the closed of this CreateIssueOption. # noqa: E501 + + + :return: The closed of this CreateIssueOption. # noqa: E501 + :rtype: bool + """ + return self._closed + + @closed.setter + def closed(self, closed): + """Sets the closed of this CreateIssueOption. + + + :param closed: The closed of this CreateIssueOption. # noqa: E501 + :type: bool + """ + + self._closed = closed + + @property + def due_date(self): + """Gets the due_date of this CreateIssueOption. # noqa: E501 + + + :return: The due_date of this CreateIssueOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this CreateIssueOption. + + + :param due_date: The due_date of this CreateIssueOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def labels(self): + """Gets the labels of this CreateIssueOption. # noqa: E501 + + list of label ids # noqa: E501 + + :return: The labels of this CreateIssueOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this CreateIssueOption. + + list of label ids # noqa: E501 + + :param labels: The labels of this CreateIssueOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this CreateIssueOption. # noqa: E501 + + milestone id # noqa: E501 + + :return: The milestone of this CreateIssueOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this CreateIssueOption. + + milestone id # noqa: E501 + + :param milestone: The milestone of this CreateIssueOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def title(self): + """Gets the title of this CreateIssueOption. # noqa: E501 + + + :return: The title of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateIssueOption. + + + :param title: The title of this CreateIssueOption. # noqa: E501 + :type: str + """ + if title is None: + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateIssueOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateIssueOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_key_option.py b/swagger_client/models/create_key_option.py new file mode 100644 index 0000000..5d1d9a5 --- /dev/null +++ b/swagger_client/models/create_key_option.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateKeyOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'key': 'str', + 'read_only': 'bool', + 'title': 'str' + } + + attribute_map = { + 'key': 'key', + 'read_only': 'read_only', + 'title': 'title' + } + + def __init__(self, key=None, read_only=None, title=None): # noqa: E501 + """CreateKeyOption - a model defined in Swagger""" # noqa: E501 + + self._key = None + self._read_only = None + self._title = None + self.discriminator = None + + self.key = key + if read_only is not None: + self.read_only = read_only + self.title = title + + @property + def key(self): + """Gets the key of this CreateKeyOption. # noqa: E501 + + An armored SSH key to add # noqa: E501 + + :return: The key of this CreateKeyOption. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this CreateKeyOption. + + An armored SSH key to add # noqa: E501 + + :param key: The key of this CreateKeyOption. # noqa: E501 + :type: str + """ + if key is None: + raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 + + self._key = key + + @property + def read_only(self): + """Gets the read_only of this CreateKeyOption. # noqa: E501 + + Describe if the key has only read access or read/write # noqa: E501 + + :return: The read_only of this CreateKeyOption. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this CreateKeyOption. + + Describe if the key has only read access or read/write # noqa: E501 + + :param read_only: The read_only of this CreateKeyOption. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def title(self): + """Gets the title of this CreateKeyOption. # noqa: E501 + + Title of the key to add # noqa: E501 + + :return: The title of this CreateKeyOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateKeyOption. + + Title of the key to add # noqa: E501 + + :param title: The title of this CreateKeyOption. # noqa: E501 + :type: str + """ + if title is None: + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateKeyOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateKeyOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_label_option.py b/swagger_client/models/create_label_option.py new file mode 100644 index 0000000..ff6141c --- /dev/null +++ b/swagger_client/models/create_label_option.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateLabelOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'color': 'str', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'name': 'name' + } + + def __init__(self, color=None, name=None): # noqa: E501 + """CreateLabelOption - a model defined in Swagger""" # noqa: E501 + + self._color = None + self._name = None + self.discriminator = None + + self.color = color + self.name = name + + @property + def color(self): + """Gets the color of this CreateLabelOption. # noqa: E501 + + + :return: The color of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this CreateLabelOption. + + + :param color: The color of this CreateLabelOption. # noqa: E501 + :type: str + """ + if color is None: + raise ValueError("Invalid value for `color`, must not be `None`") # noqa: E501 + + self._color = color + + @property + def name(self): + """Gets the name of this CreateLabelOption. # noqa: E501 + + + :return: The name of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateLabelOption. + + + :param name: The name of this CreateLabelOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateLabelOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateLabelOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_milestone_option.py b/swagger_client/models/create_milestone_option.py new file mode 100644 index 0000000..3f3d34c --- /dev/null +++ b/swagger_client/models/create_milestone_option.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateMilestoneOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'due_on': 'datetime', + 'title': 'str' + } + + attribute_map = { + 'description': 'description', + 'due_on': 'due_on', + 'title': 'title' + } + + def __init__(self, description=None, due_on=None, title=None): # noqa: E501 + """CreateMilestoneOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._due_on = None + self._title = None + self.discriminator = None + + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if title is not None: + self.title = title + + @property + def description(self): + """Gets the description of this CreateMilestoneOption. # noqa: E501 + + + :return: The description of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateMilestoneOption. + + + :param description: The description of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this CreateMilestoneOption. # noqa: E501 + + + :return: The due_on of this CreateMilestoneOption. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this CreateMilestoneOption. + + + :param due_on: The due_on of this CreateMilestoneOption. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def title(self): + """Gets the title of this CreateMilestoneOption. # noqa: E501 + + + :return: The title of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateMilestoneOption. + + + :param title: The title of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateMilestoneOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateMilestoneOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_org_option.py b/swagger_client/models/create_org_option.py new file mode 100644 index 0000000..9bed438 --- /dev/null +++ b/swagger_client/models/create_org_option.py @@ -0,0 +1,220 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateOrgOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'full_name': 'str', + 'location': 'str', + 'username': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'full_name': 'full_name', + 'location': 'location', + 'username': 'username', + 'website': 'website' + } + + def __init__(self, description=None, full_name=None, location=None, username=None, website=None): # noqa: E501 + """CreateOrgOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._full_name = None + self._location = None + self._username = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + self.username = username + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this CreateOrgOption. # noqa: E501 + + + :return: The description of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateOrgOption. + + + :param description: The description of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def full_name(self): + """Gets the full_name of this CreateOrgOption. # noqa: E501 + + + :return: The full_name of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this CreateOrgOption. + + + :param full_name: The full_name of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this CreateOrgOption. # noqa: E501 + + + :return: The location of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this CreateOrgOption. + + + :param location: The location of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def username(self): + """Gets the username of this CreateOrgOption. # noqa: E501 + + + :return: The username of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this CreateOrgOption. + + + :param username: The username of this CreateOrgOption. # noqa: E501 + :type: str + """ + if username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def website(self): + """Gets the website of this CreateOrgOption. # noqa: E501 + + + :return: The website of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this CreateOrgOption. + + + :param website: The website of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._website = website + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateOrgOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateOrgOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_pull_request_option.py b/swagger_client/models/create_pull_request_option.py new file mode 100644 index 0000000..e682c89 --- /dev/null +++ b/swagger_client/models/create_pull_request_option.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreatePullRequestOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'base': 'str', + 'body': 'str', + 'due_date': 'datetime', + 'head': 'str', + 'labels': 'list[int]', + 'milestone': 'int', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'due_date': 'due_date', + 'head': 'head', + 'labels': 'labels', + 'milestone': 'milestone', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, base=None, body=None, due_date=None, head=None, labels=None, milestone=None, title=None): # noqa: E501 + """CreatePullRequestOption - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._due_date = None + self._head = None + self._labels = None + self._milestone = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if head is not None: + self.head = head + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if title is not None: + self.title = title + + @property + def assignee(self): + """Gets the assignee of this CreatePullRequestOption. # noqa: E501 + + + :return: The assignee of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this CreatePullRequestOption. + + + :param assignee: The assignee of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this CreatePullRequestOption. # noqa: E501 + + + :return: The assignees of this CreatePullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this CreatePullRequestOption. + + + :param assignees: The assignees of this CreatePullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this CreatePullRequestOption. # noqa: E501 + + + :return: The base of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this CreatePullRequestOption. + + + :param base: The base of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._base = base + + @property + def body(self): + """Gets the body of this CreatePullRequestOption. # noqa: E501 + + + :return: The body of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullRequestOption. + + + :param body: The body of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this CreatePullRequestOption. # noqa: E501 + + + :return: The due_date of this CreatePullRequestOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this CreatePullRequestOption. + + + :param due_date: The due_date of this CreatePullRequestOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def head(self): + """Gets the head of this CreatePullRequestOption. # noqa: E501 + + + :return: The head of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._head + + @head.setter + def head(self, head): + """Sets the head of this CreatePullRequestOption. + + + :param head: The head of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._head = head + + @property + def labels(self): + """Gets the labels of this CreatePullRequestOption. # noqa: E501 + + + :return: The labels of this CreatePullRequestOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this CreatePullRequestOption. + + + :param labels: The labels of this CreatePullRequestOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this CreatePullRequestOption. # noqa: E501 + + + :return: The milestone of this CreatePullRequestOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this CreatePullRequestOption. + + + :param milestone: The milestone of this CreatePullRequestOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def title(self): + """Gets the title of this CreatePullRequestOption. # noqa: E501 + + + :return: The title of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreatePullRequestOption. + + + :param title: The title of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreatePullRequestOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePullRequestOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_release_option.py b/swagger_client/models/create_release_option.py new file mode 100644 index 0000000..dbae5fd --- /dev/null +++ b/swagger_client/models/create_release_option.py @@ -0,0 +1,246 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateReleaseOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'draft': 'bool', + 'name': 'str', + 'prerelease': 'bool', + 'tag_name': 'str', + 'target_commitish': 'str' + } + + attribute_map = { + 'body': 'body', + 'draft': 'draft', + 'name': 'name', + 'prerelease': 'prerelease', + 'tag_name': 'tag_name', + 'target_commitish': 'target_commitish' + } + + def __init__(self, body=None, draft=None, name=None, prerelease=None, tag_name=None, target_commitish=None): # noqa: E501 + """CreateReleaseOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._draft = None + self._name = None + self._prerelease = None + self._tag_name = None + self._target_commitish = None + self.discriminator = None + + if body is not None: + self.body = body + if draft is not None: + self.draft = draft + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + self.tag_name = tag_name + if target_commitish is not None: + self.target_commitish = target_commitish + + @property + def body(self): + """Gets the body of this CreateReleaseOption. # noqa: E501 + + + :return: The body of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateReleaseOption. + + + :param body: The body of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def draft(self): + """Gets the draft of this CreateReleaseOption. # noqa: E501 + + + :return: The draft of this CreateReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this CreateReleaseOption. + + + :param draft: The draft of this CreateReleaseOption. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def name(self): + """Gets the name of this CreateReleaseOption. # noqa: E501 + + + :return: The name of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateReleaseOption. + + + :param name: The name of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this CreateReleaseOption. # noqa: E501 + + + :return: The prerelease of this CreateReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this CreateReleaseOption. + + + :param prerelease: The prerelease of this CreateReleaseOption. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def tag_name(self): + """Gets the tag_name of this CreateReleaseOption. # noqa: E501 + + + :return: The tag_name of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this CreateReleaseOption. + + + :param tag_name: The tag_name of this CreateReleaseOption. # noqa: E501 + :type: str + """ + if tag_name is None: + raise ValueError("Invalid value for `tag_name`, must not be `None`") # noqa: E501 + + self._tag_name = tag_name + + @property + def target_commitish(self): + """Gets the target_commitish of this CreateReleaseOption. # noqa: E501 + + + :return: The target_commitish of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this CreateReleaseOption. + + + :param target_commitish: The target_commitish of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateReleaseOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateReleaseOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_repo_option.py b/swagger_client/models/create_repo_option.py new file mode 100644 index 0000000..e844fc3 --- /dev/null +++ b/swagger_client/models/create_repo_option.py @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateRepoOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'auto_init': 'bool', + 'description': 'str', + 'gitignores': 'str', + 'license': 'str', + 'name': 'str', + 'private': 'bool', + 'readme': 'str' + } + + attribute_map = { + 'auto_init': 'auto_init', + 'description': 'description', + 'gitignores': 'gitignores', + 'license': 'license', + 'name': 'name', + 'private': 'private', + 'readme': 'readme' + } + + def __init__(self, auto_init=None, description=None, gitignores=None, license=None, name=None, private=None, readme=None): # noqa: E501 + """CreateRepoOption - a model defined in Swagger""" # noqa: E501 + + self._auto_init = None + self._description = None + self._gitignores = None + self._license = None + self._name = None + self._private = None + self._readme = None + self.discriminator = None + + if auto_init is not None: + self.auto_init = auto_init + if description is not None: + self.description = description + if gitignores is not None: + self.gitignores = gitignores + if license is not None: + self.license = license + self.name = name + if private is not None: + self.private = private + if readme is not None: + self.readme = readme + + @property + def auto_init(self): + """Gets the auto_init of this CreateRepoOption. # noqa: E501 + + Whether the repository should be auto-intialized? # noqa: E501 + + :return: The auto_init of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._auto_init + + @auto_init.setter + def auto_init(self, auto_init): + """Sets the auto_init of this CreateRepoOption. + + Whether the repository should be auto-intialized? # noqa: E501 + + :param auto_init: The auto_init of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._auto_init = auto_init + + @property + def description(self): + """Gets the description of this CreateRepoOption. # noqa: E501 + + Description of the repository to create # noqa: E501 + + :return: The description of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateRepoOption. + + Description of the repository to create # noqa: E501 + + :param description: The description of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def gitignores(self): + """Gets the gitignores of this CreateRepoOption. # noqa: E501 + + Gitignores to use # noqa: E501 + + :return: The gitignores of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._gitignores + + @gitignores.setter + def gitignores(self, gitignores): + """Sets the gitignores of this CreateRepoOption. + + Gitignores to use # noqa: E501 + + :param gitignores: The gitignores of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._gitignores = gitignores + + @property + def license(self): + """Gets the license of this CreateRepoOption. # noqa: E501 + + License to use # noqa: E501 + + :return: The license of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._license + + @license.setter + def license(self, license): + """Sets the license of this CreateRepoOption. + + License to use # noqa: E501 + + :param license: The license of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._license = license + + @property + def name(self): + """Gets the name of this CreateRepoOption. # noqa: E501 + + Name of the repository to create # noqa: E501 + + :return: The name of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateRepoOption. + + Name of the repository to create # noqa: E501 + + :param name: The name of this CreateRepoOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def private(self): + """Gets the private of this CreateRepoOption. # noqa: E501 + + Whether the repository is private # noqa: E501 + + :return: The private of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this CreateRepoOption. + + Whether the repository is private # noqa: E501 + + :param private: The private of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def readme(self): + """Gets the readme of this CreateRepoOption. # noqa: E501 + + Readme of the repository to create # noqa: E501 + + :return: The readme of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._readme + + @readme.setter + def readme(self, readme): + """Sets the readme of this CreateRepoOption. + + Readme of the repository to create # noqa: E501 + + :param readme: The readme of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._readme = readme + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateRepoOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateRepoOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_status_option.py b/swagger_client/models/create_status_option.py new file mode 100644 index 0000000..483ddc1 --- /dev/null +++ b/swagger_client/models/create_status_option.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.status_state import StatusState # noqa: F401,E501 + + +class CreateStatusOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'context': 'str', + 'description': 'str', + 'state': 'StatusState', + 'target_url': 'str' + } + + attribute_map = { + 'context': 'context', + 'description': 'description', + 'state': 'state', + 'target_url': 'target_url' + } + + def __init__(self, context=None, description=None, state=None, target_url=None): # noqa: E501 + """CreateStatusOption - a model defined in Swagger""" # noqa: E501 + + self._context = None + self._description = None + self._state = None + self._target_url = None + self.discriminator = None + + if context is not None: + self.context = context + if description is not None: + self.description = description + if state is not None: + self.state = state + if target_url is not None: + self.target_url = target_url + + @property + def context(self): + """Gets the context of this CreateStatusOption. # noqa: E501 + + + :return: The context of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this CreateStatusOption. + + + :param context: The context of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def description(self): + """Gets the description of this CreateStatusOption. # noqa: E501 + + + :return: The description of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateStatusOption. + + + :param description: The description of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def state(self): + """Gets the state of this CreateStatusOption. # noqa: E501 + + + :return: The state of this CreateStatusOption. # noqa: E501 + :rtype: StatusState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CreateStatusOption. + + + :param state: The state of this CreateStatusOption. # noqa: E501 + :type: StatusState + """ + + self._state = state + + @property + def target_url(self): + """Gets the target_url of this CreateStatusOption. # noqa: E501 + + + :return: The target_url of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._target_url + + @target_url.setter + def target_url(self, target_url): + """Sets the target_url of this CreateStatusOption. + + + :param target_url: The target_url of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._target_url = target_url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateStatusOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateStatusOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_team_option.py b/swagger_client/models/create_team_option.py new file mode 100644 index 0000000..37f211a --- /dev/null +++ b/swagger_client/models/create_team_option.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateTeamOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'name': 'str', + 'permission': 'str', + 'units': 'list[str]' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'permission': 'permission', + 'units': 'units' + } + + def __init__(self, description=None, name=None, permission=None, units=None): # noqa: E501 + """CreateTeamOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._name = None + self._permission = None + self._units = None + self.discriminator = None + + if description is not None: + self.description = description + self.name = name + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + + @property + def description(self): + """Gets the description of this CreateTeamOption. # noqa: E501 + + + :return: The description of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateTeamOption. + + + :param description: The description of this CreateTeamOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this CreateTeamOption. # noqa: E501 + + + :return: The name of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateTeamOption. + + + :param name: The name of this CreateTeamOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def permission(self): + """Gets the permission of this CreateTeamOption. # noqa: E501 + + + :return: The permission of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this CreateTeamOption. + + + :param permission: The permission of this CreateTeamOption. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if permission not in allowed_values: + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this CreateTeamOption. # noqa: E501 + + + :return: The units of this CreateTeamOption. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this CreateTeamOption. + + + :param units: The units of this CreateTeamOption. # noqa: E501 + :type: list[str] + """ + + self._units = units + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateTeamOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateTeamOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/create_user_option.py b/swagger_client/models/create_user_option.py new file mode 100644 index 0000000..42904dd --- /dev/null +++ b/swagger_client/models/create_user_option.py @@ -0,0 +1,274 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateUserOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'full_name': 'str', + 'login_name': 'str', + 'password': 'str', + 'send_notify': 'bool', + 'source_id': 'int', + 'username': 'str' + } + + attribute_map = { + 'email': 'email', + 'full_name': 'full_name', + 'login_name': 'login_name', + 'password': 'password', + 'send_notify': 'send_notify', + 'source_id': 'source_id', + 'username': 'username' + } + + def __init__(self, email=None, full_name=None, login_name=None, password=None, send_notify=None, source_id=None, username=None): # noqa: E501 + """CreateUserOption - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._full_name = None + self._login_name = None + self._password = None + self._send_notify = None + self._source_id = None + self._username = None + self.discriminator = None + + self.email = email + if full_name is not None: + self.full_name = full_name + if login_name is not None: + self.login_name = login_name + self.password = password + if send_notify is not None: + self.send_notify = send_notify + if source_id is not None: + self.source_id = source_id + self.username = username + + @property + def email(self): + """Gets the email of this CreateUserOption. # noqa: E501 + + + :return: The email of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CreateUserOption. + + + :param email: The email of this CreateUserOption. # noqa: E501 + :type: str + """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this CreateUserOption. # noqa: E501 + + + :return: The full_name of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this CreateUserOption. + + + :param full_name: The full_name of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def login_name(self): + """Gets the login_name of this CreateUserOption. # noqa: E501 + + + :return: The login_name of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this CreateUserOption. + + + :param login_name: The login_name of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._login_name = login_name + + @property + def password(self): + """Gets the password of this CreateUserOption. # noqa: E501 + + + :return: The password of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this CreateUserOption. + + + :param password: The password of this CreateUserOption. # noqa: E501 + :type: str + """ + if password is None: + raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 + + self._password = password + + @property + def send_notify(self): + """Gets the send_notify of this CreateUserOption. # noqa: E501 + + + :return: The send_notify of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._send_notify + + @send_notify.setter + def send_notify(self, send_notify): + """Sets the send_notify of this CreateUserOption. + + + :param send_notify: The send_notify of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._send_notify = send_notify + + @property + def source_id(self): + """Gets the source_id of this CreateUserOption. # noqa: E501 + + + :return: The source_id of this CreateUserOption. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this CreateUserOption. + + + :param source_id: The source_id of this CreateUserOption. # noqa: E501 + :type: int + """ + + self._source_id = source_id + + @property + def username(self): + """Gets the username of this CreateUserOption. # noqa: E501 + + + :return: The username of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this CreateUserOption. + + + :param username: The username of this CreateUserOption. # noqa: E501 + :type: str + """ + if username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateUserOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateUserOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/delete_email_option.py b/swagger_client/models/delete_email_option.py new file mode 100644 index 0000000..ab1cb1c --- /dev/null +++ b/swagger_client/models/delete_email_option.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class DeleteEmailOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'emails': 'list[str]' + } + + attribute_map = { + 'emails': 'emails' + } + + def __init__(self, emails=None): # noqa: E501 + """DeleteEmailOption - a model defined in Swagger""" # noqa: E501 + + self._emails = None + self.discriminator = None + + if emails is not None: + self.emails = emails + + @property + def emails(self): + """Gets the emails of this DeleteEmailOption. # noqa: E501 + + email addresses to delete # noqa: E501 + + :return: The emails of this DeleteEmailOption. # noqa: E501 + :rtype: list[str] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this DeleteEmailOption. + + email addresses to delete # noqa: E501 + + :param emails: The emails of this DeleteEmailOption. # noqa: E501 + :type: list[str] + """ + + self._emails = emails + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeleteEmailOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteEmailOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/deploy_key.py b/swagger_client/models/deploy_key.py new file mode 100644 index 0000000..4ef290e --- /dev/null +++ b/swagger_client/models/deploy_key.py @@ -0,0 +1,325 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.repository import Repository # noqa: F401,E501 + + +class DeployKey(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created_at': 'datetime', + 'fingerprint': 'str', + 'id': 'int', + 'key': 'str', + 'key_id': 'int', + 'read_only': 'bool', + 'repository': 'Repository', + 'title': 'str', + 'url': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'fingerprint': 'fingerprint', + 'id': 'id', + 'key': 'key', + 'key_id': 'key_id', + 'read_only': 'read_only', + 'repository': 'repository', + 'title': 'title', + 'url': 'url' + } + + def __init__(self, created_at=None, fingerprint=None, id=None, key=None, key_id=None, read_only=None, repository=None, title=None, url=None): # noqa: E501 + """DeployKey - a model defined in Swagger""" # noqa: E501 + + self._created_at = None + self._fingerprint = None + self._id = None + self._key = None + self._key_id = None + self._read_only = None + self._repository = None + self._title = None + self._url = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if fingerprint is not None: + self.fingerprint = fingerprint + if id is not None: + self.id = id + if key is not None: + self.key = key + if key_id is not None: + self.key_id = key_id + if read_only is not None: + self.read_only = read_only + if repository is not None: + self.repository = repository + if title is not None: + self.title = title + if url is not None: + self.url = url + + @property + def created_at(self): + """Gets the created_at of this DeployKey. # noqa: E501 + + + :return: The created_at of this DeployKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this DeployKey. + + + :param created_at: The created_at of this DeployKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def fingerprint(self): + """Gets the fingerprint of this DeployKey. # noqa: E501 + + + :return: The fingerprint of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this DeployKey. + + + :param fingerprint: The fingerprint of this DeployKey. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def id(self): + """Gets the id of this DeployKey. # noqa: E501 + + + :return: The id of this DeployKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeployKey. + + + :param id: The id of this DeployKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key(self): + """Gets the key of this DeployKey. # noqa: E501 + + + :return: The key of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this DeployKey. + + + :param key: The key of this DeployKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def key_id(self): + """Gets the key_id of this DeployKey. # noqa: E501 + + + :return: The key_id of this DeployKey. # noqa: E501 + :rtype: int + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """Sets the key_id of this DeployKey. + + + :param key_id: The key_id of this DeployKey. # noqa: E501 + :type: int + """ + + self._key_id = key_id + + @property + def read_only(self): + """Gets the read_only of this DeployKey. # noqa: E501 + + + :return: The read_only of this DeployKey. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this DeployKey. + + + :param read_only: The read_only of this DeployKey. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def repository(self): + """Gets the repository of this DeployKey. # noqa: E501 + + + :return: The repository of this DeployKey. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this DeployKey. + + + :param repository: The repository of this DeployKey. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def title(self): + """Gets the title of this DeployKey. # noqa: E501 + + + :return: The title of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this DeployKey. + + + :param title: The title of this DeployKey. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def url(self): + """Gets the url of this DeployKey. # noqa: E501 + + + :return: The url of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this DeployKey. + + + :param url: The url of this DeployKey. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeployKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeployKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_attachment_options.py b/swagger_client/models/edit_attachment_options.py new file mode 100644 index 0000000..8a19c9c --- /dev/null +++ b/swagger_client/models/edit_attachment_options.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditAttachmentOptions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): # noqa: E501 + """EditAttachmentOptions - a model defined in Swagger""" # noqa: E501 + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this EditAttachmentOptions. # noqa: E501 + + + :return: The name of this EditAttachmentOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditAttachmentOptions. + + + :param name: The name of this EditAttachmentOptions. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditAttachmentOptions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditAttachmentOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_deadline_option.py b/swagger_client/models/edit_deadline_option.py new file mode 100644 index 0000000..1c4d389 --- /dev/null +++ b/swagger_client/models/edit_deadline_option.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditDeadlineOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'due_date': 'datetime' + } + + attribute_map = { + 'due_date': 'due_date' + } + + def __init__(self, due_date=None): # noqa: E501 + """EditDeadlineOption - a model defined in Swagger""" # noqa: E501 + + self._due_date = None + self.discriminator = None + + self.due_date = due_date + + @property + def due_date(self): + """Gets the due_date of this EditDeadlineOption. # noqa: E501 + + + :return: The due_date of this EditDeadlineOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditDeadlineOption. + + + :param due_date: The due_date of this EditDeadlineOption. # noqa: E501 + :type: datetime + """ + if due_date is None: + raise ValueError("Invalid value for `due_date`, must not be `None`") # noqa: E501 + + self._due_date = due_date + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditDeadlineOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditDeadlineOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_hook_option.py b/swagger_client/models/edit_hook_option.py new file mode 100644 index 0000000..db0748a --- /dev/null +++ b/swagger_client/models/edit_hook_option.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditHookOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'active': 'bool', + 'config': 'dict(str, str)', + 'events': 'list[str]' + } + + attribute_map = { + 'active': 'active', + 'config': 'config', + 'events': 'events' + } + + def __init__(self, active=None, config=None, events=None): # noqa: E501 + """EditHookOption - a model defined in Swagger""" # noqa: E501 + + self._active = None + self._config = None + self._events = None + self.discriminator = None + + if active is not None: + self.active = active + if config is not None: + self.config = config + if events is not None: + self.events = events + + @property + def active(self): + """Gets the active of this EditHookOption. # noqa: E501 + + + :return: The active of this EditHookOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this EditHookOption. + + + :param active: The active of this EditHookOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def config(self): + """Gets the config of this EditHookOption. # noqa: E501 + + + :return: The config of this EditHookOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this EditHookOption. + + + :param config: The config of this EditHookOption. # noqa: E501 + :type: dict(str, str) + """ + + self._config = config + + @property + def events(self): + """Gets the events of this EditHookOption. # noqa: E501 + + + :return: The events of this EditHookOption. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this EditHookOption. + + + :param events: The events of this EditHookOption. # noqa: E501 + :type: list[str] + """ + + self._events = events + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditHookOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditHookOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_issue_comment_option.py b/swagger_client/models/edit_issue_comment_option.py new file mode 100644 index 0000000..328cd0d --- /dev/null +++ b/swagger_client/models/edit_issue_comment_option.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditIssueCommentOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): # noqa: E501 + """EditIssueCommentOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self.discriminator = None + + self.body = body + + @property + def body(self): + """Gets the body of this EditIssueCommentOption. # noqa: E501 + + + :return: The body of this EditIssueCommentOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditIssueCommentOption. + + + :param body: The body of this EditIssueCommentOption. # noqa: E501 + :type: str + """ + if body is None: + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditIssueCommentOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditIssueCommentOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_issue_option.py b/swagger_client/models/edit_issue_option.py new file mode 100644 index 0000000..8e992db --- /dev/null +++ b/swagger_client/models/edit_issue_option.py @@ -0,0 +1,271 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditIssueOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'body': 'str', + 'due_date': 'datetime', + 'milestone': 'int', + 'state': 'str', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'due_date': 'due_date', + 'milestone': 'milestone', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, body=None, due_date=None, milestone=None, state=None, title=None): # noqa: E501 + """EditIssueOption - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._body = None + self._due_date = None + self._milestone = None + self._state = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if milestone is not None: + self.milestone = milestone + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def assignee(self): + """Gets the assignee of this EditIssueOption. # noqa: E501 + + + :return: The assignee of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this EditIssueOption. + + + :param assignee: The assignee of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this EditIssueOption. # noqa: E501 + + + :return: The assignees of this EditIssueOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this EditIssueOption. + + + :param assignees: The assignees of this EditIssueOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this EditIssueOption. # noqa: E501 + + + :return: The body of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditIssueOption. + + + :param body: The body of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this EditIssueOption. # noqa: E501 + + + :return: The due_date of this EditIssueOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditIssueOption. + + + :param due_date: The due_date of this EditIssueOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def milestone(self): + """Gets the milestone of this EditIssueOption. # noqa: E501 + + + :return: The milestone of this EditIssueOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this EditIssueOption. + + + :param milestone: The milestone of this EditIssueOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def state(self): + """Gets the state of this EditIssueOption. # noqa: E501 + + + :return: The state of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditIssueOption. + + + :param state: The state of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditIssueOption. # noqa: E501 + + + :return: The title of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditIssueOption. + + + :param title: The title of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditIssueOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditIssueOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_label_option.py b/swagger_client/models/edit_label_option.py new file mode 100644 index 0000000..278a4d9 --- /dev/null +++ b/swagger_client/models/edit_label_option.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditLabelOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'color': 'str', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'name': 'name' + } + + def __init__(self, color=None, name=None): # noqa: E501 + """EditLabelOption - a model defined in Swagger""" # noqa: E501 + + self._color = None + self._name = None + self.discriminator = None + + if color is not None: + self.color = color + if name is not None: + self.name = name + + @property + def color(self): + """Gets the color of this EditLabelOption. # noqa: E501 + + + :return: The color of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this EditLabelOption. + + + :param color: The color of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def name(self): + """Gets the name of this EditLabelOption. # noqa: E501 + + + :return: The name of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditLabelOption. + + + :param name: The name of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditLabelOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditLabelOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_milestone_option.py b/swagger_client/models/edit_milestone_option.py new file mode 100644 index 0000000..e72dff5 --- /dev/null +++ b/swagger_client/models/edit_milestone_option.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditMilestoneOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'due_on': 'datetime', + 'state': 'str', + 'title': 'str' + } + + attribute_map = { + 'description': 'description', + 'due_on': 'due_on', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, description=None, due_on=None, state=None, title=None): # noqa: E501 + """EditMilestoneOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._due_on = None + self._state = None + self._title = None + self.discriminator = None + + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def description(self): + """Gets the description of this EditMilestoneOption. # noqa: E501 + + + :return: The description of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditMilestoneOption. + + + :param description: The description of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this EditMilestoneOption. # noqa: E501 + + + :return: The due_on of this EditMilestoneOption. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this EditMilestoneOption. + + + :param due_on: The due_on of this EditMilestoneOption. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def state(self): + """Gets the state of this EditMilestoneOption. # noqa: E501 + + + :return: The state of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditMilestoneOption. + + + :param state: The state of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditMilestoneOption. # noqa: E501 + + + :return: The title of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditMilestoneOption. + + + :param title: The title of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditMilestoneOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditMilestoneOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_org_option.py b/swagger_client/models/edit_org_option.py new file mode 100644 index 0000000..23edb06 --- /dev/null +++ b/swagger_client/models/edit_org_option.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditOrgOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'full_name': 'str', + 'location': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'full_name': 'full_name', + 'location': 'location', + 'website': 'website' + } + + def __init__(self, description=None, full_name=None, location=None, website=None): # noqa: E501 + """EditOrgOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._full_name = None + self._location = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this EditOrgOption. # noqa: E501 + + + :return: The description of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditOrgOption. + + + :param description: The description of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def full_name(self): + """Gets the full_name of this EditOrgOption. # noqa: E501 + + + :return: The full_name of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this EditOrgOption. + + + :param full_name: The full_name of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this EditOrgOption. # noqa: E501 + + + :return: The location of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this EditOrgOption. + + + :param location: The location of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def website(self): + """Gets the website of this EditOrgOption. # noqa: E501 + + + :return: The website of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditOrgOption. + + + :param website: The website of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._website = website + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditOrgOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditOrgOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_pull_request_option.py b/swagger_client/models/edit_pull_request_option.py new file mode 100644 index 0000000..4e8f478 --- /dev/null +++ b/swagger_client/models/edit_pull_request_option.py @@ -0,0 +1,297 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditPullRequestOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'body': 'str', + 'due_date': 'datetime', + 'labels': 'list[int]', + 'milestone': 'int', + 'state': 'str', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, body=None, due_date=None, labels=None, milestone=None, state=None, title=None): # noqa: E501 + """EditPullRequestOption - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._body = None + self._due_date = None + self._labels = None + self._milestone = None + self._state = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def assignee(self): + """Gets the assignee of this EditPullRequestOption. # noqa: E501 + + + :return: The assignee of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this EditPullRequestOption. + + + :param assignee: The assignee of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this EditPullRequestOption. # noqa: E501 + + + :return: The assignees of this EditPullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this EditPullRequestOption. + + + :param assignees: The assignees of this EditPullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this EditPullRequestOption. # noqa: E501 + + + :return: The body of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditPullRequestOption. + + + :param body: The body of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this EditPullRequestOption. # noqa: E501 + + + :return: The due_date of this EditPullRequestOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditPullRequestOption. + + + :param due_date: The due_date of this EditPullRequestOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def labels(self): + """Gets the labels of this EditPullRequestOption. # noqa: E501 + + + :return: The labels of this EditPullRequestOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this EditPullRequestOption. + + + :param labels: The labels of this EditPullRequestOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this EditPullRequestOption. # noqa: E501 + + + :return: The milestone of this EditPullRequestOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this EditPullRequestOption. + + + :param milestone: The milestone of this EditPullRequestOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def state(self): + """Gets the state of this EditPullRequestOption. # noqa: E501 + + + :return: The state of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditPullRequestOption. + + + :param state: The state of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditPullRequestOption. # noqa: E501 + + + :return: The title of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditPullRequestOption. + + + :param title: The title of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditPullRequestOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditPullRequestOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_release_option.py b/swagger_client/models/edit_release_option.py new file mode 100644 index 0000000..891a2cc --- /dev/null +++ b/swagger_client/models/edit_release_option.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditReleaseOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'draft': 'bool', + 'name': 'str', + 'prerelease': 'bool', + 'tag_name': 'str', + 'target_commitish': 'str' + } + + attribute_map = { + 'body': 'body', + 'draft': 'draft', + 'name': 'name', + 'prerelease': 'prerelease', + 'tag_name': 'tag_name', + 'target_commitish': 'target_commitish' + } + + def __init__(self, body=None, draft=None, name=None, prerelease=None, tag_name=None, target_commitish=None): # noqa: E501 + """EditReleaseOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._draft = None + self._name = None + self._prerelease = None + self._tag_name = None + self._target_commitish = None + self.discriminator = None + + if body is not None: + self.body = body + if draft is not None: + self.draft = draft + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + if tag_name is not None: + self.tag_name = tag_name + if target_commitish is not None: + self.target_commitish = target_commitish + + @property + def body(self): + """Gets the body of this EditReleaseOption. # noqa: E501 + + + :return: The body of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditReleaseOption. + + + :param body: The body of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def draft(self): + """Gets the draft of this EditReleaseOption. # noqa: E501 + + + :return: The draft of this EditReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this EditReleaseOption. + + + :param draft: The draft of this EditReleaseOption. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def name(self): + """Gets the name of this EditReleaseOption. # noqa: E501 + + + :return: The name of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditReleaseOption. + + + :param name: The name of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this EditReleaseOption. # noqa: E501 + + + :return: The prerelease of this EditReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this EditReleaseOption. + + + :param prerelease: The prerelease of this EditReleaseOption. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def tag_name(self): + """Gets the tag_name of this EditReleaseOption. # noqa: E501 + + + :return: The tag_name of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this EditReleaseOption. + + + :param tag_name: The tag_name of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._tag_name = tag_name + + @property + def target_commitish(self): + """Gets the target_commitish of this EditReleaseOption. # noqa: E501 + + + :return: The target_commitish of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this EditReleaseOption. + + + :param target_commitish: The target_commitish of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditReleaseOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditReleaseOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_team_option.py b/swagger_client/models/edit_team_option.py new file mode 100644 index 0000000..556cc12 --- /dev/null +++ b/swagger_client/models/edit_team_option.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditTeamOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'name': 'str', + 'permission': 'str', + 'units': 'list[str]' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'permission': 'permission', + 'units': 'units' + } + + def __init__(self, description=None, name=None, permission=None, units=None): # noqa: E501 + """EditTeamOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._name = None + self._permission = None + self._units = None + self.discriminator = None + + if description is not None: + self.description = description + self.name = name + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + + @property + def description(self): + """Gets the description of this EditTeamOption. # noqa: E501 + + + :return: The description of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditTeamOption. + + + :param description: The description of this EditTeamOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this EditTeamOption. # noqa: E501 + + + :return: The name of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditTeamOption. + + + :param name: The name of this EditTeamOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def permission(self): + """Gets the permission of this EditTeamOption. # noqa: E501 + + + :return: The permission of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this EditTeamOption. + + + :param permission: The permission of this EditTeamOption. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if permission not in allowed_values: + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this EditTeamOption. # noqa: E501 + + + :return: The units of this EditTeamOption. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this EditTeamOption. + + + :param units: The units of this EditTeamOption. # noqa: E501 + :type: list[str] + """ + + self._units = units + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditTeamOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditTeamOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/edit_user_option.py b/swagger_client/models/edit_user_option.py new file mode 100644 index 0000000..f7b93ec --- /dev/null +++ b/swagger_client/models/edit_user_option.py @@ -0,0 +1,454 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditUserOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'active': 'bool', + 'admin': 'bool', + 'allow_create_organization': 'bool', + 'allow_git_hook': 'bool', + 'allow_import_local': 'bool', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'login_name': 'str', + 'max_repo_creation': 'int', + 'password': 'str', + 'prohibit_login': 'bool', + 'source_id': 'int', + 'website': 'str' + } + + attribute_map = { + 'active': 'active', + 'admin': 'admin', + 'allow_create_organization': 'allow_create_organization', + 'allow_git_hook': 'allow_git_hook', + 'allow_import_local': 'allow_import_local', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'login_name': 'login_name', + 'max_repo_creation': 'max_repo_creation', + 'password': 'password', + 'prohibit_login': 'prohibit_login', + 'source_id': 'source_id', + 'website': 'website' + } + + def __init__(self, active=None, admin=None, allow_create_organization=None, allow_git_hook=None, allow_import_local=None, email=None, full_name=None, location=None, login_name=None, max_repo_creation=None, password=None, prohibit_login=None, source_id=None, website=None): # noqa: E501 + """EditUserOption - a model defined in Swagger""" # noqa: E501 + + self._active = None + self._admin = None + self._allow_create_organization = None + self._allow_git_hook = None + self._allow_import_local = None + self._email = None + self._full_name = None + self._location = None + self._login_name = None + self._max_repo_creation = None + self._password = None + self._prohibit_login = None + self._source_id = None + self._website = None + self.discriminator = None + + if active is not None: + self.active = active + if admin is not None: + self.admin = admin + if allow_create_organization is not None: + self.allow_create_organization = allow_create_organization + if allow_git_hook is not None: + self.allow_git_hook = allow_git_hook + if allow_import_local is not None: + self.allow_import_local = allow_import_local + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if login_name is not None: + self.login_name = login_name + if max_repo_creation is not None: + self.max_repo_creation = max_repo_creation + if password is not None: + self.password = password + if prohibit_login is not None: + self.prohibit_login = prohibit_login + if source_id is not None: + self.source_id = source_id + if website is not None: + self.website = website + + @property + def active(self): + """Gets the active of this EditUserOption. # noqa: E501 + + + :return: The active of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this EditUserOption. + + + :param active: The active of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def admin(self): + """Gets the admin of this EditUserOption. # noqa: E501 + + + :return: The admin of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this EditUserOption. + + + :param admin: The admin of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._admin = admin + + @property + def allow_create_organization(self): + """Gets the allow_create_organization of this EditUserOption. # noqa: E501 + + + :return: The allow_create_organization of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_create_organization + + @allow_create_organization.setter + def allow_create_organization(self, allow_create_organization): + """Sets the allow_create_organization of this EditUserOption. + + + :param allow_create_organization: The allow_create_organization of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_create_organization = allow_create_organization + + @property + def allow_git_hook(self): + """Gets the allow_git_hook of this EditUserOption. # noqa: E501 + + + :return: The allow_git_hook of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_git_hook + + @allow_git_hook.setter + def allow_git_hook(self, allow_git_hook): + """Sets the allow_git_hook of this EditUserOption. + + + :param allow_git_hook: The allow_git_hook of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_git_hook = allow_git_hook + + @property + def allow_import_local(self): + """Gets the allow_import_local of this EditUserOption. # noqa: E501 + + + :return: The allow_import_local of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_import_local + + @allow_import_local.setter + def allow_import_local(self, allow_import_local): + """Sets the allow_import_local of this EditUserOption. + + + :param allow_import_local: The allow_import_local of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_import_local = allow_import_local + + @property + def email(self): + """Gets the email of this EditUserOption. # noqa: E501 + + + :return: The email of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this EditUserOption. + + + :param email: The email of this EditUserOption. # noqa: E501 + :type: str + """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this EditUserOption. # noqa: E501 + + + :return: The full_name of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this EditUserOption. + + + :param full_name: The full_name of this EditUserOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this EditUserOption. # noqa: E501 + + + :return: The location of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this EditUserOption. + + + :param location: The location of this EditUserOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def login_name(self): + """Gets the login_name of this EditUserOption. # noqa: E501 + + + :return: The login_name of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this EditUserOption. + + + :param login_name: The login_name of this EditUserOption. # noqa: E501 + :type: str + """ + + self._login_name = login_name + + @property + def max_repo_creation(self): + """Gets the max_repo_creation of this EditUserOption. # noqa: E501 + + + :return: The max_repo_creation of this EditUserOption. # noqa: E501 + :rtype: int + """ + return self._max_repo_creation + + @max_repo_creation.setter + def max_repo_creation(self, max_repo_creation): + """Sets the max_repo_creation of this EditUserOption. + + + :param max_repo_creation: The max_repo_creation of this EditUserOption. # noqa: E501 + :type: int + """ + + self._max_repo_creation = max_repo_creation + + @property + def password(self): + """Gets the password of this EditUserOption. # noqa: E501 + + + :return: The password of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this EditUserOption. + + + :param password: The password of this EditUserOption. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def prohibit_login(self): + """Gets the prohibit_login of this EditUserOption. # noqa: E501 + + + :return: The prohibit_login of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._prohibit_login + + @prohibit_login.setter + def prohibit_login(self, prohibit_login): + """Sets the prohibit_login of this EditUserOption. + + + :param prohibit_login: The prohibit_login of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._prohibit_login = prohibit_login + + @property + def source_id(self): + """Gets the source_id of this EditUserOption. # noqa: E501 + + + :return: The source_id of this EditUserOption. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this EditUserOption. + + + :param source_id: The source_id of this EditUserOption. # noqa: E501 + :type: int + """ + + self._source_id = source_id + + @property + def website(self): + """Gets the website of this EditUserOption. # noqa: E501 + + + :return: The website of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditUserOption. + + + :param website: The website of this EditUserOption. # noqa: E501 + :type: str + """ + + self._website = website + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditUserOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditUserOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/email.py b/swagger_client/models/email.py new file mode 100644 index 0000000..edfb8ac --- /dev/null +++ b/swagger_client/models/email.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Email(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'primary': 'bool', + 'verified': 'bool' + } + + attribute_map = { + 'email': 'email', + 'primary': 'primary', + 'verified': 'verified' + } + + def __init__(self, email=None, primary=None, verified=None): # noqa: E501 + """Email - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._primary = None + self._verified = None + self.discriminator = None + + if email is not None: + self.email = email + if primary is not None: + self.primary = primary + if verified is not None: + self.verified = verified + + @property + def email(self): + """Gets the email of this Email. # noqa: E501 + + + :return: The email of this Email. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Email. + + + :param email: The email of this Email. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def primary(self): + """Gets the primary of this Email. # noqa: E501 + + + :return: The primary of this Email. # noqa: E501 + :rtype: bool + """ + return self._primary + + @primary.setter + def primary(self, primary): + """Sets the primary of this Email. + + + :param primary: The primary of this Email. # noqa: E501 + :type: bool + """ + + self._primary = primary + + @property + def verified(self): + """Gets the verified of this Email. # noqa: E501 + + + :return: The verified of this Email. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this Email. + + + :param verified: The verified of this Email. # noqa: E501 + :type: bool + """ + + self._verified = verified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Email, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Email): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/git_entry.py b/swagger_client/models/git_entry.py new file mode 100644 index 0000000..bfe7b29 --- /dev/null +++ b/swagger_client/models/git_entry.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GitEntry(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'mode': 'str', + 'path': 'str', + 'sha': 'str', + 'size': 'int', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'mode': 'mode', + 'path': 'path', + 'sha': 'sha', + 'size': 'size', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, mode=None, path=None, sha=None, size=None, type=None, url=None): # noqa: E501 + """GitEntry - a model defined in Swagger""" # noqa: E501 + + self._mode = None + self._path = None + self._sha = None + self._size = None + self._type = None + self._url = None + self.discriminator = None + + if mode is not None: + self.mode = mode + if path is not None: + self.path = path + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def mode(self): + """Gets the mode of this GitEntry. # noqa: E501 + + + :return: The mode of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this GitEntry. + + + :param mode: The mode of this GitEntry. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def path(self): + """Gets the path of this GitEntry. # noqa: E501 + + + :return: The path of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this GitEntry. + + + :param path: The path of this GitEntry. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def sha(self): + """Gets the sha of this GitEntry. # noqa: E501 + + + :return: The sha of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitEntry. + + + :param sha: The sha of this GitEntry. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this GitEntry. # noqa: E501 + + + :return: The size of this GitEntry. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this GitEntry. + + + :param size: The size of this GitEntry. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def type(self): + """Gets the type of this GitEntry. # noqa: E501 + + + :return: The type of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this GitEntry. + + + :param type: The type of this GitEntry. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this GitEntry. # noqa: E501 + + + :return: The url of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitEntry. + + + :param url: The url of this GitEntry. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GitEntry, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GitEntry): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/git_object.py b/swagger_client/models/git_object.py new file mode 100644 index 0000000..58d3db3 --- /dev/null +++ b/swagger_client/models/git_object.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GitObject(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'sha': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'sha': 'sha', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, sha=None, type=None, url=None): # noqa: E501 + """GitObject - a model defined in Swagger""" # noqa: E501 + + self._sha = None + self._type = None + self._url = None + self.discriminator = None + + if sha is not None: + self.sha = sha + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def sha(self): + """Gets the sha of this GitObject. # noqa: E501 + + + :return: The sha of this GitObject. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitObject. + + + :param sha: The sha of this GitObject. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def type(self): + """Gets the type of this GitObject. # noqa: E501 + + + :return: The type of this GitObject. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this GitObject. + + + :param type: The type of this GitObject. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this GitObject. # noqa: E501 + + + :return: The url of this GitObject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitObject. + + + :param url: The url of this GitObject. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GitObject, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GitObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/git_tree_response.py b/swagger_client/models/git_tree_response.py new file mode 100644 index 0000000..a25eb93 --- /dev/null +++ b/swagger_client/models/git_tree_response.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.git_entry import GitEntry # noqa: F401,E501 + + +class GitTreeResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'sha': 'str', + 'tree': 'list[GitEntry]', + 'truncated': 'bool', + 'url': 'str' + } + + attribute_map = { + 'sha': 'sha', + 'tree': 'tree', + 'truncated': 'truncated', + 'url': 'url' + } + + def __init__(self, sha=None, tree=None, truncated=None, url=None): # noqa: E501 + """GitTreeResponse - a model defined in Swagger""" # noqa: E501 + + self._sha = None + self._tree = None + self._truncated = None + self._url = None + self.discriminator = None + + if sha is not None: + self.sha = sha + if tree is not None: + self.tree = tree + if truncated is not None: + self.truncated = truncated + if url is not None: + self.url = url + + @property + def sha(self): + """Gets the sha of this GitTreeResponse. # noqa: E501 + + + :return: The sha of this GitTreeResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitTreeResponse. + + + :param sha: The sha of this GitTreeResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def tree(self): + """Gets the tree of this GitTreeResponse. # noqa: E501 + + + :return: The tree of this GitTreeResponse. # noqa: E501 + :rtype: list[GitEntry] + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this GitTreeResponse. + + + :param tree: The tree of this GitTreeResponse. # noqa: E501 + :type: list[GitEntry] + """ + + self._tree = tree + + @property + def truncated(self): + """Gets the truncated of this GitTreeResponse. # noqa: E501 + + + :return: The truncated of this GitTreeResponse. # noqa: E501 + :rtype: bool + """ + return self._truncated + + @truncated.setter + def truncated(self, truncated): + """Sets the truncated of this GitTreeResponse. + + + :param truncated: The truncated of this GitTreeResponse. # noqa: E501 + :type: bool + """ + + self._truncated = truncated + + @property + def url(self): + """Gets the url of this GitTreeResponse. # noqa: E501 + + + :return: The url of this GitTreeResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitTreeResponse. + + + :param url: The url of this GitTreeResponse. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GitTreeResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GitTreeResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/gpg_key.py b/swagger_client/models/gpg_key.py new file mode 100644 index 0000000..b63b1bc --- /dev/null +++ b/swagger_client/models/gpg_key.py @@ -0,0 +1,404 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.gpg_key import GPGKey # noqa: F401,E501 +from swagger_client.models.gpg_key_email import GPGKeyEmail # noqa: F401,E501 + + +class GPGKey(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'can_certify': 'bool', + 'can_encrypt_comms': 'bool', + 'can_encrypt_storage': 'bool', + 'can_sign': 'bool', + 'created_at': 'datetime', + 'emails': 'list[GPGKeyEmail]', + 'expires_at': 'datetime', + 'id': 'int', + 'key_id': 'str', + 'primary_key_id': 'str', + 'public_key': 'str', + 'subkeys': 'list[GPGKey]' + } + + attribute_map = { + 'can_certify': 'can_certify', + 'can_encrypt_comms': 'can_encrypt_comms', + 'can_encrypt_storage': 'can_encrypt_storage', + 'can_sign': 'can_sign', + 'created_at': 'created_at', + 'emails': 'emails', + 'expires_at': 'expires_at', + 'id': 'id', + 'key_id': 'key_id', + 'primary_key_id': 'primary_key_id', + 'public_key': 'public_key', + 'subkeys': 'subkeys' + } + + def __init__(self, can_certify=None, can_encrypt_comms=None, can_encrypt_storage=None, can_sign=None, created_at=None, emails=None, expires_at=None, id=None, key_id=None, primary_key_id=None, public_key=None, subkeys=None): # noqa: E501 + """GPGKey - a model defined in Swagger""" # noqa: E501 + + self._can_certify = None + self._can_encrypt_comms = None + self._can_encrypt_storage = None + self._can_sign = None + self._created_at = None + self._emails = None + self._expires_at = None + self._id = None + self._key_id = None + self._primary_key_id = None + self._public_key = None + self._subkeys = None + self.discriminator = None + + if can_certify is not None: + self.can_certify = can_certify + if can_encrypt_comms is not None: + self.can_encrypt_comms = can_encrypt_comms + if can_encrypt_storage is not None: + self.can_encrypt_storage = can_encrypt_storage + if can_sign is not None: + self.can_sign = can_sign + if created_at is not None: + self.created_at = created_at + if emails is not None: + self.emails = emails + if expires_at is not None: + self.expires_at = expires_at + if id is not None: + self.id = id + if key_id is not None: + self.key_id = key_id + if primary_key_id is not None: + self.primary_key_id = primary_key_id + if public_key is not None: + self.public_key = public_key + if subkeys is not None: + self.subkeys = subkeys + + @property + def can_certify(self): + """Gets the can_certify of this GPGKey. # noqa: E501 + + + :return: The can_certify of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_certify + + @can_certify.setter + def can_certify(self, can_certify): + """Sets the can_certify of this GPGKey. + + + :param can_certify: The can_certify of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_certify = can_certify + + @property + def can_encrypt_comms(self): + """Gets the can_encrypt_comms of this GPGKey. # noqa: E501 + + + :return: The can_encrypt_comms of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_encrypt_comms + + @can_encrypt_comms.setter + def can_encrypt_comms(self, can_encrypt_comms): + """Sets the can_encrypt_comms of this GPGKey. + + + :param can_encrypt_comms: The can_encrypt_comms of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_encrypt_comms = can_encrypt_comms + + @property + def can_encrypt_storage(self): + """Gets the can_encrypt_storage of this GPGKey. # noqa: E501 + + + :return: The can_encrypt_storage of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_encrypt_storage + + @can_encrypt_storage.setter + def can_encrypt_storage(self, can_encrypt_storage): + """Sets the can_encrypt_storage of this GPGKey. + + + :param can_encrypt_storage: The can_encrypt_storage of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_encrypt_storage = can_encrypt_storage + + @property + def can_sign(self): + """Gets the can_sign of this GPGKey. # noqa: E501 + + + :return: The can_sign of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_sign + + @can_sign.setter + def can_sign(self, can_sign): + """Sets the can_sign of this GPGKey. + + + :param can_sign: The can_sign of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_sign = can_sign + + @property + def created_at(self): + """Gets the created_at of this GPGKey. # noqa: E501 + + + :return: The created_at of this GPGKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this GPGKey. + + + :param created_at: The created_at of this GPGKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def emails(self): + """Gets the emails of this GPGKey. # noqa: E501 + + + :return: The emails of this GPGKey. # noqa: E501 + :rtype: list[GPGKeyEmail] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this GPGKey. + + + :param emails: The emails of this GPGKey. # noqa: E501 + :type: list[GPGKeyEmail] + """ + + self._emails = emails + + @property + def expires_at(self): + """Gets the expires_at of this GPGKey. # noqa: E501 + + + :return: The expires_at of this GPGKey. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this GPGKey. + + + :param expires_at: The expires_at of this GPGKey. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + @property + def id(self): + """Gets the id of this GPGKey. # noqa: E501 + + + :return: The id of this GPGKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GPGKey. + + + :param id: The id of this GPGKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key_id(self): + """Gets the key_id of this GPGKey. # noqa: E501 + + + :return: The key_id of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """Sets the key_id of this GPGKey. + + + :param key_id: The key_id of this GPGKey. # noqa: E501 + :type: str + """ + + self._key_id = key_id + + @property + def primary_key_id(self): + """Gets the primary_key_id of this GPGKey. # noqa: E501 + + + :return: The primary_key_id of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._primary_key_id + + @primary_key_id.setter + def primary_key_id(self, primary_key_id): + """Sets the primary_key_id of this GPGKey. + + + :param primary_key_id: The primary_key_id of this GPGKey. # noqa: E501 + :type: str + """ + + self._primary_key_id = primary_key_id + + @property + def public_key(self): + """Gets the public_key of this GPGKey. # noqa: E501 + + + :return: The public_key of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._public_key + + @public_key.setter + def public_key(self, public_key): + """Sets the public_key of this GPGKey. + + + :param public_key: The public_key of this GPGKey. # noqa: E501 + :type: str + """ + + self._public_key = public_key + + @property + def subkeys(self): + """Gets the subkeys of this GPGKey. # noqa: E501 + + + :return: The subkeys of this GPGKey. # noqa: E501 + :rtype: list[GPGKey] + """ + return self._subkeys + + @subkeys.setter + def subkeys(self, subkeys): + """Sets the subkeys of this GPGKey. + + + :param subkeys: The subkeys of this GPGKey. # noqa: E501 + :type: list[GPGKey] + """ + + self._subkeys = subkeys + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GPGKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GPGKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/gpg_key_email.py b/swagger_client/models/gpg_key_email.py new file mode 100644 index 0000000..5aadfc7 --- /dev/null +++ b/swagger_client/models/gpg_key_email.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GPGKeyEmail(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'verified': 'bool' + } + + attribute_map = { + 'email': 'email', + 'verified': 'verified' + } + + def __init__(self, email=None, verified=None): # noqa: E501 + """GPGKeyEmail - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._verified = None + self.discriminator = None + + if email is not None: + self.email = email + if verified is not None: + self.verified = verified + + @property + def email(self): + """Gets the email of this GPGKeyEmail. # noqa: E501 + + + :return: The email of this GPGKeyEmail. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this GPGKeyEmail. + + + :param email: The email of this GPGKeyEmail. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def verified(self): + """Gets the verified of this GPGKeyEmail. # noqa: E501 + + + :return: The verified of this GPGKeyEmail. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this GPGKeyEmail. + + + :param verified: The verified of this GPGKeyEmail. # noqa: E501 + :type: bool + """ + + self._verified = verified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GPGKeyEmail, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GPGKeyEmail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/inline_response200.py b/swagger_client/models/inline_response200.py new file mode 100644 index 0000000..b181b63 --- /dev/null +++ b/swagger_client/models/inline_response200.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.user import User # noqa: F401,E501 + + +class InlineResponse200(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[User]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None): # noqa: E501 + """InlineResponse200 - a model defined in Swagger""" # noqa: E501 + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this InlineResponse200. # noqa: E501 + + + :return: The data of this InlineResponse200. # noqa: E501 + :rtype: list[User] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse200. + + + :param data: The data of this InlineResponse200. # noqa: E501 + :type: list[User] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this InlineResponse200. # noqa: E501 + + + :return: The ok of this InlineResponse200. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this InlineResponse200. + + + :param ok: The ok of this InlineResponse200. # noqa: E501 + :type: bool + """ + + self._ok = ok + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse200, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse200): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/issue.py b/swagger_client/models/issue.py new file mode 100644 index 0000000..e6ce246 --- /dev/null +++ b/swagger_client/models/issue.py @@ -0,0 +1,537 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.label import Label # noqa: F401,E501 +from swagger_client.models.milestone import Milestone # noqa: F401,E501 +from swagger_client.models.pull_request_meta import PullRequestMeta # noqa: F401,E501 +from swagger_client.models.state_type import StateType # noqa: F401,E501 +from swagger_client.models.user import User # noqa: F401,E501 + + +class Issue(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee': 'User', + 'assignees': 'list[User]', + 'body': 'str', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'due_date': 'datetime', + 'id': 'int', + 'labels': 'list[Label]', + 'milestone': 'Milestone', + 'number': 'int', + 'pull_request': 'PullRequestMeta', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'due_date': 'due_date', + 'id': 'id', + 'labels': 'labels', + 'milestone': 'milestone', + 'number': 'number', + 'pull_request': 'pull_request', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, assignee=None, assignees=None, body=None, closed_at=None, comments=None, created_at=None, due_date=None, id=None, labels=None, milestone=None, number=None, pull_request=None, state=None, title=None, updated_at=None, url=None, user=None): # noqa: E501 + """Issue - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._body = None + self._closed_at = None + self._comments = None + self._created_at = None + self._due_date = None + self._id = None + self._labels = None + self._milestone = None + self._number = None + self._pull_request = None + self._state = None + self._title = None + self._updated_at = None + self._url = None + self._user = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if closed_at is not None: + self.closed_at = closed_at + if comments is not None: + self.comments = comments + if created_at is not None: + self.created_at = created_at + if due_date is not None: + self.due_date = due_date + if id is not None: + self.id = id + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if number is not None: + self.number = number + if pull_request is not None: + self.pull_request = pull_request + if state is not None: + self.state = state + if title is not None: + self.title = title + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def assignee(self): + """Gets the assignee of this Issue. # noqa: E501 + + + :return: The assignee of this Issue. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this Issue. + + + :param assignee: The assignee of this Issue. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this Issue. # noqa: E501 + + + :return: The assignees of this Issue. # noqa: E501 + :rtype: list[User] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this Issue. + + + :param assignees: The assignees of this Issue. # noqa: E501 + :type: list[User] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this Issue. # noqa: E501 + + + :return: The body of this Issue. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Issue. + + + :param body: The body of this Issue. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed_at(self): + """Gets the closed_at of this Issue. # noqa: E501 + + + :return: The closed_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this Issue. + + + :param closed_at: The closed_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def comments(self): + """Gets the comments of this Issue. # noqa: E501 + + + :return: The comments of this Issue. # noqa: E501 + :rtype: int + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this Issue. + + + :param comments: The comments of this Issue. # noqa: E501 + :type: int + """ + + self._comments = comments + + @property + def created_at(self): + """Gets the created_at of this Issue. # noqa: E501 + + + :return: The created_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Issue. + + + :param created_at: The created_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def due_date(self): + """Gets the due_date of this Issue. # noqa: E501 + + + :return: The due_date of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this Issue. + + + :param due_date: The due_date of this Issue. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def id(self): + """Gets the id of this Issue. # noqa: E501 + + + :return: The id of this Issue. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Issue. + + + :param id: The id of this Issue. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def labels(self): + """Gets the labels of this Issue. # noqa: E501 + + + :return: The labels of this Issue. # noqa: E501 + :rtype: list[Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this Issue. + + + :param labels: The labels of this Issue. # noqa: E501 + :type: list[Label] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this Issue. # noqa: E501 + + + :return: The milestone of this Issue. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this Issue. + + + :param milestone: The milestone of this Issue. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def number(self): + """Gets the number of this Issue. # noqa: E501 + + + :return: The number of this Issue. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this Issue. + + + :param number: The number of this Issue. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def pull_request(self): + """Gets the pull_request of this Issue. # noqa: E501 + + + :return: The pull_request of this Issue. # noqa: E501 + :rtype: PullRequestMeta + """ + return self._pull_request + + @pull_request.setter + def pull_request(self, pull_request): + """Sets the pull_request of this Issue. + + + :param pull_request: The pull_request of this Issue. # noqa: E501 + :type: PullRequestMeta + """ + + self._pull_request = pull_request + + @property + def state(self): + """Gets the state of this Issue. # noqa: E501 + + + :return: The state of this Issue. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Issue. + + + :param state: The state of this Issue. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this Issue. # noqa: E501 + + + :return: The title of this Issue. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Issue. + + + :param title: The title of this Issue. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def updated_at(self): + """Gets the updated_at of this Issue. # noqa: E501 + + + :return: The updated_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Issue. + + + :param updated_at: The updated_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this Issue. # noqa: E501 + + + :return: The url of this Issue. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Issue. + + + :param url: The url of this Issue. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this Issue. # noqa: E501 + + + :return: The user of this Issue. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Issue. + + + :param user: The user of this Issue. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Issue, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Issue): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/issue_deadline.py b/swagger_client/models/issue_deadline.py new file mode 100644 index 0000000..ea50ebc --- /dev/null +++ b/swagger_client/models/issue_deadline.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class IssueDeadline(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'due_date': 'datetime' + } + + attribute_map = { + 'due_date': 'due_date' + } + + def __init__(self, due_date=None): # noqa: E501 + """IssueDeadline - a model defined in Swagger""" # noqa: E501 + + self._due_date = None + self.discriminator = None + + if due_date is not None: + self.due_date = due_date + + @property + def due_date(self): + """Gets the due_date of this IssueDeadline. # noqa: E501 + + + :return: The due_date of this IssueDeadline. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this IssueDeadline. + + + :param due_date: The due_date of this IssueDeadline. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IssueDeadline, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IssueDeadline): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/issue_labels_option.py b/swagger_client/models/issue_labels_option.py new file mode 100644 index 0000000..51c648d --- /dev/null +++ b/swagger_client/models/issue_labels_option.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class IssueLabelsOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'labels': 'list[int]' + } + + attribute_map = { + 'labels': 'labels' + } + + def __init__(self, labels=None): # noqa: E501 + """IssueLabelsOption - a model defined in Swagger""" # noqa: E501 + + self._labels = None + self.discriminator = None + + if labels is not None: + self.labels = labels + + @property + def labels(self): + """Gets the labels of this IssueLabelsOption. # noqa: E501 + + list of label IDs # noqa: E501 + + :return: The labels of this IssueLabelsOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this IssueLabelsOption. + + list of label IDs # noqa: E501 + + :param labels: The labels of this IssueLabelsOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IssueLabelsOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IssueLabelsOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/label.py b/swagger_client/models/label.py new file mode 100644 index 0000000..42e402f --- /dev/null +++ b/swagger_client/models/label.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Label(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'color': 'str', + 'id': 'int', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'color': 'color', + 'id': 'id', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, color=None, id=None, name=None, url=None): # noqa: E501 + """Label - a model defined in Swagger""" # noqa: E501 + + self._color = None + self._id = None + self._name = None + self._url = None + self.discriminator = None + + if color is not None: + self.color = color + if id is not None: + self.id = id + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def color(self): + """Gets the color of this Label. # noqa: E501 + + + :return: The color of this Label. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this Label. + + + :param color: The color of this Label. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def id(self): + """Gets the id of this Label. # noqa: E501 + + + :return: The id of this Label. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Label. + + + :param id: The id of this Label. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Label. # noqa: E501 + + + :return: The name of this Label. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Label. + + + :param name: The name of this Label. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this Label. # noqa: E501 + + + :return: The url of this Label. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Label. + + + :param url: The url of this Label. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Label, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Label): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/markdown_option.py b/swagger_client/models/markdown_option.py new file mode 100644 index 0000000..1c2a57d --- /dev/null +++ b/swagger_client/models/markdown_option.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class MarkdownOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'context': 'str', + 'mode': 'str', + 'text': 'str', + 'wiki': 'bool' + } + + attribute_map = { + 'context': 'Context', + 'mode': 'Mode', + 'text': 'Text', + 'wiki': 'Wiki' + } + + def __init__(self, context=None, mode=None, text=None, wiki=None): # noqa: E501 + """MarkdownOption - a model defined in Swagger""" # noqa: E501 + + self._context = None + self._mode = None + self._text = None + self._wiki = None + self.discriminator = None + + if context is not None: + self.context = context + if mode is not None: + self.mode = mode + if text is not None: + self.text = text + if wiki is not None: + self.wiki = wiki + + @property + def context(self): + """Gets the context of this MarkdownOption. # noqa: E501 + + Context to render in: body # noqa: E501 + + :return: The context of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this MarkdownOption. + + Context to render in: body # noqa: E501 + + :param context: The context of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def mode(self): + """Gets the mode of this MarkdownOption. # noqa: E501 + + Mode to render in: body # noqa: E501 + + :return: The mode of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this MarkdownOption. + + Mode to render in: body # noqa: E501 + + :param mode: The mode of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def text(self): + """Gets the text of this MarkdownOption. # noqa: E501 + + Text markdown to render in: body # noqa: E501 + + :return: The text of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this MarkdownOption. + + Text markdown to render in: body # noqa: E501 + + :param text: The text of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def wiki(self): + """Gets the wiki of this MarkdownOption. # noqa: E501 + + Is it a wiki page ? in: body # noqa: E501 + + :return: The wiki of this MarkdownOption. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MarkdownOption. + + Is it a wiki page ? in: body # noqa: E501 + + :param wiki: The wiki of this MarkdownOption. # noqa: E501 + :type: bool + """ + + self._wiki = wiki + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MarkdownOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarkdownOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/migrate_repo_form.py b/swagger_client/models/migrate_repo_form.py new file mode 100644 index 0000000..0d7b157 --- /dev/null +++ b/swagger_client/models/migrate_repo_form.py @@ -0,0 +1,300 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class MigrateRepoForm(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'auth_password': 'str', + 'auth_username': 'str', + 'clone_addr': 'str', + 'description': 'str', + 'mirror': 'bool', + 'private': 'bool', + 'repo_name': 'str', + 'uid': 'int' + } + + attribute_map = { + 'auth_password': 'auth_password', + 'auth_username': 'auth_username', + 'clone_addr': 'clone_addr', + 'description': 'description', + 'mirror': 'mirror', + 'private': 'private', + 'repo_name': 'repo_name', + 'uid': 'uid' + } + + def __init__(self, auth_password=None, auth_username=None, clone_addr=None, description=None, mirror=None, private=None, repo_name=None, uid=None): # noqa: E501 + """MigrateRepoForm - a model defined in Swagger""" # noqa: E501 + + self._auth_password = None + self._auth_username = None + self._clone_addr = None + self._description = None + self._mirror = None + self._private = None + self._repo_name = None + self._uid = None + self.discriminator = None + + if auth_password is not None: + self.auth_password = auth_password + if auth_username is not None: + self.auth_username = auth_username + self.clone_addr = clone_addr + if description is not None: + self.description = description + if mirror is not None: + self.mirror = mirror + if private is not None: + self.private = private + self.repo_name = repo_name + self.uid = uid + + @property + def auth_password(self): + """Gets the auth_password of this MigrateRepoForm. # noqa: E501 + + + :return: The auth_password of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._auth_password + + @auth_password.setter + def auth_password(self, auth_password): + """Sets the auth_password of this MigrateRepoForm. + + + :param auth_password: The auth_password of this MigrateRepoForm. # noqa: E501 + :type: str + """ + + self._auth_password = auth_password + + @property + def auth_username(self): + """Gets the auth_username of this MigrateRepoForm. # noqa: E501 + + + :return: The auth_username of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._auth_username + + @auth_username.setter + def auth_username(self, auth_username): + """Sets the auth_username of this MigrateRepoForm. + + + :param auth_username: The auth_username of this MigrateRepoForm. # noqa: E501 + :type: str + """ + + self._auth_username = auth_username + + @property + def clone_addr(self): + """Gets the clone_addr of this MigrateRepoForm. # noqa: E501 + + + :return: The clone_addr of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._clone_addr + + @clone_addr.setter + def clone_addr(self, clone_addr): + """Sets the clone_addr of this MigrateRepoForm. + + + :param clone_addr: The clone_addr of this MigrateRepoForm. # noqa: E501 + :type: str + """ + if clone_addr is None: + raise ValueError("Invalid value for `clone_addr`, must not be `None`") # noqa: E501 + + self._clone_addr = clone_addr + + @property + def description(self): + """Gets the description of this MigrateRepoForm. # noqa: E501 + + + :return: The description of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this MigrateRepoForm. + + + :param description: The description of this MigrateRepoForm. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def mirror(self): + """Gets the mirror of this MigrateRepoForm. # noqa: E501 + + + :return: The mirror of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._mirror + + @mirror.setter + def mirror(self, mirror): + """Sets the mirror of this MigrateRepoForm. + + + :param mirror: The mirror of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._mirror = mirror + + @property + def private(self): + """Gets the private of this MigrateRepoForm. # noqa: E501 + + + :return: The private of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this MigrateRepoForm. + + + :param private: The private of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def repo_name(self): + """Gets the repo_name of this MigrateRepoForm. # noqa: E501 + + + :return: The repo_name of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this MigrateRepoForm. + + + :param repo_name: The repo_name of this MigrateRepoForm. # noqa: E501 + :type: str + """ + if repo_name is None: + raise ValueError("Invalid value for `repo_name`, must not be `None`") # noqa: E501 + + self._repo_name = repo_name + + @property + def uid(self): + """Gets the uid of this MigrateRepoForm. # noqa: E501 + + + :return: The uid of this MigrateRepoForm. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this MigrateRepoForm. + + + :param uid: The uid of this MigrateRepoForm. # noqa: E501 + :type: int + """ + if uid is None: + raise ValueError("Invalid value for `uid`, must not be `None`") # noqa: E501 + + self._uid = uid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MigrateRepoForm, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MigrateRepoForm): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/milestone.py b/swagger_client/models/milestone.py new file mode 100644 index 0000000..40a1597 --- /dev/null +++ b/swagger_client/models/milestone.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.state_type import StateType # noqa: F401,E501 + + +class Milestone(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'closed_at': 'datetime', + 'closed_issues': 'int', + 'description': 'str', + 'due_on': 'datetime', + 'id': 'int', + 'open_issues': 'int', + 'state': 'StateType', + 'title': 'str' + } + + attribute_map = { + 'closed_at': 'closed_at', + 'closed_issues': 'closed_issues', + 'description': 'description', + 'due_on': 'due_on', + 'id': 'id', + 'open_issues': 'open_issues', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, closed_at=None, closed_issues=None, description=None, due_on=None, id=None, open_issues=None, state=None, title=None): # noqa: E501 + """Milestone - a model defined in Swagger""" # noqa: E501 + + self._closed_at = None + self._closed_issues = None + self._description = None + self._due_on = None + self._id = None + self._open_issues = None + self._state = None + self._title = None + self.discriminator = None + + if closed_at is not None: + self.closed_at = closed_at + if closed_issues is not None: + self.closed_issues = closed_issues + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if id is not None: + self.id = id + if open_issues is not None: + self.open_issues = open_issues + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def closed_at(self): + """Gets the closed_at of this Milestone. # noqa: E501 + + + :return: The closed_at of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this Milestone. + + + :param closed_at: The closed_at of this Milestone. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def closed_issues(self): + """Gets the closed_issues of this Milestone. # noqa: E501 + + + :return: The closed_issues of this Milestone. # noqa: E501 + :rtype: int + """ + return self._closed_issues + + @closed_issues.setter + def closed_issues(self, closed_issues): + """Sets the closed_issues of this Milestone. + + + :param closed_issues: The closed_issues of this Milestone. # noqa: E501 + :type: int + """ + + self._closed_issues = closed_issues + + @property + def description(self): + """Gets the description of this Milestone. # noqa: E501 + + + :return: The description of this Milestone. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Milestone. + + + :param description: The description of this Milestone. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this Milestone. # noqa: E501 + + + :return: The due_on of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this Milestone. + + + :param due_on: The due_on of this Milestone. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def id(self): + """Gets the id of this Milestone. # noqa: E501 + + + :return: The id of this Milestone. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Milestone. + + + :param id: The id of this Milestone. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def open_issues(self): + """Gets the open_issues of this Milestone. # noqa: E501 + + + :return: The open_issues of this Milestone. # noqa: E501 + :rtype: int + """ + return self._open_issues + + @open_issues.setter + def open_issues(self, open_issues): + """Sets the open_issues of this Milestone. + + + :param open_issues: The open_issues of this Milestone. # noqa: E501 + :type: int + """ + + self._open_issues = open_issues + + @property + def state(self): + """Gets the state of this Milestone. # noqa: E501 + + + :return: The state of this Milestone. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Milestone. + + + :param state: The state of this Milestone. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this Milestone. # noqa: E501 + + + :return: The title of this Milestone. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Milestone. + + + :param title: The title of this Milestone. # noqa: E501 + :type: str + """ + + self._title = title + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Milestone, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Milestone): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/organization.py b/swagger_client/models/organization.py new file mode 100644 index 0000000..edc86de --- /dev/null +++ b/swagger_client/models/organization.py @@ -0,0 +1,271 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Organization(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'avatar_url': 'str', + 'description': 'str', + 'full_name': 'str', + 'id': 'int', + 'location': 'str', + 'username': 'str', + 'website': 'str' + } + + attribute_map = { + 'avatar_url': 'avatar_url', + 'description': 'description', + 'full_name': 'full_name', + 'id': 'id', + 'location': 'location', + 'username': 'username', + 'website': 'website' + } + + def __init__(self, avatar_url=None, description=None, full_name=None, id=None, location=None, username=None, website=None): # noqa: E501 + """Organization - a model defined in Swagger""" # noqa: E501 + + self._avatar_url = None + self._description = None + self._full_name = None + self._id = None + self._location = None + self._username = None + self._website = None + self.discriminator = None + + if avatar_url is not None: + self.avatar_url = avatar_url + if description is not None: + self.description = description + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if location is not None: + self.location = location + if username is not None: + self.username = username + if website is not None: + self.website = website + + @property + def avatar_url(self): + """Gets the avatar_url of this Organization. # noqa: E501 + + + :return: The avatar_url of this Organization. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this Organization. + + + :param avatar_url: The avatar_url of this Organization. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def description(self): + """Gets the description of this Organization. # noqa: E501 + + + :return: The description of this Organization. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Organization. + + + :param description: The description of this Organization. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def full_name(self): + """Gets the full_name of this Organization. # noqa: E501 + + + :return: The full_name of this Organization. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this Organization. + + + :param full_name: The full_name of this Organization. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this Organization. # noqa: E501 + + + :return: The id of this Organization. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Organization. + + + :param id: The id of this Organization. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def location(self): + """Gets the location of this Organization. # noqa: E501 + + + :return: The location of this Organization. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this Organization. + + + :param location: The location of this Organization. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def username(self): + """Gets the username of this Organization. # noqa: E501 + + + :return: The username of this Organization. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this Organization. + + + :param username: The username of this Organization. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def website(self): + """Gets the website of this Organization. # noqa: E501 + + + :return: The website of this Organization. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this Organization. + + + :param website: The website of this Organization. # noqa: E501 + :type: str + """ + + self._website = website + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Organization, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Organization): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/payload_commit.py b/swagger_client/models/payload_commit.py new file mode 100644 index 0000000..34408eb --- /dev/null +++ b/swagger_client/models/payload_commit.py @@ -0,0 +1,276 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.payload_commit_verification import PayloadCommitVerification # noqa: F401,E501 +from swagger_client.models.payload_user import PayloadUser # noqa: F401,E501 + + +class PayloadCommit(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'author': 'PayloadUser', + 'committer': 'PayloadUser', + 'id': 'str', + 'message': 'str', + 'timestamp': 'datetime', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer', + 'id': 'id', + 'message': 'message', + 'timestamp': 'timestamp', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, author=None, committer=None, id=None, message=None, timestamp=None, url=None, verification=None): # noqa: E501 + """PayloadCommit - a model defined in Swagger""" # noqa: E501 + + self._author = None + self._committer = None + self._id = None + self._message = None + self._timestamp = None + self._url = None + self._verification = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if id is not None: + self.id = id + if message is not None: + self.message = message + if timestamp is not None: + self.timestamp = timestamp + if url is not None: + self.url = url + if verification is not None: + self.verification = verification + + @property + def author(self): + """Gets the author of this PayloadCommit. # noqa: E501 + + + :return: The author of this PayloadCommit. # noqa: E501 + :rtype: PayloadUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this PayloadCommit. + + + :param author: The author of this PayloadCommit. # noqa: E501 + :type: PayloadUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this PayloadCommit. # noqa: E501 + + + :return: The committer of this PayloadCommit. # noqa: E501 + :rtype: PayloadUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this PayloadCommit. + + + :param committer: The committer of this PayloadCommit. # noqa: E501 + :type: PayloadUser + """ + + self._committer = committer + + @property + def id(self): + """Gets the id of this PayloadCommit. # noqa: E501 + + sha1 hash of the commit # noqa: E501 + + :return: The id of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PayloadCommit. + + sha1 hash of the commit # noqa: E501 + + :param id: The id of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def message(self): + """Gets the message of this PayloadCommit. # noqa: E501 + + + :return: The message of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this PayloadCommit. + + + :param message: The message of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def timestamp(self): + """Gets the timestamp of this PayloadCommit. # noqa: E501 + + + :return: The timestamp of this PayloadCommit. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this PayloadCommit. + + + :param timestamp: The timestamp of this PayloadCommit. # noqa: E501 + :type: datetime + """ + + self._timestamp = timestamp + + @property + def url(self): + """Gets the url of this PayloadCommit. # noqa: E501 + + + :return: The url of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PayloadCommit. + + + :param url: The url of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this PayloadCommit. # noqa: E501 + + + :return: The verification of this PayloadCommit. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this PayloadCommit. + + + :param verification: The verification of this PayloadCommit. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PayloadCommit, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayloadCommit): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/payload_commit_verification.py b/swagger_client/models/payload_commit_verification.py new file mode 100644 index 0000000..e8ee728 --- /dev/null +++ b/swagger_client/models/payload_commit_verification.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PayloadCommitVerification(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payload': 'str', + 'reason': 'str', + 'signature': 'str', + 'verified': 'bool' + } + + attribute_map = { + 'payload': 'payload', + 'reason': 'reason', + 'signature': 'signature', + 'verified': 'verified' + } + + def __init__(self, payload=None, reason=None, signature=None, verified=None): # noqa: E501 + """PayloadCommitVerification - a model defined in Swagger""" # noqa: E501 + + self._payload = None + self._reason = None + self._signature = None + self._verified = None + self.discriminator = None + + if payload is not None: + self.payload = payload + if reason is not None: + self.reason = reason + if signature is not None: + self.signature = signature + if verified is not None: + self.verified = verified + + @property + def payload(self): + """Gets the payload of this PayloadCommitVerification. # noqa: E501 + + + :return: The payload of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this PayloadCommitVerification. + + + :param payload: The payload of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._payload = payload + + @property + def reason(self): + """Gets the reason of this PayloadCommitVerification. # noqa: E501 + + + :return: The reason of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this PayloadCommitVerification. + + + :param reason: The reason of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def signature(self): + """Gets the signature of this PayloadCommitVerification. # noqa: E501 + + + :return: The signature of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._signature + + @signature.setter + def signature(self, signature): + """Sets the signature of this PayloadCommitVerification. + + + :param signature: The signature of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._signature = signature + + @property + def verified(self): + """Gets the verified of this PayloadCommitVerification. # noqa: E501 + + + :return: The verified of this PayloadCommitVerification. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this PayloadCommitVerification. + + + :param verified: The verified of this PayloadCommitVerification. # noqa: E501 + :type: bool + """ + + self._verified = verified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PayloadCommitVerification, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayloadCommitVerification): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/payload_user.py b/swagger_client/models/payload_user.py new file mode 100644 index 0000000..ca12f00 --- /dev/null +++ b/swagger_client/models/payload_user.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PayloadUser(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'name': 'str', + 'username': 'str' + } + + attribute_map = { + 'email': 'email', + 'name': 'name', + 'username': 'username' + } + + def __init__(self, email=None, name=None, username=None): # noqa: E501 + """PayloadUser - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._name = None + self._username = None + self.discriminator = None + + if email is not None: + self.email = email + if name is not None: + self.name = name + if username is not None: + self.username = username + + @property + def email(self): + """Gets the email of this PayloadUser. # noqa: E501 + + + :return: The email of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this PayloadUser. + + + :param email: The email of this PayloadUser. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this PayloadUser. # noqa: E501 + + Full name of the commit author # noqa: E501 + + :return: The name of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PayloadUser. + + Full name of the commit author # noqa: E501 + + :param name: The name of this PayloadUser. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def username(self): + """Gets the username of this PayloadUser. # noqa: E501 + + + :return: The username of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this PayloadUser. + + + :param username: The username of this PayloadUser. # noqa: E501 + :type: str + """ + + self._username = username + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PayloadUser, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayloadUser): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/permission.py b/swagger_client/models/permission.py new file mode 100644 index 0000000..f18e560 --- /dev/null +++ b/swagger_client/models/permission.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Permission(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'admin': 'bool', + 'pull': 'bool', + 'push': 'bool' + } + + attribute_map = { + 'admin': 'admin', + 'pull': 'pull', + 'push': 'push' + } + + def __init__(self, admin=None, pull=None, push=None): # noqa: E501 + """Permission - a model defined in Swagger""" # noqa: E501 + + self._admin = None + self._pull = None + self._push = None + self.discriminator = None + + if admin is not None: + self.admin = admin + if pull is not None: + self.pull = pull + if push is not None: + self.push = push + + @property + def admin(self): + """Gets the admin of this Permission. # noqa: E501 + + + :return: The admin of this Permission. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this Permission. + + + :param admin: The admin of this Permission. # noqa: E501 + :type: bool + """ + + self._admin = admin + + @property + def pull(self): + """Gets the pull of this Permission. # noqa: E501 + + + :return: The pull of this Permission. # noqa: E501 + :rtype: bool + """ + return self._pull + + @pull.setter + def pull(self, pull): + """Sets the pull of this Permission. + + + :param pull: The pull of this Permission. # noqa: E501 + :type: bool + """ + + self._pull = pull + + @property + def push(self): + """Gets the push of this Permission. # noqa: E501 + + + :return: The push of this Permission. # noqa: E501 + :rtype: bool + """ + return self._push + + @push.setter + def push(self, push): + """Sets the push of this Permission. + + + :param push: The push of this Permission. # noqa: E501 + :type: bool + """ + + self._push = push + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Permission, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Permission): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/pr_branch_info.py b/swagger_client/models/pr_branch_info.py new file mode 100644 index 0000000..ee6c840 --- /dev/null +++ b/swagger_client/models/pr_branch_info.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.repository import Repository # noqa: F401,E501 + + +class PRBranchInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'label': 'str', + 'ref': 'str', + 'repo': 'Repository', + 'repo_id': 'int', + 'sha': 'str' + } + + attribute_map = { + 'label': 'label', + 'ref': 'ref', + 'repo': 'repo', + 'repo_id': 'repo_id', + 'sha': 'sha' + } + + def __init__(self, label=None, ref=None, repo=None, repo_id=None, sha=None): # noqa: E501 + """PRBranchInfo - a model defined in Swagger""" # noqa: E501 + + self._label = None + self._ref = None + self._repo = None + self._repo_id = None + self._sha = None + self.discriminator = None + + if label is not None: + self.label = label + if ref is not None: + self.ref = ref + if repo is not None: + self.repo = repo + if repo_id is not None: + self.repo_id = repo_id + if sha is not None: + self.sha = sha + + @property + def label(self): + """Gets the label of this PRBranchInfo. # noqa: E501 + + + :return: The label of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this PRBranchInfo. + + + :param label: The label of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def ref(self): + """Gets the ref of this PRBranchInfo. # noqa: E501 + + + :return: The ref of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this PRBranchInfo. + + + :param ref: The ref of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def repo(self): + """Gets the repo of this PRBranchInfo. # noqa: E501 + + + :return: The repo of this PRBranchInfo. # noqa: E501 + :rtype: Repository + """ + return self._repo + + @repo.setter + def repo(self, repo): + """Sets the repo of this PRBranchInfo. + + + :param repo: The repo of this PRBranchInfo. # noqa: E501 + :type: Repository + """ + + self._repo = repo + + @property + def repo_id(self): + """Gets the repo_id of this PRBranchInfo. # noqa: E501 + + + :return: The repo_id of this PRBranchInfo. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this PRBranchInfo. + + + :param repo_id: The repo_id of this PRBranchInfo. # noqa: E501 + :type: int + """ + + self._repo_id = repo_id + + @property + def sha(self): + """Gets the sha of this PRBranchInfo. # noqa: E501 + + + :return: The sha of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this PRBranchInfo. + + + :param sha: The sha of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._sha = sha + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PRBranchInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PRBranchInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/public_key.py b/swagger_client/models/public_key.py new file mode 100644 index 0000000..32bf770 --- /dev/null +++ b/swagger_client/models/public_key.py @@ -0,0 +1,325 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.user import User # noqa: F401,E501 + + +class PublicKey(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created_at': 'datetime', + 'fingerprint': 'str', + 'id': 'int', + 'key': 'str', + 'key_type': 'str', + 'read_only': 'bool', + 'title': 'str', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'created_at': 'created_at', + 'fingerprint': 'fingerprint', + 'id': 'id', + 'key': 'key', + 'key_type': 'key_type', + 'read_only': 'read_only', + 'title': 'title', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, created_at=None, fingerprint=None, id=None, key=None, key_type=None, read_only=None, title=None, url=None, user=None): # noqa: E501 + """PublicKey - a model defined in Swagger""" # noqa: E501 + + self._created_at = None + self._fingerprint = None + self._id = None + self._key = None + self._key_type = None + self._read_only = None + self._title = None + self._url = None + self._user = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if fingerprint is not None: + self.fingerprint = fingerprint + if id is not None: + self.id = id + if key is not None: + self.key = key + if key_type is not None: + self.key_type = key_type + if read_only is not None: + self.read_only = read_only + if title is not None: + self.title = title + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def created_at(self): + """Gets the created_at of this PublicKey. # noqa: E501 + + + :return: The created_at of this PublicKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PublicKey. + + + :param created_at: The created_at of this PublicKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def fingerprint(self): + """Gets the fingerprint of this PublicKey. # noqa: E501 + + + :return: The fingerprint of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this PublicKey. + + + :param fingerprint: The fingerprint of this PublicKey. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def id(self): + """Gets the id of this PublicKey. # noqa: E501 + + + :return: The id of this PublicKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PublicKey. + + + :param id: The id of this PublicKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key(self): + """Gets the key of this PublicKey. # noqa: E501 + + + :return: The key of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this PublicKey. + + + :param key: The key of this PublicKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def key_type(self): + """Gets the key_type of this PublicKey. # noqa: E501 + + + :return: The key_type of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._key_type + + @key_type.setter + def key_type(self, key_type): + """Sets the key_type of this PublicKey. + + + :param key_type: The key_type of this PublicKey. # noqa: E501 + :type: str + """ + + self._key_type = key_type + + @property + def read_only(self): + """Gets the read_only of this PublicKey. # noqa: E501 + + + :return: The read_only of this PublicKey. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this PublicKey. + + + :param read_only: The read_only of this PublicKey. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def title(self): + """Gets the title of this PublicKey. # noqa: E501 + + + :return: The title of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this PublicKey. + + + :param title: The title of this PublicKey. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def url(self): + """Gets the url of this PublicKey. # noqa: E501 + + + :return: The url of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PublicKey. + + + :param url: The url of this PublicKey. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this PublicKey. # noqa: E501 + + + :return: The user of this PublicKey. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PublicKey. + + + :param user: The user of this PublicKey. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/pull_request.py b/swagger_client/models/pull_request.py new file mode 100644 index 0000000..20d86eb --- /dev/null +++ b/swagger_client/models/pull_request.py @@ -0,0 +1,797 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.label import Label # noqa: F401,E501 +from swagger_client.models.milestone import Milestone # noqa: F401,E501 +from swagger_client.models.pr_branch_info import PRBranchInfo # noqa: F401,E501 +from swagger_client.models.state_type import StateType # noqa: F401,E501 +from swagger_client.models.user import User # noqa: F401,E501 + + +class PullRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee': 'User', + 'assignees': 'list[User]', + 'base': 'PRBranchInfo', + 'body': 'str', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'diff_url': 'str', + 'due_date': 'datetime', + 'head': 'PRBranchInfo', + 'html_url': 'str', + 'id': 'int', + 'labels': 'list[Label]', + 'merge_base': 'str', + 'merge_commit_sha': 'str', + 'mergeable': 'bool', + 'merged': 'bool', + 'merged_at': 'datetime', + 'merged_by': 'User', + 'milestone': 'Milestone', + 'number': 'int', + 'patch_url': 'str', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'diff_url': 'diff_url', + 'due_date': 'due_date', + 'head': 'head', + 'html_url': 'html_url', + 'id': 'id', + 'labels': 'labels', + 'merge_base': 'merge_base', + 'merge_commit_sha': 'merge_commit_sha', + 'mergeable': 'mergeable', + 'merged': 'merged', + 'merged_at': 'merged_at', + 'merged_by': 'merged_by', + 'milestone': 'milestone', + 'number': 'number', + 'patch_url': 'patch_url', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, assignee=None, assignees=None, base=None, body=None, closed_at=None, comments=None, created_at=None, diff_url=None, due_date=None, head=None, html_url=None, id=None, labels=None, merge_base=None, merge_commit_sha=None, mergeable=None, merged=None, merged_at=None, merged_by=None, milestone=None, number=None, patch_url=None, state=None, title=None, updated_at=None, url=None, user=None): # noqa: E501 + """PullRequest - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._closed_at = None + self._comments = None + self._created_at = None + self._diff_url = None + self._due_date = None + self._head = None + self._html_url = None + self._id = None + self._labels = None + self._merge_base = None + self._merge_commit_sha = None + self._mergeable = None + self._merged = None + self._merged_at = None + self._merged_by = None + self._milestone = None + self._number = None + self._patch_url = None + self._state = None + self._title = None + self._updated_at = None + self._url = None + self._user = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if closed_at is not None: + self.closed_at = closed_at + if comments is not None: + self.comments = comments + if created_at is not None: + self.created_at = created_at + if diff_url is not None: + self.diff_url = diff_url + if due_date is not None: + self.due_date = due_date + if head is not None: + self.head = head + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if labels is not None: + self.labels = labels + if merge_base is not None: + self.merge_base = merge_base + if merge_commit_sha is not None: + self.merge_commit_sha = merge_commit_sha + if mergeable is not None: + self.mergeable = mergeable + if merged is not None: + self.merged = merged + if merged_at is not None: + self.merged_at = merged_at + if merged_by is not None: + self.merged_by = merged_by + if milestone is not None: + self.milestone = milestone + if number is not None: + self.number = number + if patch_url is not None: + self.patch_url = patch_url + if state is not None: + self.state = state + if title is not None: + self.title = title + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def assignee(self): + """Gets the assignee of this PullRequest. # noqa: E501 + + + :return: The assignee of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this PullRequest. + + + :param assignee: The assignee of this PullRequest. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this PullRequest. # noqa: E501 + + + :return: The assignees of this PullRequest. # noqa: E501 + :rtype: list[User] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this PullRequest. + + + :param assignees: The assignees of this PullRequest. # noqa: E501 + :type: list[User] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this PullRequest. # noqa: E501 + + + :return: The base of this PullRequest. # noqa: E501 + :rtype: PRBranchInfo + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this PullRequest. + + + :param base: The base of this PullRequest. # noqa: E501 + :type: PRBranchInfo + """ + + self._base = base + + @property + def body(self): + """Gets the body of this PullRequest. # noqa: E501 + + + :return: The body of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullRequest. + + + :param body: The body of this PullRequest. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed_at(self): + """Gets the closed_at of this PullRequest. # noqa: E501 + + + :return: The closed_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this PullRequest. + + + :param closed_at: The closed_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def comments(self): + """Gets the comments of this PullRequest. # noqa: E501 + + + :return: The comments of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this PullRequest. + + + :param comments: The comments of this PullRequest. # noqa: E501 + :type: int + """ + + self._comments = comments + + @property + def created_at(self): + """Gets the created_at of this PullRequest. # noqa: E501 + + + :return: The created_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PullRequest. + + + :param created_at: The created_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def diff_url(self): + """Gets the diff_url of this PullRequest. # noqa: E501 + + + :return: The diff_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._diff_url + + @diff_url.setter + def diff_url(self, diff_url): + """Sets the diff_url of this PullRequest. + + + :param diff_url: The diff_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._diff_url = diff_url + + @property + def due_date(self): + """Gets the due_date of this PullRequest. # noqa: E501 + + + :return: The due_date of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this PullRequest. + + + :param due_date: The due_date of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def head(self): + """Gets the head of this PullRequest. # noqa: E501 + + + :return: The head of this PullRequest. # noqa: E501 + :rtype: PRBranchInfo + """ + return self._head + + @head.setter + def head(self, head): + """Sets the head of this PullRequest. + + + :param head: The head of this PullRequest. # noqa: E501 + :type: PRBranchInfo + """ + + self._head = head + + @property + def html_url(self): + """Gets the html_url of this PullRequest. # noqa: E501 + + + :return: The html_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullRequest. + + + :param html_url: The html_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullRequest. # noqa: E501 + + + :return: The id of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullRequest. + + + :param id: The id of this PullRequest. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def labels(self): + """Gets the labels of this PullRequest. # noqa: E501 + + + :return: The labels of this PullRequest. # noqa: E501 + :rtype: list[Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this PullRequest. + + + :param labels: The labels of this PullRequest. # noqa: E501 + :type: list[Label] + """ + + self._labels = labels + + @property + def merge_base(self): + """Gets the merge_base of this PullRequest. # noqa: E501 + + + :return: The merge_base of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._merge_base + + @merge_base.setter + def merge_base(self, merge_base): + """Sets the merge_base of this PullRequest. + + + :param merge_base: The merge_base of this PullRequest. # noqa: E501 + :type: str + """ + + self._merge_base = merge_base + + @property + def merge_commit_sha(self): + """Gets the merge_commit_sha of this PullRequest. # noqa: E501 + + + :return: The merge_commit_sha of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._merge_commit_sha + + @merge_commit_sha.setter + def merge_commit_sha(self, merge_commit_sha): + """Sets the merge_commit_sha of this PullRequest. + + + :param merge_commit_sha: The merge_commit_sha of this PullRequest. # noqa: E501 + :type: str + """ + + self._merge_commit_sha = merge_commit_sha + + @property + def mergeable(self): + """Gets the mergeable of this PullRequest. # noqa: E501 + + + :return: The mergeable of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._mergeable + + @mergeable.setter + def mergeable(self, mergeable): + """Sets the mergeable of this PullRequest. + + + :param mergeable: The mergeable of this PullRequest. # noqa: E501 + :type: bool + """ + + self._mergeable = mergeable + + @property + def merged(self): + """Gets the merged of this PullRequest. # noqa: E501 + + + :return: The merged of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._merged + + @merged.setter + def merged(self, merged): + """Sets the merged of this PullRequest. + + + :param merged: The merged of this PullRequest. # noqa: E501 + :type: bool + """ + + self._merged = merged + + @property + def merged_at(self): + """Gets the merged_at of this PullRequest. # noqa: E501 + + + :return: The merged_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._merged_at + + @merged_at.setter + def merged_at(self, merged_at): + """Sets the merged_at of this PullRequest. + + + :param merged_at: The merged_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._merged_at = merged_at + + @property + def merged_by(self): + """Gets the merged_by of this PullRequest. # noqa: E501 + + + :return: The merged_by of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._merged_by + + @merged_by.setter + def merged_by(self, merged_by): + """Sets the merged_by of this PullRequest. + + + :param merged_by: The merged_by of this PullRequest. # noqa: E501 + :type: User + """ + + self._merged_by = merged_by + + @property + def milestone(self): + """Gets the milestone of this PullRequest. # noqa: E501 + + + :return: The milestone of this PullRequest. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this PullRequest. + + + :param milestone: The milestone of this PullRequest. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def number(self): + """Gets the number of this PullRequest. # noqa: E501 + + + :return: The number of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PullRequest. + + + :param number: The number of this PullRequest. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def patch_url(self): + """Gets the patch_url of this PullRequest. # noqa: E501 + + + :return: The patch_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._patch_url + + @patch_url.setter + def patch_url(self, patch_url): + """Sets the patch_url of this PullRequest. + + + :param patch_url: The patch_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._patch_url = patch_url + + @property + def state(self): + """Gets the state of this PullRequest. # noqa: E501 + + + :return: The state of this PullRequest. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this PullRequest. + + + :param state: The state of this PullRequest. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this PullRequest. # noqa: E501 + + + :return: The title of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this PullRequest. + + + :param title: The title of this PullRequest. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def updated_at(self): + """Gets the updated_at of this PullRequest. # noqa: E501 + + + :return: The updated_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullRequest. + + + :param updated_at: The updated_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this PullRequest. # noqa: E501 + + + :return: The url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PullRequest. + + + :param url: The url of this PullRequest. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this PullRequest. # noqa: E501 + + + :return: The user of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullRequest. + + + :param user: The user of this PullRequest. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PullRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PullRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/pull_request_meta.py b/swagger_client/models/pull_request_meta.py new file mode 100644 index 0000000..a96ef6d --- /dev/null +++ b/swagger_client/models/pull_request_meta.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PullRequestMeta(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'merged': 'bool', + 'merged_at': 'datetime' + } + + attribute_map = { + 'merged': 'merged', + 'merged_at': 'merged_at' + } + + def __init__(self, merged=None, merged_at=None): # noqa: E501 + """PullRequestMeta - a model defined in Swagger""" # noqa: E501 + + self._merged = None + self._merged_at = None + self.discriminator = None + + if merged is not None: + self.merged = merged + if merged_at is not None: + self.merged_at = merged_at + + @property + def merged(self): + """Gets the merged of this PullRequestMeta. # noqa: E501 + + + :return: The merged of this PullRequestMeta. # noqa: E501 + :rtype: bool + """ + return self._merged + + @merged.setter + def merged(self, merged): + """Sets the merged of this PullRequestMeta. + + + :param merged: The merged of this PullRequestMeta. # noqa: E501 + :type: bool + """ + + self._merged = merged + + @property + def merged_at(self): + """Gets the merged_at of this PullRequestMeta. # noqa: E501 + + + :return: The merged_at of this PullRequestMeta. # noqa: E501 + :rtype: datetime + """ + return self._merged_at + + @merged_at.setter + def merged_at(self, merged_at): + """Sets the merged_at of this PullRequestMeta. + + + :param merged_at: The merged_at of this PullRequestMeta. # noqa: E501 + :type: datetime + """ + + self._merged_at = merged_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PullRequestMeta, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PullRequestMeta): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/reference.py b/swagger_client/models/reference.py new file mode 100644 index 0000000..25186f8 --- /dev/null +++ b/swagger_client/models/reference.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.git_object import GitObject # noqa: F401,E501 + + +class Reference(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'GitObject', + 'ref': 'str', + 'url': 'str' + } + + attribute_map = { + 'object': 'object', + 'ref': 'ref', + 'url': 'url' + } + + def __init__(self, object=None, ref=None, url=None): # noqa: E501 + """Reference - a model defined in Swagger""" # noqa: E501 + + self._object = None + self._ref = None + self._url = None + self.discriminator = None + + if object is not None: + self.object = object + if ref is not None: + self.ref = ref + if url is not None: + self.url = url + + @property + def object(self): + """Gets the object of this Reference. # noqa: E501 + + + :return: The object of this Reference. # noqa: E501 + :rtype: GitObject + """ + return self._object + + @object.setter + def object(self, object): + """Sets the object of this Reference. + + + :param object: The object of this Reference. # noqa: E501 + :type: GitObject + """ + + self._object = object + + @property + def ref(self): + """Gets the ref of this Reference. # noqa: E501 + + + :return: The ref of this Reference. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this Reference. + + + :param ref: The ref of this Reference. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def url(self): + """Gets the url of this Reference. # noqa: E501 + + + :return: The url of this Reference. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Reference. + + + :param url: The url of this Reference. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Reference, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Reference): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/release.py b/swagger_client/models/release.py new file mode 100644 index 0000000..d69713d --- /dev/null +++ b/swagger_client/models/release.py @@ -0,0 +1,456 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.attachment import Attachment # noqa: F401,E501 +from swagger_client.models.user import User # noqa: F401,E501 + + +class Release(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assets': 'list[Attachment]', + 'author': 'User', + 'body': 'str', + 'created_at': 'datetime', + 'draft': 'bool', + 'id': 'int', + 'name': 'str', + 'prerelease': 'bool', + 'published_at': 'datetime', + 'tag_name': 'str', + 'tarball_url': 'str', + 'target_commitish': 'str', + 'url': 'str', + 'zipball_url': 'str' + } + + attribute_map = { + 'assets': 'assets', + 'author': 'author', + 'body': 'body', + 'created_at': 'created_at', + 'draft': 'draft', + 'id': 'id', + 'name': 'name', + 'prerelease': 'prerelease', + 'published_at': 'published_at', + 'tag_name': 'tag_name', + 'tarball_url': 'tarball_url', + 'target_commitish': 'target_commitish', + 'url': 'url', + 'zipball_url': 'zipball_url' + } + + def __init__(self, assets=None, author=None, body=None, created_at=None, draft=None, id=None, name=None, prerelease=None, published_at=None, tag_name=None, tarball_url=None, target_commitish=None, url=None, zipball_url=None): # noqa: E501 + """Release - a model defined in Swagger""" # noqa: E501 + + self._assets = None + self._author = None + self._body = None + self._created_at = None + self._draft = None + self._id = None + self._name = None + self._prerelease = None + self._published_at = None + self._tag_name = None + self._tarball_url = None + self._target_commitish = None + self._url = None + self._zipball_url = None + self.discriminator = None + + if assets is not None: + self.assets = assets + if author is not None: + self.author = author + if body is not None: + self.body = body + if created_at is not None: + self.created_at = created_at + if draft is not None: + self.draft = draft + if id is not None: + self.id = id + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + if published_at is not None: + self.published_at = published_at + if tag_name is not None: + self.tag_name = tag_name + if tarball_url is not None: + self.tarball_url = tarball_url + if target_commitish is not None: + self.target_commitish = target_commitish + if url is not None: + self.url = url + if zipball_url is not None: + self.zipball_url = zipball_url + + @property + def assets(self): + """Gets the assets of this Release. # noqa: E501 + + + :return: The assets of this Release. # noqa: E501 + :rtype: list[Attachment] + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this Release. + + + :param assets: The assets of this Release. # noqa: E501 + :type: list[Attachment] + """ + + self._assets = assets + + @property + def author(self): + """Gets the author of this Release. # noqa: E501 + + + :return: The author of this Release. # noqa: E501 + :rtype: User + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this Release. + + + :param author: The author of this Release. # noqa: E501 + :type: User + """ + + self._author = author + + @property + def body(self): + """Gets the body of this Release. # noqa: E501 + + + :return: The body of this Release. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Release. + + + :param body: The body of this Release. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this Release. # noqa: E501 + + + :return: The created_at of this Release. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Release. + + + :param created_at: The created_at of this Release. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def draft(self): + """Gets the draft of this Release. # noqa: E501 + + + :return: The draft of this Release. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this Release. + + + :param draft: The draft of this Release. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def id(self): + """Gets the id of this Release. # noqa: E501 + + + :return: The id of this Release. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Release. + + + :param id: The id of this Release. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Release. # noqa: E501 + + + :return: The name of this Release. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Release. + + + :param name: The name of this Release. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this Release. # noqa: E501 + + + :return: The prerelease of this Release. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this Release. + + + :param prerelease: The prerelease of this Release. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def published_at(self): + """Gets the published_at of this Release. # noqa: E501 + + + :return: The published_at of this Release. # noqa: E501 + :rtype: datetime + """ + return self._published_at + + @published_at.setter + def published_at(self, published_at): + """Sets the published_at of this Release. + + + :param published_at: The published_at of this Release. # noqa: E501 + :type: datetime + """ + + self._published_at = published_at + + @property + def tag_name(self): + """Gets the tag_name of this Release. # noqa: E501 + + + :return: The tag_name of this Release. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this Release. + + + :param tag_name: The tag_name of this Release. # noqa: E501 + :type: str + """ + + self._tag_name = tag_name + + @property + def tarball_url(self): + """Gets the tarball_url of this Release. # noqa: E501 + + + :return: The tarball_url of this Release. # noqa: E501 + :rtype: str + """ + return self._tarball_url + + @tarball_url.setter + def tarball_url(self, tarball_url): + """Sets the tarball_url of this Release. + + + :param tarball_url: The tarball_url of this Release. # noqa: E501 + :type: str + """ + + self._tarball_url = tarball_url + + @property + def target_commitish(self): + """Gets the target_commitish of this Release. # noqa: E501 + + + :return: The target_commitish of this Release. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this Release. + + + :param target_commitish: The target_commitish of this Release. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + @property + def url(self): + """Gets the url of this Release. # noqa: E501 + + + :return: The url of this Release. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Release. + + + :param url: The url of this Release. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def zipball_url(self): + """Gets the zipball_url of this Release. # noqa: E501 + + + :return: The zipball_url of this Release. # noqa: E501 + :rtype: str + """ + return self._zipball_url + + @zipball_url.setter + def zipball_url(self, zipball_url): + """Sets the zipball_url of this Release. + + + :param zipball_url: The zipball_url of this Release. # noqa: E501 + :type: str + """ + + self._zipball_url = zipball_url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Release, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Release): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/repository.py b/swagger_client/models/repository.py new file mode 100644 index 0000000..4d2cc2b --- /dev/null +++ b/swagger_client/models/repository.py @@ -0,0 +1,717 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.permission import Permission # noqa: F401,E501 +from swagger_client.models.repository import Repository # noqa: F401,E501 +from swagger_client.models.user import User # noqa: F401,E501 + + +class Repository(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'archived': 'bool', + 'clone_url': 'str', + 'created_at': 'datetime', + 'default_branch': 'str', + 'description': 'str', + 'empty': 'bool', + 'fork': 'bool', + 'forks_count': 'int', + 'full_name': 'str', + 'html_url': 'str', + 'id': 'int', + 'mirror': 'bool', + 'name': 'str', + 'open_issues_count': 'int', + 'owner': 'User', + 'parent': 'Repository', + 'permissions': 'Permission', + 'private': 'bool', + 'size': 'int', + 'ssh_url': 'str', + 'stars_count': 'int', + 'updated_at': 'datetime', + 'watchers_count': 'int', + 'website': 'str' + } + + attribute_map = { + 'archived': 'archived', + 'clone_url': 'clone_url', + 'created_at': 'created_at', + 'default_branch': 'default_branch', + 'description': 'description', + 'empty': 'empty', + 'fork': 'fork', + 'forks_count': 'forks_count', + 'full_name': 'full_name', + 'html_url': 'html_url', + 'id': 'id', + 'mirror': 'mirror', + 'name': 'name', + 'open_issues_count': 'open_issues_count', + 'owner': 'owner', + 'parent': 'parent', + 'permissions': 'permissions', + 'private': 'private', + 'size': 'size', + 'ssh_url': 'ssh_url', + 'stars_count': 'stars_count', + 'updated_at': 'updated_at', + 'watchers_count': 'watchers_count', + 'website': 'website' + } + + def __init__(self, archived=None, clone_url=None, created_at=None, default_branch=None, description=None, empty=None, fork=None, forks_count=None, full_name=None, html_url=None, id=None, mirror=None, name=None, open_issues_count=None, owner=None, parent=None, permissions=None, private=None, size=None, ssh_url=None, stars_count=None, updated_at=None, watchers_count=None, website=None): # noqa: E501 + """Repository - a model defined in Swagger""" # noqa: E501 + + self._archived = None + self._clone_url = None + self._created_at = None + self._default_branch = None + self._description = None + self._empty = None + self._fork = None + self._forks_count = None + self._full_name = None + self._html_url = None + self._id = None + self._mirror = None + self._name = None + self._open_issues_count = None + self._owner = None + self._parent = None + self._permissions = None + self._private = None + self._size = None + self._ssh_url = None + self._stars_count = None + self._updated_at = None + self._watchers_count = None + self._website = None + self.discriminator = None + + if archived is not None: + self.archived = archived + if clone_url is not None: + self.clone_url = clone_url + if created_at is not None: + self.created_at = created_at + if default_branch is not None: + self.default_branch = default_branch + if description is not None: + self.description = description + if empty is not None: + self.empty = empty + if fork is not None: + self.fork = fork + if forks_count is not None: + self.forks_count = forks_count + if full_name is not None: + self.full_name = full_name + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if mirror is not None: + self.mirror = mirror + if name is not None: + self.name = name + if open_issues_count is not None: + self.open_issues_count = open_issues_count + if owner is not None: + self.owner = owner + if parent is not None: + self.parent = parent + if permissions is not None: + self.permissions = permissions + if private is not None: + self.private = private + if size is not None: + self.size = size + if ssh_url is not None: + self.ssh_url = ssh_url + if stars_count is not None: + self.stars_count = stars_count + if updated_at is not None: + self.updated_at = updated_at + if watchers_count is not None: + self.watchers_count = watchers_count + if website is not None: + self.website = website + + @property + def archived(self): + """Gets the archived of this Repository. # noqa: E501 + + + :return: The archived of this Repository. # noqa: E501 + :rtype: bool + """ + return self._archived + + @archived.setter + def archived(self, archived): + """Sets the archived of this Repository. + + + :param archived: The archived of this Repository. # noqa: E501 + :type: bool + """ + + self._archived = archived + + @property + def clone_url(self): + """Gets the clone_url of this Repository. # noqa: E501 + + + :return: The clone_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._clone_url + + @clone_url.setter + def clone_url(self, clone_url): + """Sets the clone_url of this Repository. + + + :param clone_url: The clone_url of this Repository. # noqa: E501 + :type: str + """ + + self._clone_url = clone_url + + @property + def created_at(self): + """Gets the created_at of this Repository. # noqa: E501 + + + :return: The created_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Repository. + + + :param created_at: The created_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def default_branch(self): + """Gets the default_branch of this Repository. # noqa: E501 + + + :return: The default_branch of this Repository. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this Repository. + + + :param default_branch: The default_branch of this Repository. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def description(self): + """Gets the description of this Repository. # noqa: E501 + + + :return: The description of this Repository. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Repository. + + + :param description: The description of this Repository. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def empty(self): + """Gets the empty of this Repository. # noqa: E501 + + + :return: The empty of this Repository. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this Repository. + + + :param empty: The empty of this Repository. # noqa: E501 + :type: bool + """ + + self._empty = empty + + @property + def fork(self): + """Gets the fork of this Repository. # noqa: E501 + + + :return: The fork of this Repository. # noqa: E501 + :rtype: bool + """ + return self._fork + + @fork.setter + def fork(self, fork): + """Sets the fork of this Repository. + + + :param fork: The fork of this Repository. # noqa: E501 + :type: bool + """ + + self._fork = fork + + @property + def forks_count(self): + """Gets the forks_count of this Repository. # noqa: E501 + + + :return: The forks_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._forks_count + + @forks_count.setter + def forks_count(self, forks_count): + """Sets the forks_count of this Repository. + + + :param forks_count: The forks_count of this Repository. # noqa: E501 + :type: int + """ + + self._forks_count = forks_count + + @property + def full_name(self): + """Gets the full_name of this Repository. # noqa: E501 + + + :return: The full_name of this Repository. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this Repository. + + + :param full_name: The full_name of this Repository. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def html_url(self): + """Gets the html_url of this Repository. # noqa: E501 + + + :return: The html_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Repository. + + + :param html_url: The html_url of this Repository. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Repository. # noqa: E501 + + + :return: The id of this Repository. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Repository. + + + :param id: The id of this Repository. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def mirror(self): + """Gets the mirror of this Repository. # noqa: E501 + + + :return: The mirror of this Repository. # noqa: E501 + :rtype: bool + """ + return self._mirror + + @mirror.setter + def mirror(self, mirror): + """Sets the mirror of this Repository. + + + :param mirror: The mirror of this Repository. # noqa: E501 + :type: bool + """ + + self._mirror = mirror + + @property + def name(self): + """Gets the name of this Repository. # noqa: E501 + + + :return: The name of this Repository. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Repository. + + + :param name: The name of this Repository. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def open_issues_count(self): + """Gets the open_issues_count of this Repository. # noqa: E501 + + + :return: The open_issues_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._open_issues_count + + @open_issues_count.setter + def open_issues_count(self, open_issues_count): + """Sets the open_issues_count of this Repository. + + + :param open_issues_count: The open_issues_count of this Repository. # noqa: E501 + :type: int + """ + + self._open_issues_count = open_issues_count + + @property + def owner(self): + """Gets the owner of this Repository. # noqa: E501 + + + :return: The owner of this Repository. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Repository. + + + :param owner: The owner of this Repository. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def parent(self): + """Gets the parent of this Repository. # noqa: E501 + + + :return: The parent of this Repository. # noqa: E501 + :rtype: Repository + """ + return self._parent + + @parent.setter + def parent(self, parent): + """Sets the parent of this Repository. + + + :param parent: The parent of this Repository. # noqa: E501 + :type: Repository + """ + + self._parent = parent + + @property + def permissions(self): + """Gets the permissions of this Repository. # noqa: E501 + + + :return: The permissions of this Repository. # noqa: E501 + :rtype: Permission + """ + return self._permissions + + @permissions.setter + def permissions(self, permissions): + """Sets the permissions of this Repository. + + + :param permissions: The permissions of this Repository. # noqa: E501 + :type: Permission + """ + + self._permissions = permissions + + @property + def private(self): + """Gets the private of this Repository. # noqa: E501 + + + :return: The private of this Repository. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this Repository. + + + :param private: The private of this Repository. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def size(self): + """Gets the size of this Repository. # noqa: E501 + + + :return: The size of this Repository. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Repository. + + + :param size: The size of this Repository. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def ssh_url(self): + """Gets the ssh_url of this Repository. # noqa: E501 + + + :return: The ssh_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._ssh_url + + @ssh_url.setter + def ssh_url(self, ssh_url): + """Sets the ssh_url of this Repository. + + + :param ssh_url: The ssh_url of this Repository. # noqa: E501 + :type: str + """ + + self._ssh_url = ssh_url + + @property + def stars_count(self): + """Gets the stars_count of this Repository. # noqa: E501 + + + :return: The stars_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._stars_count + + @stars_count.setter + def stars_count(self, stars_count): + """Sets the stars_count of this Repository. + + + :param stars_count: The stars_count of this Repository. # noqa: E501 + :type: int + """ + + self._stars_count = stars_count + + @property + def updated_at(self): + """Gets the updated_at of this Repository. # noqa: E501 + + + :return: The updated_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Repository. + + + :param updated_at: The updated_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def watchers_count(self): + """Gets the watchers_count of this Repository. # noqa: E501 + + + :return: The watchers_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._watchers_count + + @watchers_count.setter + def watchers_count(self, watchers_count): + """Sets the watchers_count of this Repository. + + + :param watchers_count: The watchers_count of this Repository. # noqa: E501 + :type: int + """ + + self._watchers_count = watchers_count + + @property + def website(self): + """Gets the website of this Repository. # noqa: E501 + + + :return: The website of this Repository. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this Repository. + + + :param website: The website of this Repository. # noqa: E501 + :type: str + """ + + self._website = website + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Repository, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Repository): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/search_results.py b/swagger_client/models/search_results.py new file mode 100644 index 0000000..37ff1de --- /dev/null +++ b/swagger_client/models/search_results.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.repository import Repository # noqa: F401,E501 + + +class SearchResults(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[Repository]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None): # noqa: E501 + """SearchResults - a model defined in Swagger""" # noqa: E501 + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this SearchResults. # noqa: E501 + + + :return: The data of this SearchResults. # noqa: E501 + :rtype: list[Repository] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SearchResults. + + + :param data: The data of this SearchResults. # noqa: E501 + :type: list[Repository] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this SearchResults. # noqa: E501 + + + :return: The ok of this SearchResults. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this SearchResults. + + + :param ok: The ok of this SearchResults. # noqa: E501 + :type: bool + """ + + self._ok = ok + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SearchResults, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SearchResults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/server_version.py b/swagger_client/models/server_version.py new file mode 100644 index 0000000..65cb6b9 --- /dev/null +++ b/swagger_client/models/server_version.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ServerVersion(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'version': 'str' + } + + attribute_map = { + 'version': 'version' + } + + def __init__(self, version=None): # noqa: E501 + """ServerVersion - a model defined in Swagger""" # noqa: E501 + + self._version = None + self.discriminator = None + + if version is not None: + self.version = version + + @property + def version(self): + """Gets the version of this ServerVersion. # noqa: E501 + + + :return: The version of this ServerVersion. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this ServerVersion. + + + :param version: The version of this ServerVersion. # noqa: E501 + :type: str + """ + + self._version = version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ServerVersion, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ServerVersion): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/state_type.py b/swagger_client/models/state_type.py new file mode 100644 index 0000000..27057f2 --- /dev/null +++ b/swagger_client/models/state_type.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class StateType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """StateType - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StateType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StateType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/status.py b/swagger_client/models/status.py new file mode 100644 index 0000000..b82a6fe --- /dev/null +++ b/swagger_client/models/status.py @@ -0,0 +1,326 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.status_state import StatusState # noqa: F401,E501 +from swagger_client.models.user import User # noqa: F401,E501 + + +class Status(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'context': 'str', + 'created_at': 'datetime', + 'creator': 'User', + 'description': 'str', + 'id': 'int', + 'status': 'StatusState', + 'target_url': 'str', + 'updated_at': 'datetime', + 'url': 'str' + } + + attribute_map = { + 'context': 'context', + 'created_at': 'created_at', + 'creator': 'creator', + 'description': 'description', + 'id': 'id', + 'status': 'status', + 'target_url': 'target_url', + 'updated_at': 'updated_at', + 'url': 'url' + } + + def __init__(self, context=None, created_at=None, creator=None, description=None, id=None, status=None, target_url=None, updated_at=None, url=None): # noqa: E501 + """Status - a model defined in Swagger""" # noqa: E501 + + self._context = None + self._created_at = None + self._creator = None + self._description = None + self._id = None + self._status = None + self._target_url = None + self._updated_at = None + self._url = None + self.discriminator = None + + if context is not None: + self.context = context + if created_at is not None: + self.created_at = created_at + if creator is not None: + self.creator = creator + if description is not None: + self.description = description + if id is not None: + self.id = id + if status is not None: + self.status = status + if target_url is not None: + self.target_url = target_url + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + + @property + def context(self): + """Gets the context of this Status. # noqa: E501 + + + :return: The context of this Status. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this Status. + + + :param context: The context of this Status. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def created_at(self): + """Gets the created_at of this Status. # noqa: E501 + + + :return: The created_at of this Status. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Status. + + + :param created_at: The created_at of this Status. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def creator(self): + """Gets the creator of this Status. # noqa: E501 + + + :return: The creator of this Status. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Status. + + + :param creator: The creator of this Status. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def description(self): + """Gets the description of this Status. # noqa: E501 + + + :return: The description of this Status. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Status. + + + :param description: The description of this Status. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Status. # noqa: E501 + + + :return: The id of this Status. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Status. + + + :param id: The id of this Status. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def status(self): + """Gets the status of this Status. # noqa: E501 + + + :return: The status of this Status. # noqa: E501 + :rtype: StatusState + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Status. + + + :param status: The status of this Status. # noqa: E501 + :type: StatusState + """ + + self._status = status + + @property + def target_url(self): + """Gets the target_url of this Status. # noqa: E501 + + + :return: The target_url of this Status. # noqa: E501 + :rtype: str + """ + return self._target_url + + @target_url.setter + def target_url(self, target_url): + """Sets the target_url of this Status. + + + :param target_url: The target_url of this Status. # noqa: E501 + :type: str + """ + + self._target_url = target_url + + @property + def updated_at(self): + """Gets the updated_at of this Status. # noqa: E501 + + + :return: The updated_at of this Status. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Status. + + + :param updated_at: The updated_at of this Status. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this Status. # noqa: E501 + + + :return: The url of this Status. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Status. + + + :param url: The url of this Status. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Status, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Status): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/status_state.py b/swagger_client/models/status_state.py new file mode 100644 index 0000000..1d4271f --- /dev/null +++ b/swagger_client/models/status_state.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class StatusState(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """StatusState - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StatusState, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StatusState): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/team.py b/swagger_client/models/team.py new file mode 100644 index 0000000..dbcf8bb --- /dev/null +++ b/swagger_client/models/team.py @@ -0,0 +1,225 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Team(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'id': 'int', + 'name': 'str', + 'permission': 'str', + 'units': 'list[str]' + } + + attribute_map = { + 'description': 'description', + 'id': 'id', + 'name': 'name', + 'permission': 'permission', + 'units': 'units' + } + + def __init__(self, description=None, id=None, name=None, permission=None, units=None): # noqa: E501 + """Team - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._id = None + self._name = None + self._permission = None + self._units = None + self.discriminator = None + + if description is not None: + self.description = description + if id is not None: + self.id = id + if name is not None: + self.name = name + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + + @property + def description(self): + """Gets the description of this Team. # noqa: E501 + + + :return: The description of this Team. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Team. + + + :param description: The description of this Team. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Team. # noqa: E501 + + + :return: The id of this Team. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Team. + + + :param id: The id of this Team. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Team. # noqa: E501 + + + :return: The name of this Team. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Team. + + + :param name: The name of this Team. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def permission(self): + """Gets the permission of this Team. # noqa: E501 + + + :return: The permission of this Team. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this Team. + + + :param permission: The permission of this Team. # noqa: E501 + :type: str + """ + allowed_values = ["none", "read", "write", "admin", "owner"] # noqa: E501 + if permission not in allowed_values: + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this Team. # noqa: E501 + + + :return: The units of this Team. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this Team. + + + :param units: The units of this Team. # noqa: E501 + :type: list[str] + """ + + self._units = units + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Team, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Team): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/time_stamp.py b/swagger_client/models/time_stamp.py new file mode 100644 index 0000000..c9bf21c --- /dev/null +++ b/swagger_client/models/time_stamp.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TimeStamp(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """TimeStamp - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TimeStamp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TimeStamp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/tracked_time.py b/swagger_client/models/tracked_time.py new file mode 100644 index 0000000..de2a634 --- /dev/null +++ b/swagger_client/models/tracked_time.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TrackedTime(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'datetime', + 'id': 'int', + 'issue_id': 'int', + 'time': 'int', + 'user_id': 'int' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'issue_id': 'issue_id', + 'time': 'time', + 'user_id': 'user_id' + } + + def __init__(self, created=None, id=None, issue_id=None, time=None, user_id=None): # noqa: E501 + """TrackedTime - a model defined in Swagger""" # noqa: E501 + + self._created = None + self._id = None + self._issue_id = None + self._time = None + self._user_id = None + self.discriminator = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + if issue_id is not None: + self.issue_id = issue_id + if time is not None: + self.time = time + if user_id is not None: + self.user_id = user_id + + @property + def created(self): + """Gets the created of this TrackedTime. # noqa: E501 + + + :return: The created of this TrackedTime. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TrackedTime. + + + :param created: The created of this TrackedTime. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this TrackedTime. # noqa: E501 + + + :return: The id of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TrackedTime. + + + :param id: The id of this TrackedTime. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def issue_id(self): + """Gets the issue_id of this TrackedTime. # noqa: E501 + + + :return: The issue_id of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._issue_id + + @issue_id.setter + def issue_id(self, issue_id): + """Sets the issue_id of this TrackedTime. + + + :param issue_id: The issue_id of this TrackedTime. # noqa: E501 + :type: int + """ + + self._issue_id = issue_id + + @property + def time(self): + """Gets the time of this TrackedTime. # noqa: E501 + + Time in seconds # noqa: E501 + + :return: The time of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this TrackedTime. + + Time in seconds # noqa: E501 + + :param time: The time of this TrackedTime. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def user_id(self): + """Gets the user_id of this TrackedTime. # noqa: E501 + + + :return: The user_id of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this TrackedTime. + + + :param user_id: The user_id of this TrackedTime. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TrackedTime, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TrackedTime): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/user.py b/swagger_client/models/user.py new file mode 100644 index 0000000..0e2801f --- /dev/null +++ b/swagger_client/models/user.py @@ -0,0 +1,255 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class User(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'avatar_url': 'str', + 'email': 'str', + 'full_name': 'str', + 'id': 'int', + 'language': 'str', + 'login': 'str' + } + + attribute_map = { + 'avatar_url': 'avatar_url', + 'email': 'email', + 'full_name': 'full_name', + 'id': 'id', + 'language': 'language', + 'login': 'login' + } + + def __init__(self, avatar_url=None, email=None, full_name=None, id=None, language=None, login=None): # noqa: E501 + """User - a model defined in Swagger""" # noqa: E501 + + self._avatar_url = None + self._email = None + self._full_name = None + self._id = None + self._language = None + self._login = None + self.discriminator = None + + if avatar_url is not None: + self.avatar_url = avatar_url + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if language is not None: + self.language = language + if login is not None: + self.login = login + + @property + def avatar_url(self): + """Gets the avatar_url of this User. # noqa: E501 + + URL to the user's avatar # noqa: E501 + + :return: The avatar_url of this User. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this User. + + URL to the user's avatar # noqa: E501 + + :param avatar_url: The avatar_url of this User. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def email(self): + """Gets the email of this User. # noqa: E501 + + + :return: The email of this User. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this User. + + + :param email: The email of this User. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this User. # noqa: E501 + + the user's full name # noqa: E501 + + :return: The full_name of this User. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this User. + + the user's full name # noqa: E501 + + :param full_name: The full_name of this User. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this User. # noqa: E501 + + the user's id # noqa: E501 + + :return: The id of this User. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this User. + + the user's id # noqa: E501 + + :param id: The id of this User. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def language(self): + """Gets the language of this User. # noqa: E501 + + User locale # noqa: E501 + + :return: The language of this User. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this User. + + User locale # noqa: E501 + + :param language: The language of this User. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def login(self): + """Gets the login of this User. # noqa: E501 + + the user's username # noqa: E501 + + :return: The login of this User. # noqa: E501 + :rtype: str + """ + return self._login + + @login.setter + def login(self, login): + """Sets the login of this User. + + the user's username # noqa: E501 + + :param login: The login of this User. # noqa: E501 + :type: str + """ + + self._login = login + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(User, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, User): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/user_heatmap_data.py b/swagger_client/models/user_heatmap_data.py new file mode 100644 index 0000000..9b3bc20 --- /dev/null +++ b/swagger_client/models/user_heatmap_data.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.models.time_stamp import TimeStamp # noqa: F401,E501 + + +class UserHeatmapData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'contributions': 'int', + 'timestamp': 'TimeStamp' + } + + attribute_map = { + 'contributions': 'contributions', + 'timestamp': 'timestamp' + } + + def __init__(self, contributions=None, timestamp=None): # noqa: E501 + """UserHeatmapData - a model defined in Swagger""" # noqa: E501 + + self._contributions = None + self._timestamp = None + self.discriminator = None + + if contributions is not None: + self.contributions = contributions + if timestamp is not None: + self.timestamp = timestamp + + @property + def contributions(self): + """Gets the contributions of this UserHeatmapData. # noqa: E501 + + + :return: The contributions of this UserHeatmapData. # noqa: E501 + :rtype: int + """ + return self._contributions + + @contributions.setter + def contributions(self, contributions): + """Sets the contributions of this UserHeatmapData. + + + :param contributions: The contributions of this UserHeatmapData. # noqa: E501 + :type: int + """ + + self._contributions = contributions + + @property + def timestamp(self): + """Gets the timestamp of this UserHeatmapData. # noqa: E501 + + + :return: The timestamp of this UserHeatmapData. # noqa: E501 + :rtype: TimeStamp + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this UserHeatmapData. + + + :param timestamp: The timestamp of this UserHeatmapData. # noqa: E501 + :type: TimeStamp + """ + + self._timestamp = timestamp + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserHeatmapData, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserHeatmapData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/watch_info.py b/swagger_client/models/watch_info.py new file mode 100644 index 0000000..e349b9d --- /dev/null +++ b/swagger_client/models/watch_info.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class WatchInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created_at': 'datetime', + 'ignored': 'bool', + 'reason': 'object', + 'repository_url': 'str', + 'subscribed': 'bool', + 'url': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'ignored': 'ignored', + 'reason': 'reason', + 'repository_url': 'repository_url', + 'subscribed': 'subscribed', + 'url': 'url' + } + + def __init__(self, created_at=None, ignored=None, reason=None, repository_url=None, subscribed=None, url=None): # noqa: E501 + """WatchInfo - a model defined in Swagger""" # noqa: E501 + + self._created_at = None + self._ignored = None + self._reason = None + self._repository_url = None + self._subscribed = None + self._url = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if ignored is not None: + self.ignored = ignored + if reason is not None: + self.reason = reason + if repository_url is not None: + self.repository_url = repository_url + if subscribed is not None: + self.subscribed = subscribed + if url is not None: + self.url = url + + @property + def created_at(self): + """Gets the created_at of this WatchInfo. # noqa: E501 + + + :return: The created_at of this WatchInfo. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WatchInfo. + + + :param created_at: The created_at of this WatchInfo. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def ignored(self): + """Gets the ignored of this WatchInfo. # noqa: E501 + + + :return: The ignored of this WatchInfo. # noqa: E501 + :rtype: bool + """ + return self._ignored + + @ignored.setter + def ignored(self, ignored): + """Sets the ignored of this WatchInfo. + + + :param ignored: The ignored of this WatchInfo. # noqa: E501 + :type: bool + """ + + self._ignored = ignored + + @property + def reason(self): + """Gets the reason of this WatchInfo. # noqa: E501 + + + :return: The reason of this WatchInfo. # noqa: E501 + :rtype: object + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this WatchInfo. + + + :param reason: The reason of this WatchInfo. # noqa: E501 + :type: object + """ + + self._reason = reason + + @property + def repository_url(self): + """Gets the repository_url of this WatchInfo. # noqa: E501 + + + :return: The repository_url of this WatchInfo. # noqa: E501 + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """Sets the repository_url of this WatchInfo. + + + :param repository_url: The repository_url of this WatchInfo. # noqa: E501 + :type: str + """ + + self._repository_url = repository_url + + @property + def subscribed(self): + """Gets the subscribed of this WatchInfo. # noqa: E501 + + + :return: The subscribed of this WatchInfo. # noqa: E501 + :rtype: bool + """ + return self._subscribed + + @subscribed.setter + def subscribed(self, subscribed): + """Sets the subscribed of this WatchInfo. + + + :param subscribed: The subscribed of this WatchInfo. # noqa: E501 + :type: bool + """ + + self._subscribed = subscribed + + @property + def url(self): + """Gets the url of this WatchInfo. # noqa: E501 + + + :return: The url of this WatchInfo. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WatchInfo. + + + :param url: The url of this WatchInfo. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(WatchInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WatchInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/rest.py b/swagger_client/rest.py new file mode 100644 index 0000000..ffbf4ce --- /dev/null +++ b/swagger_client/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + 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 ValueError( + "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): + 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(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_access_token.py b/test/test_access_token.py new file mode 100644 index 0000000..b102f49 --- /dev/null +++ b/test/test_access_token.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.access_token import AccessToken # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAccessToken(unittest.TestCase): + """AccessToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessToken(self): + """Test AccessToken""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.access_token.AccessToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_collaborator_option.py b/test/test_add_collaborator_option.py new file mode 100644 index 0000000..a6aed27 --- /dev/null +++ b/test/test_add_collaborator_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.add_collaborator_option import AddCollaboratorOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAddCollaboratorOption(unittest.TestCase): + """AddCollaboratorOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddCollaboratorOption(self): + """Test AddCollaboratorOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.add_collaborator_option.AddCollaboratorOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_time_option.py b/test/test_add_time_option.py new file mode 100644 index 0000000..c8ead39 --- /dev/null +++ b/test/test_add_time_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.add_time_option import AddTimeOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAddTimeOption(unittest.TestCase): + """AddTimeOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddTimeOption(self): + """Test AddTimeOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.add_time_option.AddTimeOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_api.py b/test/test_admin_api.py new file mode 100644 index 0000000..fe4f3f6 --- /dev/null +++ b/test/test_admin_api.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.admin_api import AdminApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAdminApi(unittest.TestCase): + """AdminApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.admin_api.AdminApi() # noqa: E501 + + def tearDown(self): + pass + + def test_admin_create_org(self): + """Test case for admin_create_org + + Create an organization # noqa: E501 + """ + pass + + def test_admin_create_public_key(self): + """Test case for admin_create_public_key + + Add a public key on behalf of a user # noqa: E501 + """ + pass + + def test_admin_create_repo(self): + """Test case for admin_create_repo + + Create a repository on behalf a user # noqa: E501 + """ + pass + + def test_admin_create_user(self): + """Test case for admin_create_user + + Create a user # noqa: E501 + """ + pass + + def test_admin_delete_user(self): + """Test case for admin_delete_user + + Delete a user # noqa: E501 + """ + pass + + def test_admin_delete_user_public_key(self): + """Test case for admin_delete_user_public_key + + Delete a user's public key # noqa: E501 + """ + pass + + def test_admin_edit_user(self): + """Test case for admin_edit_user + + Edit an existing user # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment.py b/test/test_attachment.py new file mode 100644 index 0000000..0be8b57 --- /dev/null +++ b/test/test_attachment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.attachment import Attachment # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAttachment(unittest.TestCase): + """Attachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAttachment(self): + """Test Attachment""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.attachment.Attachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_branch.py b/test/test_branch.py new file mode 100644 index 0000000..dca7d0e --- /dev/null +++ b/test/test_branch.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.branch import Branch # noqa: E501 +from swagger_client.rest import ApiException + + +class TestBranch(unittest.TestCase): + """Branch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranch(self): + """Test Branch""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.branch.Branch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_comment.py b/test/test_comment.py new file mode 100644 index 0000000..f9eedff --- /dev/null +++ b/test/test_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.comment import Comment # noqa: E501 +from swagger_client.rest import ApiException + + +class TestComment(unittest.TestCase): + """Comment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testComment(self): + """Test Comment""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.comment.Comment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_email_option.py b/test/test_create_email_option.py new file mode 100644 index 0000000..e4e44b0 --- /dev/null +++ b/test/test_create_email_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_email_option import CreateEmailOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateEmailOption(unittest.TestCase): + """CreateEmailOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateEmailOption(self): + """Test CreateEmailOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_email_option.CreateEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_fork_option.py b/test/test_create_fork_option.py new file mode 100644 index 0000000..9c931cf --- /dev/null +++ b/test/test_create_fork_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_fork_option import CreateForkOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateForkOption(unittest.TestCase): + """CreateForkOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateForkOption(self): + """Test CreateForkOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_fork_option.CreateForkOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_gpg_key_option.py b/test/test_create_gpg_key_option.py new file mode 100644 index 0000000..2262673 --- /dev/null +++ b/test/test_create_gpg_key_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_gpg_key_option import CreateGPGKeyOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateGPGKeyOption(unittest.TestCase): + """CreateGPGKeyOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateGPGKeyOption(self): + """Test CreateGPGKeyOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_gpg_key_option.CreateGPGKeyOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_hook_option.py b/test/test_create_hook_option.py new file mode 100644 index 0000000..4d0490e --- /dev/null +++ b/test/test_create_hook_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_hook_option import CreateHookOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateHookOption(unittest.TestCase): + """CreateHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateHookOption(self): + """Test CreateHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_hook_option.CreateHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_issue_comment_option.py b/test/test_create_issue_comment_option.py new file mode 100644 index 0000000..7ee0337 --- /dev/null +++ b/test/test_create_issue_comment_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_issue_comment_option import CreateIssueCommentOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateIssueCommentOption(unittest.TestCase): + """CreateIssueCommentOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateIssueCommentOption(self): + """Test CreateIssueCommentOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_issue_comment_option.CreateIssueCommentOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_issue_option.py b/test/test_create_issue_option.py new file mode 100644 index 0000000..6589d36 --- /dev/null +++ b/test/test_create_issue_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_issue_option import CreateIssueOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateIssueOption(unittest.TestCase): + """CreateIssueOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateIssueOption(self): + """Test CreateIssueOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_issue_option.CreateIssueOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_key_option.py b/test/test_create_key_option.py new file mode 100644 index 0000000..f802f9e --- /dev/null +++ b/test/test_create_key_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_key_option import CreateKeyOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateKeyOption(unittest.TestCase): + """CreateKeyOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateKeyOption(self): + """Test CreateKeyOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_key_option.CreateKeyOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_label_option.py b/test/test_create_label_option.py new file mode 100644 index 0000000..908dc3c --- /dev/null +++ b/test/test_create_label_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_label_option import CreateLabelOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateLabelOption(unittest.TestCase): + """CreateLabelOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateLabelOption(self): + """Test CreateLabelOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_label_option.CreateLabelOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_milestone_option.py b/test/test_create_milestone_option.py new file mode 100644 index 0000000..018341a --- /dev/null +++ b/test/test_create_milestone_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_milestone_option import CreateMilestoneOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateMilestoneOption(unittest.TestCase): + """CreateMilestoneOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateMilestoneOption(self): + """Test CreateMilestoneOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_milestone_option.CreateMilestoneOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_org_option.py b/test/test_create_org_option.py new file mode 100644 index 0000000..a4e4792 --- /dev/null +++ b/test/test_create_org_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_org_option import CreateOrgOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateOrgOption(unittest.TestCase): + """CreateOrgOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrgOption(self): + """Test CreateOrgOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_org_option.CreateOrgOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_request_option.py b/test/test_create_pull_request_option.py new file mode 100644 index 0000000..943aac4 --- /dev/null +++ b/test/test_create_pull_request_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_pull_request_option import CreatePullRequestOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreatePullRequestOption(unittest.TestCase): + """CreatePullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullRequestOption(self): + """Test CreatePullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_pull_request_option.CreatePullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_release_option.py b/test/test_create_release_option.py new file mode 100644 index 0000000..94f5e67 --- /dev/null +++ b/test/test_create_release_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_release_option import CreateReleaseOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateReleaseOption(unittest.TestCase): + """CreateReleaseOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateReleaseOption(self): + """Test CreateReleaseOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_release_option.CreateReleaseOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_repo_option.py b/test/test_create_repo_option.py new file mode 100644 index 0000000..d40c6ff --- /dev/null +++ b/test/test_create_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_repo_option import CreateRepoOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateRepoOption(unittest.TestCase): + """CreateRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateRepoOption(self): + """Test CreateRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_repo_option.CreateRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_status_option.py b/test/test_create_status_option.py new file mode 100644 index 0000000..69ef799 --- /dev/null +++ b/test/test_create_status_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_status_option import CreateStatusOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateStatusOption(unittest.TestCase): + """CreateStatusOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateStatusOption(self): + """Test CreateStatusOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_status_option.CreateStatusOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_team_option.py b/test/test_create_team_option.py new file mode 100644 index 0000000..7730c7a --- /dev/null +++ b/test/test_create_team_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_team_option import CreateTeamOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateTeamOption(unittest.TestCase): + """CreateTeamOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTeamOption(self): + """Test CreateTeamOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_team_option.CreateTeamOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_user_option.py b/test/test_create_user_option.py new file mode 100644 index 0000000..1c6a315 --- /dev/null +++ b/test/test_create_user_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_user_option import CreateUserOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateUserOption(unittest.TestCase): + """CreateUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateUserOption(self): + """Test CreateUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_user_option.CreateUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_email_option.py b/test/test_delete_email_option.py new file mode 100644 index 0000000..e78a14c --- /dev/null +++ b/test/test_delete_email_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.delete_email_option import DeleteEmailOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestDeleteEmailOption(unittest.TestCase): + """DeleteEmailOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteEmailOption(self): + """Test DeleteEmailOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.delete_email_option.DeleteEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_deploy_key.py b/test/test_deploy_key.py new file mode 100644 index 0000000..35a491e --- /dev/null +++ b/test/test_deploy_key.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.deploy_key import DeployKey # noqa: E501 +from swagger_client.rest import ApiException + + +class TestDeployKey(unittest.TestCase): + """DeployKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeployKey(self): + """Test DeployKey""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.deploy_key.DeployKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_attachment_options.py b/test/test_edit_attachment_options.py new file mode 100644 index 0000000..06cd54c --- /dev/null +++ b/test/test_edit_attachment_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_attachment_options import EditAttachmentOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditAttachmentOptions(unittest.TestCase): + """EditAttachmentOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditAttachmentOptions(self): + """Test EditAttachmentOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_attachment_options.EditAttachmentOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_deadline_option.py b/test/test_edit_deadline_option.py new file mode 100644 index 0000000..67f9bc3 --- /dev/null +++ b/test/test_edit_deadline_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_deadline_option import EditDeadlineOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditDeadlineOption(unittest.TestCase): + """EditDeadlineOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditDeadlineOption(self): + """Test EditDeadlineOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_deadline_option.EditDeadlineOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_hook_option.py b/test/test_edit_hook_option.py new file mode 100644 index 0000000..a458df1 --- /dev/null +++ b/test/test_edit_hook_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_hook_option import EditHookOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditHookOption(unittest.TestCase): + """EditHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditHookOption(self): + """Test EditHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_hook_option.EditHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_issue_comment_option.py b/test/test_edit_issue_comment_option.py new file mode 100644 index 0000000..01598db --- /dev/null +++ b/test/test_edit_issue_comment_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_issue_comment_option import EditIssueCommentOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditIssueCommentOption(unittest.TestCase): + """EditIssueCommentOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditIssueCommentOption(self): + """Test EditIssueCommentOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_issue_comment_option.EditIssueCommentOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_issue_option.py b/test/test_edit_issue_option.py new file mode 100644 index 0000000..2e0a00e --- /dev/null +++ b/test/test_edit_issue_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_issue_option import EditIssueOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditIssueOption(unittest.TestCase): + """EditIssueOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditIssueOption(self): + """Test EditIssueOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_issue_option.EditIssueOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_label_option.py b/test/test_edit_label_option.py new file mode 100644 index 0000000..6c43ed5 --- /dev/null +++ b/test/test_edit_label_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_label_option import EditLabelOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditLabelOption(unittest.TestCase): + """EditLabelOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditLabelOption(self): + """Test EditLabelOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_label_option.EditLabelOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_milestone_option.py b/test/test_edit_milestone_option.py new file mode 100644 index 0000000..9177887 --- /dev/null +++ b/test/test_edit_milestone_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_milestone_option import EditMilestoneOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditMilestoneOption(unittest.TestCase): + """EditMilestoneOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditMilestoneOption(self): + """Test EditMilestoneOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_milestone_option.EditMilestoneOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_org_option.py b/test/test_edit_org_option.py new file mode 100644 index 0000000..8c49773 --- /dev/null +++ b/test/test_edit_org_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_org_option import EditOrgOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditOrgOption(unittest.TestCase): + """EditOrgOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditOrgOption(self): + """Test EditOrgOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_org_option.EditOrgOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_pull_request_option.py b/test/test_edit_pull_request_option.py new file mode 100644 index 0000000..45175d5 --- /dev/null +++ b/test/test_edit_pull_request_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_pull_request_option import EditPullRequestOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditPullRequestOption(unittest.TestCase): + """EditPullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditPullRequestOption(self): + """Test EditPullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_pull_request_option.EditPullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_release_option.py b/test/test_edit_release_option.py new file mode 100644 index 0000000..b98dfa8 --- /dev/null +++ b/test/test_edit_release_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_release_option import EditReleaseOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditReleaseOption(unittest.TestCase): + """EditReleaseOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditReleaseOption(self): + """Test EditReleaseOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_release_option.EditReleaseOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_team_option.py b/test/test_edit_team_option.py new file mode 100644 index 0000000..44a9107 --- /dev/null +++ b/test/test_edit_team_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_team_option import EditTeamOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditTeamOption(unittest.TestCase): + """EditTeamOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditTeamOption(self): + """Test EditTeamOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_team_option.EditTeamOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_user_option.py b/test/test_edit_user_option.py new file mode 100644 index 0000000..27a8b75 --- /dev/null +++ b/test/test_edit_user_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_user_option import EditUserOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditUserOption(unittest.TestCase): + """EditUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditUserOption(self): + """Test EditUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_user_option.EditUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email.py b/test/test_email.py new file mode 100644 index 0000000..87d261c --- /dev/null +++ b/test/test_email.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.email import Email # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEmail(unittest.TestCase): + """Email unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmail(self): + """Test Email""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.email.Email() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_entry.py b/test/test_git_entry.py new file mode 100644 index 0000000..0154f94 --- /dev/null +++ b/test/test_git_entry.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_entry import GitEntry # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitEntry(unittest.TestCase): + """GitEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitEntry(self): + """Test GitEntry""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_entry.GitEntry() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_object.py b/test/test_git_object.py new file mode 100644 index 0000000..2dfa246 --- /dev/null +++ b/test/test_git_object.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_object import GitObject # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitObject(unittest.TestCase): + """GitObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitObject(self): + """Test GitObject""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_object.GitObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_tree_response.py b/test/test_git_tree_response.py new file mode 100644 index 0000000..d6b9713 --- /dev/null +++ b/test/test_git_tree_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_tree_response import GitTreeResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitTreeResponse(unittest.TestCase): + """GitTreeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitTreeResponse(self): + """Test GitTreeResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_tree_response.GitTreeResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpg_key.py b/test/test_gpg_key.py new file mode 100644 index 0000000..352a529 --- /dev/null +++ b/test/test_gpg_key.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.gpg_key import GPGKey # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGPGKey(unittest.TestCase): + """GPGKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGPGKey(self): + """Test GPGKey""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.gpg_key.GPGKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpg_key_email.py b/test/test_gpg_key_email.py new file mode 100644 index 0000000..b810ad2 --- /dev/null +++ b/test/test_gpg_key_email.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.gpg_key_email import GPGKeyEmail # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGPGKeyEmail(unittest.TestCase): + """GPGKeyEmail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGPGKeyEmail(self): + """Test GPGKeyEmail""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.gpg_key_email.GPGKeyEmail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response200.py b/test/test_inline_response200.py new file mode 100644 index 0000000..1a9ee52 --- /dev/null +++ b/test/test_inline_response200.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.inline_response200 import InlineResponse200 # noqa: E501 +from swagger_client.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue.py b/test/test_issue.py new file mode 100644 index 0000000..77e5ef0 --- /dev/null +++ b/test/test_issue.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue import Issue # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssue(unittest.TestCase): + """Issue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssue(self): + """Test Issue""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue.Issue() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_api.py b/test/test_issue_api.py new file mode 100644 index 0000000..a8399e7 --- /dev/null +++ b/test/test_issue_api.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.issue_api import IssueApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueApi(unittest.TestCase): + """IssueApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.issue_api.IssueApi() # noqa: E501 + + def tearDown(self): + pass + + def test_issue_add_label(self): + """Test case for issue_add_label + + Add a label to an issue # noqa: E501 + """ + pass + + def test_issue_add_time(self): + """Test case for issue_add_time + + Add a tracked time to a issue # noqa: E501 + """ + pass + + def test_issue_clear_labels(self): + """Test case for issue_clear_labels + + Remove all labels from an issue # noqa: E501 + """ + pass + + def test_issue_create_comment(self): + """Test case for issue_create_comment + + Add a comment to an issue # noqa: E501 + """ + pass + + def test_issue_create_issue(self): + """Test case for issue_create_issue + + Create an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_create_label(self): + """Test case for issue_create_label + + Create a label # noqa: E501 + """ + pass + + def test_issue_create_milestone(self): + """Test case for issue_create_milestone + + Create a milestone # noqa: E501 + """ + pass + + def test_issue_delete_comment(self): + """Test case for issue_delete_comment + + Delete a comment # noqa: E501 + """ + pass + + def test_issue_delete_comment_deprecated(self): + """Test case for issue_delete_comment_deprecated + + Delete a comment # noqa: E501 + """ + pass + + def test_issue_delete_label(self): + """Test case for issue_delete_label + + Delete a label # noqa: E501 + """ + pass + + def test_issue_delete_milestone(self): + """Test case for issue_delete_milestone + + Delete a milestone # noqa: E501 + """ + pass + + def test_issue_edit_comment(self): + """Test case for issue_edit_comment + + Edit a comment # noqa: E501 + """ + pass + + def test_issue_edit_comment_deprecated(self): + """Test case for issue_edit_comment_deprecated + + Edit a comment # noqa: E501 + """ + pass + + def test_issue_edit_issue(self): + """Test case for issue_edit_issue + + Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_edit_issue_deadline(self): + """Test case for issue_edit_issue_deadline + + Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_edit_label(self): + """Test case for issue_edit_label + + Update a label # noqa: E501 + """ + pass + + def test_issue_edit_milestone(self): + """Test case for issue_edit_milestone + + Update a milestone # noqa: E501 + """ + pass + + def test_issue_get_comments(self): + """Test case for issue_get_comments + + List all comments on an issue # noqa: E501 + """ + pass + + def test_issue_get_issue(self): + """Test case for issue_get_issue + + Get an issue # noqa: E501 + """ + pass + + def test_issue_get_label(self): + """Test case for issue_get_label + + Get a single label # noqa: E501 + """ + pass + + def test_issue_get_labels(self): + """Test case for issue_get_labels + + Get an issue's labels # noqa: E501 + """ + pass + + def test_issue_get_milestone(self): + """Test case for issue_get_milestone + + Get a milestone # noqa: E501 + """ + pass + + def test_issue_get_milestones_list(self): + """Test case for issue_get_milestones_list + + Get all of a repository's opened milestones # noqa: E501 + """ + pass + + def test_issue_get_repo_comments(self): + """Test case for issue_get_repo_comments + + List all comments in a repository # noqa: E501 + """ + pass + + def test_issue_list_issues(self): + """Test case for issue_list_issues + + List a repository's issues # noqa: E501 + """ + pass + + def test_issue_list_labels(self): + """Test case for issue_list_labels + + Get all of a repository's labels # noqa: E501 + """ + pass + + def test_issue_remove_label(self): + """Test case for issue_remove_label + + Remove a label from an issue # noqa: E501 + """ + pass + + def test_issue_replace_labels(self): + """Test case for issue_replace_labels + + Replace an issue's labels # noqa: E501 + """ + pass + + def test_issue_tracked_times(self): + """Test case for issue_tracked_times + + List an issue's tracked times # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_deadline.py b/test/test_issue_deadline.py new file mode 100644 index 0000000..f11ac05 --- /dev/null +++ b/test/test_issue_deadline.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_deadline import IssueDeadline # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueDeadline(unittest.TestCase): + """IssueDeadline unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueDeadline(self): + """Test IssueDeadline""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_deadline.IssueDeadline() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_labels_option.py b/test/test_issue_labels_option.py new file mode 100644 index 0000000..dd13398 --- /dev/null +++ b/test/test_issue_labels_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_labels_option import IssueLabelsOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueLabelsOption(unittest.TestCase): + """IssueLabelsOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueLabelsOption(self): + """Test IssueLabelsOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_labels_option.IssueLabelsOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_label.py b/test/test_label.py new file mode 100644 index 0000000..666153e --- /dev/null +++ b/test/test_label.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.label import Label # noqa: E501 +from swagger_client.rest import ApiException + + +class TestLabel(unittest.TestCase): + """Label unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLabel(self): + """Test Label""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.label.Label() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_markdown_option.py b/test/test_markdown_option.py new file mode 100644 index 0000000..78a4c59 --- /dev/null +++ b/test/test_markdown_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.markdown_option import MarkdownOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMarkdownOption(unittest.TestCase): + """MarkdownOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMarkdownOption(self): + """Test MarkdownOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.markdown_option.MarkdownOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_migrate_repo_form.py b/test/test_migrate_repo_form.py new file mode 100644 index 0000000..e0cab6c --- /dev/null +++ b/test/test_migrate_repo_form.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.migrate_repo_form import MigrateRepoForm # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMigrateRepoForm(unittest.TestCase): + """MigrateRepoForm unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMigrateRepoForm(self): + """Test MigrateRepoForm""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.migrate_repo_form.MigrateRepoForm() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_milestone.py b/test/test_milestone.py new file mode 100644 index 0000000..5c3b67a --- /dev/null +++ b/test/test_milestone.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.milestone import Milestone # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMilestone(unittest.TestCase): + """Milestone unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMilestone(self): + """Test Milestone""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.milestone.Milestone() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_miscellaneous_api.py b/test/test_miscellaneous_api.py new file mode 100644 index 0000000..ce3d99c --- /dev/null +++ b/test/test_miscellaneous_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.miscellaneous_api import MiscellaneousApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMiscellaneousApi(unittest.TestCase): + """MiscellaneousApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.miscellaneous_api.MiscellaneousApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_version(self): + """Test case for get_version + + Returns the version of the Gitea application # noqa: E501 + """ + pass + + def test_render_markdown(self): + """Test case for render_markdown + + Render a markdown document as HTML # noqa: E501 + """ + pass + + def test_render_markdown_raw(self): + """Test case for render_markdown_raw + + Render raw markdown as HTML # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization.py b/test/test_organization.py new file mode 100644 index 0000000..e9dd8ab --- /dev/null +++ b/test/test_organization.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.organization import Organization # noqa: E501 +from swagger_client.rest import ApiException + + +class TestOrganization(unittest.TestCase): + """Organization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganization(self): + """Test Organization""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.organization.Organization() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_api.py b/test/test_organization_api.py new file mode 100644 index 0000000..7836dc4 --- /dev/null +++ b/test/test_organization_api.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.organization_api import OrganizationApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestOrganizationApi(unittest.TestCase): + """OrganizationApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.organization_api.OrganizationApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_org_repo(self): + """Test case for create_org_repo + + Create a repository in an organization # noqa: E501 + """ + pass + + def test_org_add_team_member(self): + """Test case for org_add_team_member + + Add a team member # noqa: E501 + """ + pass + + def test_org_add_team_repository(self): + """Test case for org_add_team_repository + + Add a repository to a team # noqa: E501 + """ + pass + + def test_org_conceal_member(self): + """Test case for org_conceal_member + + Conceal a user's membership # noqa: E501 + """ + pass + + def test_org_create(self): + """Test case for org_create + + Create an organization # noqa: E501 + """ + pass + + def test_org_create_hook(self): + """Test case for org_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_org_create_team(self): + """Test case for org_create_team + + Create a team # noqa: E501 + """ + pass + + def test_org_delete(self): + """Test case for org_delete + + Delete an organization # noqa: E501 + """ + pass + + def test_org_delete_hook(self): + """Test case for org_delete_hook + + Delete a hook # noqa: E501 + """ + pass + + def test_org_delete_member(self): + """Test case for org_delete_member + + Remove a member from an organization # noqa: E501 + """ + pass + + def test_org_delete_team(self): + """Test case for org_delete_team + + Delete a team # noqa: E501 + """ + pass + + def test_org_edit(self): + """Test case for org_edit + + Edit an organization # noqa: E501 + """ + pass + + def test_org_edit_hook(self): + """Test case for org_edit_hook + + Update a hook # noqa: E501 + """ + pass + + def test_org_edit_team(self): + """Test case for org_edit_team + + Edit a team # noqa: E501 + """ + pass + + def test_org_get(self): + """Test case for org_get + + Get an organization # noqa: E501 + """ + pass + + def test_org_get_hook(self): + """Test case for org_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_org_get_team(self): + """Test case for org_get_team + + Get a team # noqa: E501 + """ + pass + + def test_org_is_member(self): + """Test case for org_is_member + + Check if a user is a member of an organization # noqa: E501 + """ + pass + + def test_org_is_public_member(self): + """Test case for org_is_public_member + + Check if a user is a public member of an organization # noqa: E501 + """ + pass + + def test_org_list_current_user_orgs(self): + """Test case for org_list_current_user_orgs + + List the current user's organizations # noqa: E501 + """ + pass + + def test_org_list_hooks(self): + """Test case for org_list_hooks + + List an organization's webhooks # noqa: E501 + """ + pass + + def test_org_list_members(self): + """Test case for org_list_members + + List an organization's members # noqa: E501 + """ + pass + + def test_org_list_public_members(self): + """Test case for org_list_public_members + + List an organization's public members # noqa: E501 + """ + pass + + def test_org_list_repos(self): + """Test case for org_list_repos + + List an organization's repos # noqa: E501 + """ + pass + + def test_org_list_team_members(self): + """Test case for org_list_team_members + + List a team's members # noqa: E501 + """ + pass + + def test_org_list_team_repos(self): + """Test case for org_list_team_repos + + List a team's repos # noqa: E501 + """ + pass + + def test_org_list_teams(self): + """Test case for org_list_teams + + List an organization's teams # noqa: E501 + """ + pass + + def test_org_list_user_orgs(self): + """Test case for org_list_user_orgs + + List a user's organizations # noqa: E501 + """ + pass + + def test_org_publicize_member(self): + """Test case for org_publicize_member + + Publicize a user's membership # noqa: E501 + """ + pass + + def test_org_remove_team_member(self): + """Test case for org_remove_team_member + + Remove a team member # noqa: E501 + """ + pass + + def test_org_remove_team_repository(self): + """Test case for org_remove_team_repository + + Remove a repository from a team # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_commit.py b/test/test_payload_commit.py new file mode 100644 index 0000000..54d4c90 --- /dev/null +++ b/test/test_payload_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.payload_commit import PayloadCommit # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPayloadCommit(unittest.TestCase): + """PayloadCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadCommit(self): + """Test PayloadCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.payload_commit.PayloadCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_commit_verification.py b/test/test_payload_commit_verification.py new file mode 100644 index 0000000..4a47376 --- /dev/null +++ b/test/test_payload_commit_verification.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.payload_commit_verification import PayloadCommitVerification # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPayloadCommitVerification(unittest.TestCase): + """PayloadCommitVerification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadCommitVerification(self): + """Test PayloadCommitVerification""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.payload_commit_verification.PayloadCommitVerification() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_user.py b/test/test_payload_user.py new file mode 100644 index 0000000..6445641 --- /dev/null +++ b/test/test_payload_user.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.payload_user import PayloadUser # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPayloadUser(unittest.TestCase): + """PayloadUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadUser(self): + """Test PayloadUser""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.payload_user.PayloadUser() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_permission.py b/test/test_permission.py new file mode 100644 index 0000000..1ee4e5d --- /dev/null +++ b/test/test_permission.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.permission import Permission # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPermission(unittest.TestCase): + """Permission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPermission(self): + """Test Permission""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.permission.Permission() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pr_branch_info.py b/test/test_pr_branch_info.py new file mode 100644 index 0000000..dfb24fc --- /dev/null +++ b/test/test_pr_branch_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pr_branch_info import PRBranchInfo # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPRBranchInfo(unittest.TestCase): + """PRBranchInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPRBranchInfo(self): + """Test PRBranchInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pr_branch_info.PRBranchInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_public_key.py b/test/test_public_key.py new file mode 100644 index 0000000..ed4577a --- /dev/null +++ b/test/test_public_key.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.public_key import PublicKey # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPublicKey(unittest.TestCase): + """PublicKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPublicKey(self): + """Test PublicKey""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.public_key.PublicKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_request.py b/test/test_pull_request.py new file mode 100644 index 0000000..d717157 --- /dev/null +++ b/test/test_pull_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pull_request import PullRequest # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPullRequest(unittest.TestCase): + """PullRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullRequest(self): + """Test PullRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pull_request.PullRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_request_meta.py b/test/test_pull_request_meta.py new file mode 100644 index 0000000..7c8de75 --- /dev/null +++ b/test/test_pull_request_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pull_request_meta import PullRequestMeta # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPullRequestMeta(unittest.TestCase): + """PullRequestMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullRequestMeta(self): + """Test PullRequestMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pull_request_meta.PullRequestMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reference.py b/test/test_reference.py new file mode 100644 index 0000000..f2d8c42 --- /dev/null +++ b/test/test_reference.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.reference import Reference # noqa: E501 +from swagger_client.rest import ApiException + + +class TestReference(unittest.TestCase): + """Reference unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReference(self): + """Test Reference""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.reference.Reference() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_release.py b/test/test_release.py new file mode 100644 index 0000000..27b3a58 --- /dev/null +++ b/test/test_release.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.release import Release # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRelease(unittest.TestCase): + """Release unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRelease(self): + """Test Release""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.release.Release() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository.py b/test/test_repository.py new file mode 100644 index 0000000..c84cefd --- /dev/null +++ b/test/test_repository.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.repository import Repository # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepository(unittest.TestCase): + """Repository unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepository(self): + """Test Repository""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.repository.Repository() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository_api.py b/test/test_repository_api.py new file mode 100644 index 0000000..0f62a72 --- /dev/null +++ b/test/test_repository_api.py @@ -0,0 +1,433 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.repository_api import RepositoryApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepositoryApi(unittest.TestCase): + """RepositoryApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.repository_api.RepositoryApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_current_user_repo(self): + """Test case for create_current_user_repo + + Create a repository # noqa: E501 + """ + pass + + def test_create_fork(self): + """Test case for create_fork + + Fork a repository # noqa: E501 + """ + pass + + def test_get_tree(self): + """Test case for get_tree + + Gets the tree of a repository. # noqa: E501 + """ + pass + + def test_list_forks(self): + """Test case for list_forks + + List a repository's forks # noqa: E501 + """ + pass + + def test_repo_add_collaborator(self): + """Test case for repo_add_collaborator + + Add a collaborator to a repository # noqa: E501 + """ + pass + + def test_repo_check_collaborator(self): + """Test case for repo_check_collaborator + + Check if a user is a collaborator of a repository # noqa: E501 + """ + pass + + def test_repo_create_hook(self): + """Test case for repo_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_repo_create_key(self): + """Test case for repo_create_key + + Add a key to a repository # noqa: E501 + """ + pass + + def test_repo_create_pull_request(self): + """Test case for repo_create_pull_request + + Create a pull request # noqa: E501 + """ + pass + + def test_repo_create_release(self): + """Test case for repo_create_release + + Create a release # noqa: E501 + """ + pass + + def test_repo_create_release_attachment(self): + """Test case for repo_create_release_attachment + + Create a release attachment # noqa: E501 + """ + pass + + def test_repo_create_status(self): + """Test case for repo_create_status + + Create a commit status # noqa: E501 + """ + pass + + def test_repo_delete(self): + """Test case for repo_delete + + Delete a repository # noqa: E501 + """ + pass + + def test_repo_delete_collaborator(self): + """Test case for repo_delete_collaborator + + Delete a collaborator from a repository # noqa: E501 + """ + pass + + def test_repo_delete_hook(self): + """Test case for repo_delete_hook + + Delete a hook in a repository # noqa: E501 + """ + pass + + def test_repo_delete_key(self): + """Test case for repo_delete_key + + Delete a key from a repository # noqa: E501 + """ + pass + + def test_repo_delete_release(self): + """Test case for repo_delete_release + + Delete a release # noqa: E501 + """ + pass + + def test_repo_delete_release_attachment(self): + """Test case for repo_delete_release_attachment + + Delete a release attachment # noqa: E501 + """ + pass + + def test_repo_edit_hook(self): + """Test case for repo_edit_hook + + Edit a hook in a repository # noqa: E501 + """ + pass + + def test_repo_edit_pull_request(self): + """Test case for repo_edit_pull_request + + Update a pull request # noqa: E501 + """ + pass + + def test_repo_edit_release(self): + """Test case for repo_edit_release + + Update a release # noqa: E501 + """ + pass + + def test_repo_edit_release_attachment(self): + """Test case for repo_edit_release_attachment + + Edit a release attachment # noqa: E501 + """ + pass + + def test_repo_get(self): + """Test case for repo_get + + Get a repository # noqa: E501 + """ + pass + + def test_repo_get_archive(self): + """Test case for repo_get_archive + + Get an archive of a repository # noqa: E501 + """ + pass + + def test_repo_get_branch(self): + """Test case for repo_get_branch + + Retrieve a specific branch from a repository # noqa: E501 + """ + pass + + def test_repo_get_by_id(self): + """Test case for repo_get_by_id + + Get a repository by id # noqa: E501 + """ + pass + + def test_repo_get_combined_status_by_ref(self): + """Test case for repo_get_combined_status_by_ref + + Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + """ + pass + + def test_repo_get_editor_config(self): + """Test case for repo_get_editor_config + + Get the EditorConfig definitions of a file in a repository # noqa: E501 + """ + pass + + def test_repo_get_hook(self): + """Test case for repo_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_repo_get_key(self): + """Test case for repo_get_key + + Get a repository's key by id # noqa: E501 + """ + pass + + def test_repo_get_pull_request(self): + """Test case for repo_get_pull_request + + Get a pull request # noqa: E501 + """ + pass + + def test_repo_get_raw_file(self): + """Test case for repo_get_raw_file + + Get a file from a repository # noqa: E501 + """ + pass + + def test_repo_get_release(self): + """Test case for repo_get_release + + Get a release # noqa: E501 + """ + pass + + def test_repo_get_release_attachment(self): + """Test case for repo_get_release_attachment + + Get a release attachment # noqa: E501 + """ + pass + + def test_repo_list_all_git_refs(self): + """Test case for repo_list_all_git_refs + + Get specified ref or filtered repository's refs # noqa: E501 + """ + pass + + def test_repo_list_branches(self): + """Test case for repo_list_branches + + List a repository's branches # noqa: E501 + """ + pass + + def test_repo_list_collaborators(self): + """Test case for repo_list_collaborators + + List a repository's collaborators # noqa: E501 + """ + pass + + def test_repo_list_git_refs(self): + """Test case for repo_list_git_refs + + Get specified ref or filtered repository's refs # noqa: E501 + """ + pass + + def test_repo_list_hooks(self): + """Test case for repo_list_hooks + + List the hooks in a repository # noqa: E501 + """ + pass + + def test_repo_list_keys(self): + """Test case for repo_list_keys + + List a repository's keys # noqa: E501 + """ + pass + + def test_repo_list_pull_requests(self): + """Test case for repo_list_pull_requests + + List a repo's pull requests # noqa: E501 + """ + pass + + def test_repo_list_release_attachments(self): + """Test case for repo_list_release_attachments + + List release's attachments # noqa: E501 + """ + pass + + def test_repo_list_releases(self): + """Test case for repo_list_releases + + List a repo's releases # noqa: E501 + """ + pass + + def test_repo_list_stargazers(self): + """Test case for repo_list_stargazers + + List a repo's stargazers # noqa: E501 + """ + pass + + def test_repo_list_statuses(self): + """Test case for repo_list_statuses + + Get a commit's statuses # noqa: E501 + """ + pass + + def test_repo_list_subscribers(self): + """Test case for repo_list_subscribers + + List a repo's watchers # noqa: E501 + """ + pass + + def test_repo_merge_pull_request(self): + """Test case for repo_merge_pull_request + + Merge a pull request # noqa: E501 + """ + pass + + def test_repo_migrate(self): + """Test case for repo_migrate + + Migrate a remote git repository # noqa: E501 + """ + pass + + def test_repo_mirror_sync(self): + """Test case for repo_mirror_sync + + Sync a mirrored repository # noqa: E501 + """ + pass + + def test_repo_pull_request_is_merged(self): + """Test case for repo_pull_request_is_merged + + Check if a pull request has been merged # noqa: E501 + """ + pass + + def test_repo_search(self): + """Test case for repo_search + + Search for repositories # noqa: E501 + """ + pass + + def test_repo_test_hook(self): + """Test case for repo_test_hook + + Test a push webhook # noqa: E501 + """ + pass + + def test_repo_tracked_times(self): + """Test case for repo_tracked_times + + List a repo's tracked times # noqa: E501 + """ + pass + + def test_topic_search(self): + """Test case for topic_search + + search topics via keyword # noqa: E501 + """ + pass + + def test_user_current_check_subscription(self): + """Test case for user_current_check_subscription + + Check if the current user is watching a repo # noqa: E501 + """ + pass + + def test_user_current_delete_subscription(self): + """Test case for user_current_delete_subscription + + Unwatch a repo # noqa: E501 + """ + pass + + def test_user_current_put_subscription(self): + """Test case for user_current_put_subscription + + Watch a repo # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_results.py b/test/test_search_results.py new file mode 100644 index 0000000..475737a --- /dev/null +++ b/test/test_search_results.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.search_results import SearchResults # noqa: E501 +from swagger_client.rest import ApiException + + +class TestSearchResults(unittest.TestCase): + """SearchResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSearchResults(self): + """Test SearchResults""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.search_results.SearchResults() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_server_version.py b/test/test_server_version.py new file mode 100644 index 0000000..17621c4 --- /dev/null +++ b/test/test_server_version.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.server_version import ServerVersion # noqa: E501 +from swagger_client.rest import ApiException + + +class TestServerVersion(unittest.TestCase): + """ServerVersion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testServerVersion(self): + """Test ServerVersion""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.server_version.ServerVersion() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_state_type.py b/test/test_state_type.py new file mode 100644 index 0000000..177ac1b --- /dev/null +++ b/test/test_state_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.state_type import StateType # noqa: E501 +from swagger_client.rest import ApiException + + +class TestStateType(unittest.TestCase): + """StateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStateType(self): + """Test StateType""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.state_type.StateType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_status.py b/test/test_status.py new file mode 100644 index 0000000..efa567c --- /dev/null +++ b/test/test_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.status import Status # noqa: E501 +from swagger_client.rest import ApiException + + +class TestStatus(unittest.TestCase): + """Status unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatus(self): + """Test Status""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.status.Status() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_status_state.py b/test/test_status_state.py new file mode 100644 index 0000000..6487fa3 --- /dev/null +++ b/test/test_status_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.status_state import StatusState # noqa: E501 +from swagger_client.rest import ApiException + + +class TestStatusState(unittest.TestCase): + """StatusState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatusState(self): + """Test StatusState""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.status_state.StatusState() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team.py b/test/test_team.py new file mode 100644 index 0000000..aafa3fb --- /dev/null +++ b/test/test_team.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.team import Team # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTeam(unittest.TestCase): + """Team unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeam(self): + """Test Team""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.team.Team() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_time_stamp.py b/test/test_time_stamp.py new file mode 100644 index 0000000..a50fb5c --- /dev/null +++ b/test/test_time_stamp.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.time_stamp import TimeStamp # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTimeStamp(unittest.TestCase): + """TimeStamp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTimeStamp(self): + """Test TimeStamp""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.time_stamp.TimeStamp() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tracked_time.py b/test/test_tracked_time.py new file mode 100644 index 0000000..866bfc2 --- /dev/null +++ b/test/test_tracked_time.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.tracked_time import TrackedTime # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTrackedTime(unittest.TestCase): + """TrackedTime unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTrackedTime(self): + """Test TrackedTime""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.tracked_time.TrackedTime() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user.py b/test/test_user.py new file mode 100644 index 0000000..f9bf4e2 --- /dev/null +++ b/test/test_user.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.user import User # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUser(self): + """Test User""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.user.User() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py new file mode 100644 index 0000000..cb33caa --- /dev/null +++ b/test/test_user_api.py @@ -0,0 +1,314 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.user_api import UserApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.user_api.UserApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_current_user_repo(self): + """Test case for create_current_user_repo + + Create a repository # noqa: E501 + """ + pass + + def test_user_add_email(self): + """Test case for user_add_email + + Add email addresses # noqa: E501 + """ + pass + + def test_user_check_following(self): + """Test case for user_check_following + + Check if one user is following another user # noqa: E501 + """ + pass + + def test_user_create_token(self): + """Test case for user_create_token + + Create an access token # noqa: E501 + """ + pass + + def test_user_current_check_following(self): + """Test case for user_current_check_following + + Check whether a user is followed by the authenticated user # noqa: E501 + """ + pass + + def test_user_current_check_starring(self): + """Test case for user_current_check_starring + + Whether the authenticated is starring the repo # noqa: E501 + """ + pass + + def test_user_current_delete_follow(self): + """Test case for user_current_delete_follow + + Unfollow a user # noqa: E501 + """ + pass + + def test_user_current_delete_gpg_key(self): + """Test case for user_current_delete_gpg_key + + Remove a GPG key # noqa: E501 + """ + pass + + def test_user_current_delete_key(self): + """Test case for user_current_delete_key + + Delete a public key # noqa: E501 + """ + pass + + def test_user_current_delete_star(self): + """Test case for user_current_delete_star + + Unstar the given repo # noqa: E501 + """ + pass + + def test_user_current_get_gpg_key(self): + """Test case for user_current_get_gpg_key + + Get a GPG key # noqa: E501 + """ + pass + + def test_user_current_get_key(self): + """Test case for user_current_get_key + + Get a public key # noqa: E501 + """ + pass + + def test_user_current_list_followers(self): + """Test case for user_current_list_followers + + List the authenticated user's followers # noqa: E501 + """ + pass + + def test_user_current_list_following(self): + """Test case for user_current_list_following + + List the users that the authenticated user is following # noqa: E501 + """ + pass + + def test_user_current_list_gpg_keys(self): + """Test case for user_current_list_gpg_keys + + List the authenticated user's GPG keys # noqa: E501 + """ + pass + + def test_user_current_list_keys(self): + """Test case for user_current_list_keys + + List the authenticated user's public keys # noqa: E501 + """ + pass + + def test_user_current_list_repos(self): + """Test case for user_current_list_repos + + List the repos that the authenticated user owns or has access to # noqa: E501 + """ + pass + + def test_user_current_list_starred(self): + """Test case for user_current_list_starred + + The repos that the authenticated user has starred # noqa: E501 + """ + pass + + def test_user_current_list_subscriptions(self): + """Test case for user_current_list_subscriptions + + List repositories watched by the authenticated user # noqa: E501 + """ + pass + + def test_user_current_post_gpg_key(self): + """Test case for user_current_post_gpg_key + + Create a GPG key # noqa: E501 + """ + pass + + def test_user_current_post_key(self): + """Test case for user_current_post_key + + Create a public key # noqa: E501 + """ + pass + + def test_user_current_put_follow(self): + """Test case for user_current_put_follow + + Follow a user # noqa: E501 + """ + pass + + def test_user_current_put_star(self): + """Test case for user_current_put_star + + Star the given repo # noqa: E501 + """ + pass + + def test_user_current_tracked_times(self): + """Test case for user_current_tracked_times + + List the current user's tracked times # noqa: E501 + """ + pass + + def test_user_delete_access_token(self): + """Test case for user_delete_access_token + + delete an access token # noqa: E501 + """ + pass + + def test_user_delete_email(self): + """Test case for user_delete_email + + Delete email addresses # noqa: E501 + """ + pass + + def test_user_get(self): + """Test case for user_get + + Get a user # noqa: E501 + """ + pass + + def test_user_get_current(self): + """Test case for user_get_current + + Get the authenticated user # noqa: E501 + """ + pass + + def test_user_get_heatmap_data(self): + """Test case for user_get_heatmap_data + + Get a user's heatmap # noqa: E501 + """ + pass + + def test_user_get_tokens(self): + """Test case for user_get_tokens + + List the authenticated user's access tokens # noqa: E501 + """ + pass + + def test_user_list_emails(self): + """Test case for user_list_emails + + List the authenticated user's email addresses # noqa: E501 + """ + pass + + def test_user_list_followers(self): + """Test case for user_list_followers + + List the given user's followers # noqa: E501 + """ + pass + + def test_user_list_following(self): + """Test case for user_list_following + + List the users that the given user is following # noqa: E501 + """ + pass + + def test_user_list_gpg_keys(self): + """Test case for user_list_gpg_keys + + List the given user's GPG keys # noqa: E501 + """ + pass + + def test_user_list_keys(self): + """Test case for user_list_keys + + List the given user's public keys # noqa: E501 + """ + pass + + def test_user_list_repos(self): + """Test case for user_list_repos + + List the repos owned by the given user # noqa: E501 + """ + pass + + def test_user_list_starred(self): + """Test case for user_list_starred + + The repos that the given user has starred # noqa: E501 + """ + pass + + def test_user_list_subscriptions(self): + """Test case for user_list_subscriptions + + List the repositories watched by a user # noqa: E501 + """ + pass + + def test_user_search(self): + """Test case for user_search + + Search for users # noqa: E501 + """ + pass + + def test_user_tracked_times(self): + """Test case for user_tracked_times + + List a user's tracked times in a repo # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_heatmap_data.py b/test/test_user_heatmap_data.py new file mode 100644 index 0000000..5209726 --- /dev/null +++ b/test/test_user_heatmap_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.user_heatmap_data import UserHeatmapData # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUserHeatmapData(unittest.TestCase): + """UserHeatmapData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserHeatmapData(self): + """Test UserHeatmapData""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.user_heatmap_data.UserHeatmapData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_watch_info.py b/test/test_watch_info.py new file mode 100644 index 0000000..040cc2c --- /dev/null +++ b/test/test_watch_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.watch_info import WatchInfo # noqa: E501 +from swagger_client.rest import ApiException + + +class TestWatchInfo(unittest.TestCase): + """WatchInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWatchInfo(self): + """Test WatchInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.watch_info.WatchInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..3d0be61 --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + []