commit ac9707603a1d53817f99d30cbbc48e3b54af918c Author: Befator Date: Tue Oct 21 21:45:29 2025 +0200 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto 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..616eaa0 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.4.46 \ 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..ff62f17 --- /dev/null +++ b/README.md @@ -0,0 +1,779 @@ +# gitea-api +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.23.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 gitea +``` + +### 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 gitea +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.ActivitypubApi(gitea.ApiClient(configuration)) +user_id = 56 # int | user ID of the user + +try: + # Returns the Person actor for a user + api_response = api_instance.activitypub_person(user_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ActivitypubApi->activitypub_person: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ActivitypubApi* | [**activitypub_person**](docs/ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user-id} | Returns the Person actor for a user +*ActivitypubApi* | [**activitypub_person_inbox**](docs/ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user-id}/inbox | Send to the inbox +*AdminApi* | [**admin_add_user_badges**](docs/AdminApi.md#admin_add_user_badges) | **POST** /admin/users/{username}/badges | Add a badge to a user +*AdminApi* | [**admin_adopt_repository**](docs/AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository +*AdminApi* | [**admin_create_hook**](docs/AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook +*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 of a user +*AdminApi* | [**admin_create_user**](docs/AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user +*AdminApi* | [**admin_cron_list**](docs/AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks +*AdminApi* | [**admin_cron_run**](docs/AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task +*AdminApi* | [**admin_delete_hook**](docs/AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook +*AdminApi* | [**admin_delete_unadopted_repository**](docs/AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files +*AdminApi* | [**admin_delete_user**](docs/AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user +*AdminApi* | [**admin_delete_user_badges**](docs/AdminApi.md#admin_delete_user_badges) | **DELETE** /admin/users/{username}/badges | Remove a badge from 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_hook**](docs/AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook +*AdminApi* | [**admin_edit_user**](docs/AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +*AdminApi* | [**admin_get_all_emails**](docs/AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all emails +*AdminApi* | [**admin_get_all_orgs**](docs/AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations +*AdminApi* | [**admin_get_hook**](docs/AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook +*AdminApi* | [**admin_get_runner_registration_token**](docs/AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token +*AdminApi* | [**admin_list_hooks**](docs/AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List system's webhooks +*AdminApi* | [**admin_list_user_badges**](docs/AdminApi.md#admin_list_user_badges) | **GET** /admin/users/{username}/badges | List a user's badges +*AdminApi* | [**admin_rename_user**](docs/AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user +*AdminApi* | [**admin_search_emails**](docs/AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search all emails +*AdminApi* | [**admin_search_users**](docs/AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions +*AdminApi* | [**admin_unadopted_list**](docs/AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories +*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_subscription**](docs/IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue +*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue +*IssueApi* | [**issue_check_subscription**](docs/IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an 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_issue_attachment**](docs/IssueApi.md#issue_create_issue_attachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment +*IssueApi* | [**issue_create_issue_blocking**](docs/IssueApi.md#issue_create_issue_blocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path +*IssueApi* | [**issue_create_issue_comment_attachment**](docs/IssueApi.md#issue_create_issue_comment_attachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment +*IssueApi* | [**issue_create_issue_dependencies**](docs/IssueApi.md#issue_create_issue_dependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. +*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**](docs/IssueApi.md#issue_delete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue +*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_comment_reaction**](docs/IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +*IssueApi* | [**issue_delete_issue_attachment**](docs/IssueApi.md#issue_delete_issue_attachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment +*IssueApi* | [**issue_delete_issue_comment_attachment**](docs/IssueApi.md#issue_delete_issue_comment_attachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment +*IssueApi* | [**issue_delete_issue_reaction**](docs/IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue +*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_delete_stop_watch**](docs/IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. +*IssueApi* | [**issue_delete_subscription**](docs/IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue +*IssueApi* | [**issue_delete_time**](docs/IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time +*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_attachment**](docs/IssueApi.md#issue_edit_issue_attachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment +*IssueApi* | [**issue_edit_issue_comment_attachment**](docs/IssueApi.md#issue_edit_issue_comment_attachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment +*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_comment**](docs/IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment +*IssueApi* | [**issue_get_comment_reactions**](docs/IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue +*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_comments_and_timeline**](docs/IssueApi.md#issue_get_comments_and_timeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events 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_issue_attachment**](docs/IssueApi.md#issue_get_issue_attachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment +*IssueApi* | [**issue_get_issue_comment_attachment**](docs/IssueApi.md#issue_get_issue_comment_attachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment +*IssueApi* | [**issue_get_issue_reactions**](docs/IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of 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_blocks**](docs/IssueApi.md#issue_list_blocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue +*IssueApi* | [**issue_list_issue_attachments**](docs/IssueApi.md#issue_list_issue_attachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments +*IssueApi* | [**issue_list_issue_comment_attachments**](docs/IssueApi.md#issue_list_issue_comment_attachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments +*IssueApi* | [**issue_list_issue_dependencies**](docs/IssueApi.md#issue_list_issue_dependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. +*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_post_comment_reaction**](docs/IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue +*IssueApi* | [**issue_post_issue_reaction**](docs/IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue +*IssueApi* | [**issue_remove_issue_blocking**](docs/IssueApi.md#issue_remove_issue_blocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path +*IssueApi* | [**issue_remove_issue_dependencies**](docs/IssueApi.md#issue_remove_issue_dependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency +*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_reset_time**](docs/IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue +*IssueApi* | [**issue_search_issues**](docs/IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to +*IssueApi* | [**issue_start_stop_watch**](docs/IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. +*IssueApi* | [**issue_stop_stop_watch**](docs/IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. +*IssueApi* | [**issue_subscriptions**](docs/IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. +*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times +*IssueApi* | [**move_issue_pin**](docs/IssueApi.md#move_issue_pin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position +*IssueApi* | [**pin_issue**](docs/IssueApi.md#pin_issue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue +*IssueApi* | [**unpin_issue**](docs/IssueApi.md#unpin_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue +*MiscellaneousApi* | [**get_gitignore_template_info**](docs/MiscellaneousApi.md#get_gitignore_template_info) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template +*MiscellaneousApi* | [**get_label_template_info**](docs/MiscellaneousApi.md#get_label_template_info) | **GET** /label/templates/{name} | Returns all labels in a template +*MiscellaneousApi* | [**get_license_template_info**](docs/MiscellaneousApi.md#get_license_template_info) | **GET** /licenses/{name} | Returns information about a license template +*MiscellaneousApi* | [**get_node_info**](docs/MiscellaneousApi.md#get_node_info) | **GET** /nodeinfo | Returns the nodeinfo of the Gitea application +*MiscellaneousApi* | [**get_signing_key**](docs/MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg +*MiscellaneousApi* | [**get_version**](docs/MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application +*MiscellaneousApi* | [**list_gitignores_templates**](docs/MiscellaneousApi.md#list_gitignores_templates) | **GET** /gitignore/templates | Returns a list of all gitignore templates +*MiscellaneousApi* | [**list_label_templates**](docs/MiscellaneousApi.md#list_label_templates) | **GET** /label/templates | Returns a list of all label templates +*MiscellaneousApi* | [**list_license_templates**](docs/MiscellaneousApi.md#list_license_templates) | **GET** /licenses | Returns a list of all license templates +*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 +*MiscellaneousApi* | [**render_markup**](docs/MiscellaneousApi.md#render_markup) | **POST** /markup | Render a markup document as HTML +*NotificationApi* | [**notify_get_list**](docs/NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads +*NotificationApi* | [**notify_get_repo_list**](docs/NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo +*NotificationApi* | [**notify_get_thread**](docs/NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID +*NotificationApi* | [**notify_new_available**](docs/NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist +*NotificationApi* | [**notify_read_list**](docs/NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read, pinned or unread +*NotificationApi* | [**notify_read_repo_list**](docs/NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread on a specific repo +*NotificationApi* | [**notify_read_thread**](docs/NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID +*OrganizationApi* | [**create_org_repo**](docs/OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**create_org_repo_deprecated**](docs/OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**create_org_variable**](docs/OrganizationApi.md#create_org_variable) | **POST** /orgs/{org}/actions/variables/{variablename} | Create an org-level variable +*OrganizationApi* | [**delete_org_secret**](docs/OrganizationApi.md#delete_org_secret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization +*OrganizationApi* | [**delete_org_variable**](docs/OrganizationApi.md#delete_org_variable) | **DELETE** /orgs/{org}/actions/variables/{variablename} | Delete an org-level variable +*OrganizationApi* | [**get_org_variable**](docs/OrganizationApi.md#get_org_variable) | **GET** /orgs/{org}/actions/variables/{variablename} | Get an org-level variable +*OrganizationApi* | [**get_org_variables_list**](docs/OrganizationApi.md#get_org_variables_list) | **GET** /orgs/{org}/actions/variables | Get an org-level variables list +*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_label**](docs/OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization +*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_avatar**](docs/OrganizationApi.md#org_delete_avatar) | **DELETE** /orgs/{org}/avatar | Delete Avatar +*OrganizationApi* | [**org_delete_hook**](docs/OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +*OrganizationApi* | [**org_delete_label**](docs/OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label +*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_label**](docs/OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label +*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_all**](docs/OrganizationApi.md#org_get_all) | **GET** /orgs | Get list of organizations +*OrganizationApi* | [**org_get_hook**](docs/OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +*OrganizationApi* | [**org_get_label**](docs/OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label +*OrganizationApi* | [**org_get_runner_registration_token**](docs/OrganizationApi.md#org_get_runner_registration_token) | **GET** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token +*OrganizationApi* | [**org_get_team**](docs/OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team +*OrganizationApi* | [**org_get_user_permissions**](docs/OrganizationApi.md#org_get_user_permissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization +*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_actions_secrets**](docs/OrganizationApi.md#org_list_actions_secrets) | **GET** /orgs/{org}/actions/secrets | List an organization's actions secrets +*OrganizationApi* | [**org_list_activity_feeds**](docs/OrganizationApi.md#org_list_activity_feeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds +*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_labels**](docs/OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels +*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_activity_feeds**](docs/OrganizationApi.md#org_list_team_activity_feeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds +*OrganizationApi* | [**org_list_team_member**](docs/OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team +*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_repo**](docs/OrganizationApi.md#org_list_team_repo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team +*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 +*OrganizationApi* | [**org_update_avatar**](docs/OrganizationApi.md#org_update_avatar) | **POST** /orgs/{org}/avatar | Update Avatar +*OrganizationApi* | [**organization_block_user**](docs/OrganizationApi.md#organization_block_user) | **PUT** /orgs/{org}/blocks/{username} | Block a user +*OrganizationApi* | [**organization_check_user_block**](docs/OrganizationApi.md#organization_check_user_block) | **GET** /orgs/{org}/blocks/{username} | Check if a user is blocked by the organization +*OrganizationApi* | [**organization_list_blocks**](docs/OrganizationApi.md#organization_list_blocks) | **GET** /orgs/{org}/blocks | List users blocked by the organization +*OrganizationApi* | [**organization_unblock_user**](docs/OrganizationApi.md#organization_unblock_user) | **DELETE** /orgs/{org}/blocks/{username} | Unblock a user +*OrganizationApi* | [**team_search**](docs/OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization +*OrganizationApi* | [**update_org_secret**](docs/OrganizationApi.md#update_org_secret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization +*OrganizationApi* | [**update_org_variable**](docs/OrganizationApi.md#update_org_variable) | **PUT** /orgs/{org}/actions/variables/{variablename} | Update an org-level variable +*PackageApi* | [**delete_package**](docs/PackageApi.md#delete_package) | **DELETE** /packages/{owner}/{type}/{name}/{version} | Delete a package +*PackageApi* | [**get_package**](docs/PackageApi.md#get_package) | **GET** /packages/{owner}/{type}/{name}/{version} | Gets a package +*PackageApi* | [**list_package_files**](docs/PackageApi.md#list_package_files) | **GET** /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package +*PackageApi* | [**list_packages**](docs/PackageApi.md#list_packages) | **GET** /packages/{owner} | Gets all packages of an owner +*RepositoryApi* | [**accept_repo_transfer**](docs/RepositoryApi.md#accept_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer +*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* | [**create_repo_variable**](docs/RepositoryApi.md#create_repo_variable) | **POST** /repos/{owner}/{repo}/actions/variables/{variablename} | Create a repo-level variable +*RepositoryApi* | [**delete_repo_secret**](docs/RepositoryApi.md#delete_repo_secret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository +*RepositoryApi* | [**delete_repo_variable**](docs/RepositoryApi.md#delete_repo_variable) | **DELETE** /repos/{owner}/{repo}/actions/variables/{variablename} | Delete a repo-level variable +*RepositoryApi* | [**generate_repo**](docs/RepositoryApi.md#generate_repo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template +*RepositoryApi* | [**get_annotated_tag**](docs/RepositoryApi.md#get_annotated_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +*RepositoryApi* | [**get_blob**](docs/RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +*RepositoryApi* | [**get_repo_variable**](docs/RepositoryApi.md#get_repo_variable) | **GET** /repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable +*RepositoryApi* | [**get_repo_variables_list**](docs/RepositoryApi.md#get_repo_variables_list) | **GET** /repos/{owner}/{repo}/actions/variables | Get repo-level variables list +*RepositoryApi* | [**get_tree**](docs/RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +*RepositoryApi* | [**list_action_tasks**](docs/RepositoryApi.md#list_action_tasks) | **GET** /repos/{owner}/{repo}/actions/tasks | List a repository's action tasks +*RepositoryApi* | [**list_forks**](docs/RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +*RepositoryApi* | [**reject_repo_transfer**](docs/RepositoryApi.md#reject_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/reject | Reject a repo transfer +*RepositoryApi* | [**repo_add_collaborator**](docs/RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add or Update a collaborator to a repository +*RepositoryApi* | [**repo_add_push_mirror**](docs/RepositoryApi.md#repo_add_push_mirror) | **POST** /repos/{owner}/{repo}/push_mirrors | add a push mirror to the repository +*RepositoryApi* | [**repo_add_team**](docs/RepositoryApi.md#repo_add_team) | **PUT** /repos/{owner}/{repo}/teams/{team} | Add a team to a repository +*RepositoryApi* | [**repo_add_topic**](docs/RepositoryApi.md#repo_add_topic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository +*RepositoryApi* | [**repo_apply_diff_patch**](docs/RepositoryApi.md#repo_apply_diff_patch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository +*RepositoryApi* | [**repo_cancel_scheduled_auto_merge**](docs/RepositoryApi.md#repo_cancel_scheduled_auto_merge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request +*RepositoryApi* | [**repo_change_files**](docs/RepositoryApi.md#repo_change_files) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in 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_check_team**](docs/RepositoryApi.md#repo_check_team) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository +*RepositoryApi* | [**repo_compare_diff**](docs/RepositoryApi.md#repo_compare_diff) | **GET** /repos/{owner}/{repo}/compare/{basehead} | Get commit comparison information +*RepositoryApi* | [**repo_create_branch**](docs/RepositoryApi.md#repo_create_branch) | **POST** /repos/{owner}/{repo}/branches | Create a branch +*RepositoryApi* | [**repo_create_branch_protection**](docs/RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository +*RepositoryApi* | [**repo_create_file**](docs/RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in 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_pull_review**](docs/RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request +*RepositoryApi* | [**repo_create_pull_review_requests**](docs/RepositoryApi.md#repo_create_pull_review_requests) | **POST** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | create review requests for 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_create_tag**](docs/RepositoryApi.md#repo_create_tag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository +*RepositoryApi* | [**repo_create_tag_protection**](docs/RepositoryApi.md#repo_create_tag_protection) | **POST** /repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository +*RepositoryApi* | [**repo_create_wiki_page**](docs/RepositoryApi.md#repo_create_wiki_page) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page +*RepositoryApi* | [**repo_delete**](docs/RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +*RepositoryApi* | [**repo_delete_avatar**](docs/RepositoryApi.md#repo_delete_avatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete avatar +*RepositoryApi* | [**repo_delete_branch**](docs/RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository +*RepositoryApi* | [**repo_delete_branch_protection**](docs/RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the 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_file**](docs/RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository +*RepositoryApi* | [**repo_delete_git_hook**](docs/RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in 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_pull_review**](docs/RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request +*RepositoryApi* | [**repo_delete_pull_review_requests**](docs/RepositoryApi.md#repo_delete_pull_review_requests) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | cancel review requests for a pull request +*RepositoryApi* | [**repo_delete_push_mirror**](docs/RepositoryApi.md#repo_delete_push_mirror) | **DELETE** /repos/{owner}/{repo}/push_mirrors/{name} | deletes a push mirror from a repository by remoteName +*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_delete_release_by_tag**](docs/RepositoryApi.md#repo_delete_release_by_tag) | **DELETE** /repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name +*RepositoryApi* | [**repo_delete_tag**](docs/RepositoryApi.md#repo_delete_tag) | **DELETE** /repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name +*RepositoryApi* | [**repo_delete_tag_protection**](docs/RepositoryApi.md#repo_delete_tag_protection) | **DELETE** /repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository +*RepositoryApi* | [**repo_delete_team**](docs/RepositoryApi.md#repo_delete_team) | **DELETE** /repos/{owner}/{repo}/teams/{team} | Delete a team from a repository +*RepositoryApi* | [**repo_delete_topic**](docs/RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository +*RepositoryApi* | [**repo_delete_wiki_page**](docs/RepositoryApi.md#repo_delete_wiki_page) | **DELETE** /repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page +*RepositoryApi* | [**repo_dismiss_pull_review**](docs/RepositoryApi.md#repo_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals | Dismiss a review for a pull request +*RepositoryApi* | [**repo_download_commit_diff_or_patch**](docs/RepositoryApi.md#repo_download_commit_diff_or_patch) | **GET** /repos/{owner}/{repo}/git/commits/{sha}.{diffType} | Get a commit's diff or patch +*RepositoryApi* | [**repo_download_pull_diff_or_patch**](docs/RepositoryApi.md#repo_download_pull_diff_or_patch) | **GET** /repos/{owner}/{repo}/pulls/{index}.{diffType} | Get a pull request diff or patch +*RepositoryApi* | [**repo_edit**](docs/RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +*RepositoryApi* | [**repo_edit_branch_protection**](docs/RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed +*RepositoryApi* | [**repo_edit_git_hook**](docs/RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository +*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. If using deadline only the date will be taken into account, and time of day ignored. +*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_edit_tag_protection**](docs/RepositoryApi.md#repo_edit_tag_protection) | **PATCH** /repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed +*RepositoryApi* | [**repo_edit_wiki_page**](docs/RepositoryApi.md#repo_edit_wiki_page) | **PATCH** /repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page +*RepositoryApi* | [**repo_get**](docs/RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository +*RepositoryApi* | [**repo_get_all_commits**](docs/RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from 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_assignees**](docs/RepositoryApi.md#repo_get_assignees) | **GET** /repos/{owner}/{repo}/assignees | Return all users that have write access and can be assigned to issues +*RepositoryApi* | [**repo_get_branch**](docs/RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection +*RepositoryApi* | [**repo_get_branch_protection**](docs/RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the 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}/status | Get a commit's combined status, by branch/tag/commit reference +*RepositoryApi* | [**repo_get_commit_pull_request**](docs/RepositoryApi.md#repo_get_commit_pull_request) | **GET** /repos/{owner}/{repo}/commits/{sha}/pull | Get the merged pull request of the commit +*RepositoryApi* | [**repo_get_contents**](docs/RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir +*RepositoryApi* | [**repo_get_contents_list**](docs/RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir +*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_git_hook**](docs/RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook +*RepositoryApi* | [**repo_get_hook**](docs/RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +*RepositoryApi* | [**repo_get_issue_config**](docs/RepositoryApi.md#repo_get_issue_config) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo +*RepositoryApi* | [**repo_get_issue_templates**](docs/RepositoryApi.md#repo_get_issue_templates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository +*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_languages**](docs/RepositoryApi.md#repo_get_languages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written +*RepositoryApi* | [**repo_get_latest_release**](docs/RepositoryApi.md#repo_get_latest_release) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at +*RepositoryApi* | [**repo_get_licenses**](docs/RepositoryApi.md#repo_get_licenses) | **GET** /repos/{owner}/{repo}/licenses | Get repo licenses +*RepositoryApi* | [**repo_get_note**](docs/RepositoryApi.md#repo_get_note) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository +*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_pull_request_by_base_head**](docs/RepositoryApi.md#repo_get_pull_request_by_base_head) | **GET** /repos/{owner}/{repo}/pulls/{base}/{head} | Get a pull request by base and head +*RepositoryApi* | [**repo_get_pull_request_commits**](docs/RepositoryApi.md#repo_get_pull_request_commits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request +*RepositoryApi* | [**repo_get_pull_request_files**](docs/RepositoryApi.md#repo_get_pull_request_files) | **GET** /repos/{owner}/{repo}/pulls/{index}/files | Get changed files for a pull request +*RepositoryApi* | [**repo_get_pull_review**](docs/RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request +*RepositoryApi* | [**repo_get_pull_review_comments**](docs/RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request +*RepositoryApi* | [**repo_get_push_mirror_by_remote_name**](docs/RepositoryApi.md#repo_get_push_mirror_by_remote_name) | **GET** /repos/{owner}/{repo}/push_mirrors/{name} | Get push mirror of the repository by remoteName +*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_raw_file_or_lfs**](docs/RepositoryApi.md#repo_get_raw_file_or_lfs) | **GET** /repos/{owner}/{repo}/media/{filepath} | Get a file or it's LFS object 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_get_release_by_tag**](docs/RepositoryApi.md#repo_get_release_by_tag) | **GET** /repos/{owner}/{repo}/releases/tags/{tag} | Get a release by tag name +*RepositoryApi* | [**repo_get_repo_permissions**](docs/RepositoryApi.md#repo_get_repo_permissions) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator}/permission | Get repository permissions for a user +*RepositoryApi* | [**repo_get_reviewers**](docs/RepositoryApi.md#repo_get_reviewers) | **GET** /repos/{owner}/{repo}/reviewers | Return all users that can be requested to review in this repo +*RepositoryApi* | [**repo_get_runner_registration_token**](docs/RepositoryApi.md#repo_get_runner_registration_token) | **GET** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token +*RepositoryApi* | [**repo_get_single_commit**](docs/RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +*RepositoryApi* | [**repo_get_tag**](docs/RepositoryApi.md#repo_get_tag) | **GET** /repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name +*RepositoryApi* | [**repo_get_tag_protection**](docs/RepositoryApi.md#repo_get_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository +*RepositoryApi* | [**repo_get_wiki_page**](docs/RepositoryApi.md#repo_get_wiki_page) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page +*RepositoryApi* | [**repo_get_wiki_page_revisions**](docs/RepositoryApi.md#repo_get_wiki_page_revisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page +*RepositoryApi* | [**repo_get_wiki_pages**](docs/RepositoryApi.md#repo_get_wiki_pages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages +*RepositoryApi* | [**repo_list_actions_secrets**](docs/RepositoryApi.md#repo_list_actions_secrets) | **GET** /repos/{owner}/{repo}/actions/secrets | List an repo's actions secrets +*RepositoryApi* | [**repo_list_activity_feeds**](docs/RepositoryApi.md#repo_list_activity_feeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds +*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_branch_protection**](docs/RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository +*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_hooks**](docs/RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository +*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_pinned_issues**](docs/RepositoryApi.md#repo_list_pinned_issues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues +*RepositoryApi* | [**repo_list_pinned_pull_requests**](docs/RepositoryApi.md#repo_list_pinned_pull_requests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests +*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_pull_reviews**](docs/RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request +*RepositoryApi* | [**repo_list_push_mirrors**](docs/RepositoryApi.md#repo_list_push_mirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository +*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_statuses_by_ref**](docs/RepositoryApi.md#repo_list_statuses_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference +*RepositoryApi* | [**repo_list_subscribers**](docs/RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +*RepositoryApi* | [**repo_list_tag_protection**](docs/RepositoryApi.md#repo_list_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections | List tag protections for a repository +*RepositoryApi* | [**repo_list_tags**](docs/RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +*RepositoryApi* | [**repo_list_teams**](docs/RepositoryApi.md#repo_list_teams) | **GET** /repos/{owner}/{repo}/teams | List a repository's teams +*RepositoryApi* | [**repo_list_topics**](docs/RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has +*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_merge_upstream**](docs/RepositoryApi.md#repo_merge_upstream) | **POST** /repos/{owner}/{repo}/merge-upstream | Merge a branch from upstream +*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_new_pin_allowed**](docs/RepositoryApi.md#repo_new_pin_allowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed +*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_push_mirror_sync**](docs/RepositoryApi.md#repo_push_mirror_sync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository +*RepositoryApi* | [**repo_search**](docs/RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories +*RepositoryApi* | [**repo_signing_key**](docs/RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository +*RepositoryApi* | [**repo_submit_pull_review**](docs/RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request +*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* | [**repo_transfer**](docs/RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership +*RepositoryApi* | [**repo_un_dismiss_pull_review**](docs/RepositoryApi.md#repo_un_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request +*RepositoryApi* | [**repo_update_avatar**](docs/RepositoryApi.md#repo_update_avatar) | **POST** /repos/{owner}/{repo}/avatar | Update avatar +*RepositoryApi* | [**repo_update_branch**](docs/RepositoryApi.md#repo_update_branch) | **PATCH** /repos/{owner}/{repo}/branches/{branch} | Update a branch +*RepositoryApi* | [**repo_update_branch_protection_priories**](docs/RepositoryApi.md#repo_update_branch_protection_priories) | **POST** /repos/{owner}/{repo}/branch_protections/priority | Update the priorities of branch protections for a repository. +*RepositoryApi* | [**repo_update_file**](docs/RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository +*RepositoryApi* | [**repo_update_pull_request**](docs/RepositoryApi.md#repo_update_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch +*RepositoryApi* | [**repo_update_topics**](docs/RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository +*RepositoryApi* | [**repo_validate_issue_config**](docs/RepositoryApi.md#repo_validate_issue_config) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config +*RepositoryApi* | [**topic_search**](docs/RepositoryApi.md#topic_search) | **GET** /topics/search | search topics via keyword +*RepositoryApi* | [**update_repo_secret**](docs/RepositoryApi.md#update_repo_secret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository +*RepositoryApi* | [**update_repo_variable**](docs/RepositoryApi.md#update_repo_variable) | **PUT** /repos/{owner}/{repo}/actions/variables/{variablename} | Update a repo-level variable +*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 +*RepositoryApi* | [**user_tracked_times**](docs/RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo +*SettingsApi* | [**get_general_api_settings**](docs/SettingsApi.md#get_general_api_settings) | **GET** /settings/api | Get instance's global settings for api +*SettingsApi* | [**get_general_attachment_settings**](docs/SettingsApi.md#get_general_attachment_settings) | **GET** /settings/attachment | Get instance's global settings for Attachment +*SettingsApi* | [**get_general_repository_settings**](docs/SettingsApi.md#get_general_repository_settings) | **GET** /settings/repository | Get instance's global settings for repositories +*SettingsApi* | [**get_general_ui_settings**](docs/SettingsApi.md#get_general_ui_settings) | **GET** /settings/ui | Get instance's global settings for ui +*UserApi* | [**create_current_user_repo**](docs/UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*UserApi* | [**create_user_variable**](docs/UserApi.md#create_user_variable) | **POST** /user/actions/variables/{variablename} | Create a user-level variable +*UserApi* | [**delete_user_secret**](docs/UserApi.md#delete_user_secret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope +*UserApi* | [**delete_user_variable**](docs/UserApi.md#delete_user_variable) | **DELETE** /user/actions/variables/{variablename} | Delete a user-level variable which is created by current doer +*UserApi* | [**get_user_settings**](docs/UserApi.md#get_user_settings) | **GET** /user/settings | Get user settings +*UserApi* | [**get_user_variable**](docs/UserApi.md#get_user_variable) | **GET** /user/actions/variables/{variablename} | Get a user-level variable which is created by current doer +*UserApi* | [**get_user_variables_list**](docs/UserApi.md#get_user_variables_list) | **GET** /user/actions/variables | Get the user-level list of variables which is created by current doer +*UserApi* | [**get_verification_token**](docs/UserApi.md#get_verification_token) | **GET** /user/gpg_key_token | Get a Token to verify +*UserApi* | [**update_user_secret**](docs/UserApi.md#update_user_secret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope +*UserApi* | [**update_user_settings**](docs/UserApi.md#update_user_settings) | **PATCH** /user/settings | Update user settings +*UserApi* | [**update_user_variable**](docs/UserApi.md#update_user_variable) | **PUT** /user/actions/variables/{variablename} | Update a user-level variable which is created by current doer +*UserApi* | [**user_add_email**](docs/UserApi.md#user_add_email) | **POST** /user/emails | Add email addresses +*UserApi* | [**user_block_user**](docs/UserApi.md#user_block_user) | **PUT** /user/blocks/{username} | Block a user +*UserApi* | [**user_check_following**](docs/UserApi.md#user_check_following) | **GET** /users/{username}/following/{target} | Check if one user is following another user +*UserApi* | [**user_check_user_block**](docs/UserApi.md#user_check_user_block) | **GET** /user/blocks/{username} | Check if a user is blocked by the authenticated user +*UserApi* | [**user_create_hook**](docs/UserApi.md#user_create_hook) | **POST** /user/hooks | Create a hook +*UserApi* | [**user_create_o_auth2_application**](docs/UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | creates a new OAuth2 application +*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 +*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_avatar**](docs/UserApi.md#user_delete_avatar) | **DELETE** /user/avatar | Delete Avatar +*UserApi* | [**user_delete_email**](docs/UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses +*UserApi* | [**user_delete_hook**](docs/UserApi.md#user_delete_hook) | **DELETE** /user/hooks/{id} | Delete a hook +*UserApi* | [**user_delete_o_auth2_application**](docs/UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | delete an OAuth2 Application +*UserApi* | [**user_edit_hook**](docs/UserApi.md#user_edit_hook) | **PATCH** /user/hooks/{id} | Update a hook +*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_hook**](docs/UserApi.md#user_get_hook) | **GET** /user/hooks/{id} | Get a hook +*UserApi* | [**user_get_o_auth2_application**](docs/UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | get an OAuth2 Application +*UserApi* | [**user_get_oauth2_application**](docs/UserApi.md#user_get_oauth2_application) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications +*UserApi* | [**user_get_runner_registration_token**](docs/UserApi.md#user_get_runner_registration_token) | **GET** /user/actions/runners/registration-token | Get an user's actions runner registration token +*UserApi* | [**user_get_stop_watches**](docs/UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches +*UserApi* | [**user_get_tokens**](docs/UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens +*UserApi* | [**user_list_activity_feeds**](docs/UserApi.md#user_list_activity_feeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds +*UserApi* | [**user_list_blocks**](docs/UserApi.md#user_list_blocks) | **GET** /user/blocks | List users blocked by the authenticated user +*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_hooks**](docs/UserApi.md#user_list_hooks) | **GET** /user/hooks | List the authenticated user's webhooks +*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_list_teams**](docs/UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to +*UserApi* | [**user_search**](docs/UserApi.md#user_search) | **GET** /users/search | Search for users +*UserApi* | [**user_unblock_user**](docs/UserApi.md#user_unblock_user) | **DELETE** /user/blocks/{username} | Unblock a user +*UserApi* | [**user_update_avatar**](docs/UserApi.md#user_update_avatar) | **POST** /user/avatar | Update Avatar +*UserApi* | [**user_update_o_auth2_application**](docs/UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | update an OAuth2 Application, this includes regenerating the client secret +*UserApi* | [**user_verify_gpg_key**](docs/UserApi.md#user_verify_gpg_key) | **POST** /user/gpg_key_verify | Verify a GPG key + + +## Documentation For Models + + - [APIError](docs/APIError.md) + - [AccessToken](docs/AccessToken.md) + - [ActionTask](docs/ActionTask.md) + - [ActionTaskResponse](docs/ActionTaskResponse.md) + - [ActionVariable](docs/ActionVariable.md) + - [Activity](docs/Activity.md) + - [ActivityPub](docs/ActivityPub.md) + - [AddCollaboratorOption](docs/AddCollaboratorOption.md) + - [AddTimeOption](docs/AddTimeOption.md) + - [AnnotatedTag](docs/AnnotatedTag.md) + - [AnnotatedTagObject](docs/AnnotatedTagObject.md) + - [Attachment](docs/Attachment.md) + - [Badge](docs/Badge.md) + - [Branch](docs/Branch.md) + - [BranchProtection](docs/BranchProtection.md) + - [ChangeFileOperation](docs/ChangeFileOperation.md) + - [ChangeFilesOptions](docs/ChangeFilesOptions.md) + - [ChangedFile](docs/ChangedFile.md) + - [CombinedStatus](docs/CombinedStatus.md) + - [Comment](docs/Comment.md) + - [Commit](docs/Commit.md) + - [CommitAffectedFiles](docs/CommitAffectedFiles.md) + - [CommitDateOptions](docs/CommitDateOptions.md) + - [CommitMeta](docs/CommitMeta.md) + - [CommitStats](docs/CommitStats.md) + - [CommitStatus](docs/CommitStatus.md) + - [CommitStatusState](docs/CommitStatusState.md) + - [CommitUser](docs/CommitUser.md) + - [Compare](docs/Compare.md) + - [ContentsResponse](docs/ContentsResponse.md) + - [CreateAccessTokenOption](docs/CreateAccessTokenOption.md) + - [CreateBranchProtectionOption](docs/CreateBranchProtectionOption.md) + - [CreateBranchRepoOption](docs/CreateBranchRepoOption.md) + - [CreateEmailOption](docs/CreateEmailOption.md) + - [CreateFileOptions](docs/CreateFileOptions.md) + - [CreateForkOption](docs/CreateForkOption.md) + - [CreateGPGKeyOption](docs/CreateGPGKeyOption.md) + - [CreateHookOption](docs/CreateHookOption.md) + - [CreateHookOptionConfig](docs/CreateHookOptionConfig.md) + - [CreateIssueCommentOption](docs/CreateIssueCommentOption.md) + - [CreateIssueOption](docs/CreateIssueOption.md) + - [CreateKeyOption](docs/CreateKeyOption.md) + - [CreateLabelOption](docs/CreateLabelOption.md) + - [CreateMilestoneOption](docs/CreateMilestoneOption.md) + - [CreateOAuth2ApplicationOptions](docs/CreateOAuth2ApplicationOptions.md) + - [CreateOrUpdateSecretOption](docs/CreateOrUpdateSecretOption.md) + - [CreateOrgOption](docs/CreateOrgOption.md) + - [CreatePullRequestOption](docs/CreatePullRequestOption.md) + - [CreatePullReviewComment](docs/CreatePullReviewComment.md) + - [CreatePullReviewOptions](docs/CreatePullReviewOptions.md) + - [CreatePushMirrorOption](docs/CreatePushMirrorOption.md) + - [CreateReleaseOption](docs/CreateReleaseOption.md) + - [CreateRepoOption](docs/CreateRepoOption.md) + - [CreateStatusOption](docs/CreateStatusOption.md) + - [CreateTagOption](docs/CreateTagOption.md) + - [CreateTagProtectionOption](docs/CreateTagProtectionOption.md) + - [CreateTeamOption](docs/CreateTeamOption.md) + - [CreateUserOption](docs/CreateUserOption.md) + - [CreateVariableOption](docs/CreateVariableOption.md) + - [CreateWikiPageOptions](docs/CreateWikiPageOptions.md) + - [Cron](docs/Cron.md) + - [DeleteEmailOption](docs/DeleteEmailOption.md) + - [DeleteFileOptions](docs/DeleteFileOptions.md) + - [DeployKey](docs/DeployKey.md) + - [DismissPullReviewOptions](docs/DismissPullReviewOptions.md) + - [EditAttachmentOptions](docs/EditAttachmentOptions.md) + - [EditBranchProtectionOption](docs/EditBranchProtectionOption.md) + - [EditDeadlineOption](docs/EditDeadlineOption.md) + - [EditGitHookOption](docs/EditGitHookOption.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) + - [EditReactionOption](docs/EditReactionOption.md) + - [EditReleaseOption](docs/EditReleaseOption.md) + - [EditRepoOption](docs/EditRepoOption.md) + - [EditTagProtectionOption](docs/EditTagProtectionOption.md) + - [EditTeamOption](docs/EditTeamOption.md) + - [EditUserOption](docs/EditUserOption.md) + - [Email](docs/Email.md) + - [ExternalTracker](docs/ExternalTracker.md) + - [ExternalWiki](docs/ExternalWiki.md) + - [FileCommitResponse](docs/FileCommitResponse.md) + - [FileDeleteResponse](docs/FileDeleteResponse.md) + - [FileLinksResponse](docs/FileLinksResponse.md) + - [FileResponse](docs/FileResponse.md) + - [FilesResponse](docs/FilesResponse.md) + - [GPGKey](docs/GPGKey.md) + - [GPGKeyEmail](docs/GPGKeyEmail.md) + - [GeneralAPISettings](docs/GeneralAPISettings.md) + - [GeneralAttachmentSettings](docs/GeneralAttachmentSettings.md) + - [GeneralRepoSettings](docs/GeneralRepoSettings.md) + - [GeneralUISettings](docs/GeneralUISettings.md) + - [GenerateRepoOption](docs/GenerateRepoOption.md) + - [GitBlobResponse](docs/GitBlobResponse.md) + - [GitEntry](docs/GitEntry.md) + - [GitHook](docs/GitHook.md) + - [GitObject](docs/GitObject.md) + - [GitTreeResponse](docs/GitTreeResponse.md) + - [GitignoreTemplateInfo](docs/GitignoreTemplateInfo.md) + - [Hook](docs/Hook.md) + - [Identity](docs/Identity.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InternalTracker](docs/InternalTracker.md) + - [Issue](docs/Issue.md) + - [IssueConfig](docs/IssueConfig.md) + - [IssueConfigContactLink](docs/IssueConfigContactLink.md) + - [IssueConfigValidation](docs/IssueConfigValidation.md) + - [IssueDeadline](docs/IssueDeadline.md) + - [IssueFormField](docs/IssueFormField.md) + - [IssueFormFieldType](docs/IssueFormFieldType.md) + - [IssueFormFieldVisible](docs/IssueFormFieldVisible.md) + - [IssueLabelsOption](docs/IssueLabelsOption.md) + - [IssueMeta](docs/IssueMeta.md) + - [IssueTemplate](docs/IssueTemplate.md) + - [IssueTemplateStringSlice](docs/IssueTemplateStringSlice.md) + - [Label](docs/Label.md) + - [LabelTemplate](docs/LabelTemplate.md) + - [LicenseTemplateInfo](docs/LicenseTemplateInfo.md) + - [LicensesTemplateListEntry](docs/LicensesTemplateListEntry.md) + - [MarkdownOption](docs/MarkdownOption.md) + - [MarkupOption](docs/MarkupOption.md) + - [MergePullRequestOption](docs/MergePullRequestOption.md) + - [MergeUpstreamRequest](docs/MergeUpstreamRequest.md) + - [MergeUpstreamResponse](docs/MergeUpstreamResponse.md) + - [MigrateRepoOptions](docs/MigrateRepoOptions.md) + - [Milestone](docs/Milestone.md) + - [NewIssuePinsAllowed](docs/NewIssuePinsAllowed.md) + - [NodeInfo](docs/NodeInfo.md) + - [NodeInfoServices](docs/NodeInfoServices.md) + - [NodeInfoSoftware](docs/NodeInfoSoftware.md) + - [NodeInfoUsage](docs/NodeInfoUsage.md) + - [NodeInfoUsageUsers](docs/NodeInfoUsageUsers.md) + - [Note](docs/Note.md) + - [NotificationCount](docs/NotificationCount.md) + - [NotificationSubject](docs/NotificationSubject.md) + - [NotificationThread](docs/NotificationThread.md) + - [NotifySubjectType](docs/NotifySubjectType.md) + - [OAuth2Application](docs/OAuth2Application.md) + - [Organization](docs/Organization.md) + - [OrganizationPermissions](docs/OrganizationPermissions.md) + - [PRBranchInfo](docs/PRBranchInfo.md) + - [Package](docs/Package.md) + - [PackageFile](docs/PackageFile.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) + - [PullReview](docs/PullReview.md) + - [PullReviewComment](docs/PullReviewComment.md) + - [PullReviewRequestOptions](docs/PullReviewRequestOptions.md) + - [PushMirror](docs/PushMirror.md) + - [Reaction](docs/Reaction.md) + - [Reference](docs/Reference.md) + - [Release](docs/Release.md) + - [RenameUserOption](docs/RenameUserOption.md) + - [RepoCollaboratorPermission](docs/RepoCollaboratorPermission.md) + - [RepoCommit](docs/RepoCommit.md) + - [RepoTopicOptions](docs/RepoTopicOptions.md) + - [RepoTransfer](docs/RepoTransfer.md) + - [Repository](docs/Repository.md) + - [RepositoryMeta](docs/RepositoryMeta.md) + - [ReviewStateType](docs/ReviewStateType.md) + - [SearchResults](docs/SearchResults.md) + - [Secret](docs/Secret.md) + - [ServerVersion](docs/ServerVersion.md) + - [StateType](docs/StateType.md) + - [StopWatch](docs/StopWatch.md) + - [SubmitPullReviewOptions](docs/SubmitPullReviewOptions.md) + - [Tag](docs/Tag.md) + - [TagProtection](docs/TagProtection.md) + - [Team](docs/Team.md) + - [TimeStamp](docs/TimeStamp.md) + - [TimelineComment](docs/TimelineComment.md) + - [TopicName](docs/TopicName.md) + - [TopicResponse](docs/TopicResponse.md) + - [TrackedTime](docs/TrackedTime.md) + - [TransferRepoOption](docs/TransferRepoOption.md) + - [UpdateBranchProtectionPriories](docs/UpdateBranchProtectionPriories.md) + - [UpdateBranchRepoOption](docs/UpdateBranchRepoOption.md) + - [UpdateFileOptions](docs/UpdateFileOptions.md) + - [UpdateRepoAvatarOption](docs/UpdateRepoAvatarOption.md) + - [UpdateUserAvatarOption](docs/UpdateUserAvatarOption.md) + - [UpdateVariableOption](docs/UpdateVariableOption.md) + - [User](docs/User.md) + - [UserBadgeOption](docs/UserBadgeOption.md) + - [UserHeatmapData](docs/UserHeatmapData.md) + - [UserSettings](docs/UserSettings.md) + - [UserSettingsOptions](docs/UserSettingsOptions.md) + - [WatchInfo](docs/WatchInfo.md) + - [WikiCommit](docs/WikiCommit.md) + - [WikiCommitList](docs/WikiCommitList.md) + - [WikiPage](docs/WikiPage.md) + - [WikiPageMetaData](docs/WikiPageMetaData.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 + +## TOTPHeader + +- **Type**: API key +- **API key parameter name**: X-GITEA-OTP +- **Location**: HTTP header + +## Token + +- **Type**: API key +- **API key parameter name**: token +- **Location**: URL query string + + +## Author + + + diff --git a/docs/APIError.md b/docs/APIError.md new file mode 100644 index 0000000..8f68675 --- /dev/null +++ b/docs/APIError.md @@ -0,0 +1,11 @@ +# APIError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/AccessToken.md b/docs/AccessToken.md new file mode 100644 index 0000000..62c58ca --- /dev/null +++ b/docs/AccessToken.md @@ -0,0 +1,14 @@ +# AccessToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**scopes** | **list[str]** | | [optional] +**sha1** | **str** | | [optional] +**token_last_eight** | **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/ActionTask.md b/docs/ActionTask.md new file mode 100644 index 0000000..ad82cc3 --- /dev/null +++ b/docs/ActionTask.md @@ -0,0 +1,22 @@ +# ActionTask + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | [optional] +**display_title** | **str** | | [optional] +**event** | **str** | | [optional] +**head_branch** | **str** | | [optional] +**head_sha** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**run_number** | **int** | | [optional] +**run_started_at** | **datetime** | | [optional] +**status** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] +**workflow_id** | **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/ActionTaskResponse.md b/docs/ActionTaskResponse.md new file mode 100644 index 0000000..7cc8069 --- /dev/null +++ b/docs/ActionTaskResponse.md @@ -0,0 +1,11 @@ +# ActionTaskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_count** | **int** | | [optional] +**workflow_runs** | [**list[ActionTask]**](ActionTask.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/ActionVariable.md b/docs/ActionVariable.md new file mode 100644 index 0000000..5fc5d03 --- /dev/null +++ b/docs/ActionVariable.md @@ -0,0 +1,13 @@ +# ActionVariable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | the value of the variable | [optional] +**name** | **str** | the name of the variable | [optional] +**owner_id** | **int** | the owner to which the variable belongs | [optional] +**repo_id** | **int** | the repository to which the variable belongs | [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/Activity.md b/docs/Activity.md new file mode 100644 index 0000000..7c4f668 --- /dev/null +++ b/docs/Activity.md @@ -0,0 +1,22 @@ +# Activity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**act_user** | [**User**](User.md) | | [optional] +**act_user_id** | **int** | | [optional] +**comment** | [**Comment**](Comment.md) | | [optional] +**comment_id** | **int** | | [optional] +**content** | **str** | | [optional] +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**is_private** | **bool** | | [optional] +**op_type** | **str** | the type of action | [optional] +**ref_name** | **str** | | [optional] +**repo** | [**Repository**](Repository.md) | | [optional] +**repo_id** | **int** | | [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/ActivityPub.md b/docs/ActivityPub.md new file mode 100644 index 0000000..1184d65 --- /dev/null +++ b/docs/ActivityPub.md @@ -0,0 +1,10 @@ +# ActivityPub + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **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/ActivitypubApi.md b/docs/ActivitypubApi.md new file mode 100644 index 0000000..92e3434 --- /dev/null +++ b/docs/ActivitypubApi.md @@ -0,0 +1,171 @@ +# gitea.ActivitypubApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activitypub_person**](ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user-id} | Returns the Person actor for a user +[**activitypub_person_inbox**](ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user-id}/inbox | Send to the inbox + + +# **activitypub_person** +> ActivityPub activitypub_person(user_id) + +Returns the Person actor for a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.ActivitypubApi(gitea.ApiClient(configuration)) +user_id = 56 # int | user ID of the user + +try: + # Returns the Person actor for a user + api_response = api_instance.activitypub_person(user_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ActivitypubApi->activitypub_person: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| user ID of the user | + +### Return type + +[**ActivityPub**](ActivityPub.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **activitypub_person_inbox** +> activitypub_person_inbox(user_id) + +Send to the inbox + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.ActivitypubApi(gitea.ApiClient(configuration)) +user_id = 56 # int | user ID of the user + +try: + # Send to the inbox + api_instance.activitypub_person_inbox(user_id) +except ApiException as e: + print("Exception when calling ActivitypubApi->activitypub_person_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| user ID 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), [TOTPHeader](../README.md#TOTPHeader), [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/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..702997c --- /dev/null +++ b/docs/AddTimeOption.md @@ -0,0 +1,12 @@ +# AddTimeOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**time** | **int** | time in seconds | +**user_name** | **str** | User who spent the time (optional) | [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/AdminApi.md b/docs/AdminApi.md new file mode 100644 index 0000000..01afc62 --- /dev/null +++ b/docs/AdminApi.md @@ -0,0 +1,2172 @@ +# gitea.AdminApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**admin_add_user_badges**](AdminApi.md#admin_add_user_badges) | **POST** /admin/users/{username}/badges | Add a badge to a user +[**admin_adopt_repository**](AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository +[**admin_create_hook**](AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook +[**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 of a user +[**admin_create_user**](AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user +[**admin_cron_list**](AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks +[**admin_cron_run**](AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task +[**admin_delete_hook**](AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook +[**admin_delete_unadopted_repository**](AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files +[**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user +[**admin_delete_user_badges**](AdminApi.md#admin_delete_user_badges) | **DELETE** /admin/users/{username}/badges | Remove a badge from 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_hook**](AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook +[**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +[**admin_get_all_emails**](AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all emails +[**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations +[**admin_get_hook**](AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook +[**admin_get_runner_registration_token**](AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token +[**admin_list_hooks**](AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List system's webhooks +[**admin_list_user_badges**](AdminApi.md#admin_list_user_badges) | **GET** /admin/users/{username}/badges | List a user's badges +[**admin_rename_user**](AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user +[**admin_search_emails**](AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search all emails +[**admin_search_users**](AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions +[**admin_unadopted_list**](AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories + + +# **admin_add_user_badges** +> admin_add_user_badges(username, body=body) + +Add a badge to a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +body = gitea.UserBadgeOption() # UserBadgeOption | (optional) + +try: + # Add a badge to a user + api_instance.admin_add_user_badges(username, body=body) +except ApiException as e: + print("Exception when calling AdminApi->admin_add_user_badges: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **body** | [**UserBadgeOption**](UserBadgeOption.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), [TOTPHeader](../README.md#TOTPHeader), [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_adopt_repository** +> admin_adopt_repository(owner, repo) + +Adopt unadopted files as a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Adopt unadopted files as a repository + api_instance.admin_adopt_repository(owner, repo) +except ApiException as e: + print("Exception when calling AdminApi->admin_adopt_repository: %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), [TOTPHeader](../README.md#TOTPHeader), [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_create_hook** +> Hook admin_create_hook(body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +body = gitea.CreateHookOption() # CreateHookOption | + +try: + # Create a hook + api_response = api_instance.admin_create_hook(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateHookOption**](CreateHookOption.md)| | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_org** +> Organization admin_create_org(username, organization) + +Create an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of the user that will own the created organization +organization = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of the user +key = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 of a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of the user. This user will own the created repository +repository = gitea.CreateRepoOption() # CreateRepoOption | + +try: + # Create a repository on behalf of 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_cron_list** +> list[Cron] admin_cron_list(page=page, limit=limit) + +List cron tasks + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List cron tasks + api_response = api_instance.admin_cron_list(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_cron_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Cron]**](Cron.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_cron_run** +> admin_cron_run(task) + +Run cron task + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +task = 'task_example' # str | task to run + +try: + # Run cron task + api_instance.admin_cron_run(task) +except ApiException as e: + print("Exception when calling AdminApi->admin_cron_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task** | **str**| task to run | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_hook** +> admin_delete_hook(id) + +Delete a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the hook to delete + +try: + # Delete a hook + api_instance.admin_delete_hook(id) +except ApiException as e: + print("Exception when calling AdminApi->admin_delete_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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), [TOTPHeader](../README.md#TOTPHeader), [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_unadopted_repository** +> admin_delete_unadopted_repository(owner, repo) + +Delete unadopted files + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Delete unadopted files + api_instance.admin_delete_unadopted_repository(owner, repo) +except ApiException as e: + print("Exception when calling AdminApi->admin_delete_unadopted_repository: %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), [TOTPHeader](../README.md#TOTPHeader), [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** +> admin_delete_user(username, purge=purge) + +Delete a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user to delete +purge = true # bool | purge the user from the system completely (optional) + +try: + # Delete a user + api_instance.admin_delete_user(username, purge=purge) +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 | + **purge** | **bool**| purge the user from the system completely | [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), [TOTPHeader](../README.md#TOTPHeader), [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_badges** +> admin_delete_user_badges(username, body=body) + +Remove a badge from a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +body = gitea.UserBadgeOption() # UserBadgeOption | (optional) + +try: + # Remove a badge from a user + api_instance.admin_delete_user_badges(username, body=body) +except ApiException as e: + print("Exception when calling AdminApi->admin_delete_user_badges: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **body** | [**UserBadgeOption**](UserBadgeOption.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_hook** +> Hook admin_edit_hook(id, body=body) + +Update a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the hook to update +body = gitea.EditHookOption() # EditHookOption | (optional) + +try: + # Update a hook + api_response = api_instance.admin_edit_hook(id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_edit_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the hook to update | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_edit_user** +> User admin_edit_user(username, body=body) + +Edit an existing user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user to edit +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_get_all_emails** +> list[Email] admin_get_all_emails(page=page, limit=limit) + +List all emails + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List all emails + api_response = api_instance.admin_get_all_emails(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_get_all_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_get_all_orgs** +> list[Organization] admin_get_all_orgs(page=page, limit=limit) + +List all organizations + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List all organizations + api_response = api_instance.admin_get_all_orgs(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_get_all_orgs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_get_hook** +> Hook admin_get_hook(id) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the hook to get + +try: + # Get a hook + api_response = api_instance.admin_get_hook(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_get_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the hook to get | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_get_runner_registration_token** +> admin_get_runner_registration_token() + +Get an global actions runner registration token + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) + +try: + # Get an global actions runner registration token + api_instance.admin_get_runner_registration_token() +except ApiException as e: + print("Exception when calling AdminApi->admin_get_runner_registration_token: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_list_hooks** +> list[Hook] admin_list_hooks(page=page, limit=limit) + +List system's webhooks + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List system's webhooks + api_response = api_instance.admin_list_hooks(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_list_hooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Hook]**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_list_user_badges** +> list[Badge] admin_list_user_badges(username) + +List a user's badges + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user + +try: + # List a user's badges + api_response = api_instance.admin_list_user_badges(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_list_user_badges: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + +### Return type + +[**list[Badge]**](Badge.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_rename_user** +> admin_rename_user(username, body) + +Rename a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | existing username of user +body = gitea.RenameUserOption() # RenameUserOption | + +try: + # Rename a user + api_instance.admin_rename_user(username, body) +except ApiException as e: + print("Exception when calling AdminApi->admin_rename_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| existing username of user | + **body** | [**RenameUserOption**](RenameUserOption.md)| | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_search_emails** +> list[Email] admin_search_emails(q=q, page=page, limit=limit) + +Search all emails + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +q = 'q_example' # str | keyword (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Search all emails + api_response = api_instance.admin_search_emails(q=q, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_search_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **q** | **str**| keyword | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_search_users** +> list[User] admin_search_users(source_id=source_id, login_name=login_name, page=page, limit=limit) + +Search users according filter conditions + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +source_id = 789 # int | ID of the user's login source to search for (optional) +login_name = 'login_name_example' # str | user's login name to search for (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Search users according filter conditions + api_response = api_instance.admin_search_users(source_id=source_id, login_name=login_name, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_search_users: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **source_id** | **int**| ID of the user's login source to search for | [optional] + **login_name** | **str**| user's login name to search for | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_unadopted_list** +> list[str] admin_unadopted_list(page=page, limit=limit, pattern=pattern) + +List unadopted repositories + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.AdminApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) +pattern = 'pattern_example' # str | pattern of repositories to search for (optional) + +try: + # List unadopted repositories + api_response = api_instance.admin_unadopted_list(page=page, limit=limit, pattern=pattern) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_unadopted_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + **pattern** | **str**| pattern of repositories to search for | [optional] + +### Return type + +**list[str]** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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/AnnotatedTag.md b/docs/AnnotatedTag.md new file mode 100644 index 0000000..e57846d --- /dev/null +++ b/docs/AnnotatedTag.md @@ -0,0 +1,16 @@ +# AnnotatedTag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**object** | [**AnnotatedTagObject**](AnnotatedTagObject.md) | | [optional] +**sha** | **str** | | [optional] +**tag** | **str** | | [optional] +**tagger** | [**CommitUser**](CommitUser.md) | | [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/AnnotatedTagObject.md b/docs/AnnotatedTagObject.md new file mode 100644 index 0000000..34ae757 --- /dev/null +++ b/docs/AnnotatedTagObject.md @@ -0,0 +1,12 @@ +# AnnotatedTagObject + +## 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/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/Badge.md b/docs/Badge.md new file mode 100644 index 0000000..52dded8 --- /dev/null +++ b/docs/Badge.md @@ -0,0 +1,13 @@ +# Badge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**image_url** | **str** | | [optional] +**slug** | **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..f1597b2 --- /dev/null +++ b/docs/Branch.md @@ -0,0 +1,18 @@ +# Branch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**PayloadCommit**](PayloadCommit.md) | | [optional] +**effective_branch_protection_name** | **str** | | [optional] +**enable_status_check** | **bool** | | [optional] +**name** | **str** | | [optional] +**protected** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] +**user_can_merge** | **bool** | | [optional] +**user_can_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/BranchProtection.md b/docs/BranchProtection.md new file mode 100644 index 0000000..ec4c435 --- /dev/null +++ b/docs/BranchProtection.md @@ -0,0 +1,42 @@ +# BranchProtection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approvals_whitelist_teams** | **list[str]** | | [optional] +**approvals_whitelist_username** | **list[str]** | | [optional] +**block_admin_merge_override** | **bool** | | [optional] +**block_on_official_review_requests** | **bool** | | [optional] +**block_on_outdated_branch** | **bool** | | [optional] +**block_on_rejected_reviews** | **bool** | | [optional] +**branch_name** | **str** | Deprecated: true | [optional] +**created_at** | **datetime** | | [optional] +**dismiss_stale_approvals** | **bool** | | [optional] +**enable_approvals_whitelist** | **bool** | | [optional] +**enable_force_push** | **bool** | | [optional] +**enable_force_push_allowlist** | **bool** | | [optional] +**enable_merge_whitelist** | **bool** | | [optional] +**enable_push** | **bool** | | [optional] +**enable_push_whitelist** | **bool** | | [optional] +**enable_status_check** | **bool** | | [optional] +**force_push_allowlist_deploy_keys** | **bool** | | [optional] +**force_push_allowlist_teams** | **list[str]** | | [optional] +**force_push_allowlist_usernames** | **list[str]** | | [optional] +**ignore_stale_approvals** | **bool** | | [optional] +**merge_whitelist_teams** | **list[str]** | | [optional] +**merge_whitelist_usernames** | **list[str]** | | [optional] +**priority** | **int** | | [optional] +**protected_file_patterns** | **str** | | [optional] +**push_whitelist_deploy_keys** | **bool** | | [optional] +**push_whitelist_teams** | **list[str]** | | [optional] +**push_whitelist_usernames** | **list[str]** | | [optional] +**require_signed_commits** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**rule_name** | **str** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] +**unprotected_file_patterns** | **str** | | [optional] +**updated_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/ChangeFileOperation.md b/docs/ChangeFileOperation.md new file mode 100644 index 0000000..23fe511 --- /dev/null +++ b/docs/ChangeFileOperation.md @@ -0,0 +1,14 @@ +# ChangeFileOperation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | new or updated file content, must be base64 encoded | [optional] +**from_path** | **str** | old path of the file to move | [optional] +**operation** | **str** | indicates what to do with the file | +**path** | **str** | path to the existing or new file | +**sha** | **str** | sha is the SHA for the file that already exists, required for update or 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/ChangeFilesOptions.md b/docs/ChangeFilesOptions.md new file mode 100644 index 0000000..3d8b25d --- /dev/null +++ b/docs/ChangeFilesOptions.md @@ -0,0 +1,17 @@ +# ChangeFilesOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**files** | [**list[ChangeFileOperation]**](ChangeFileOperation.md) | list of file operations | +**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**signoff** | **bool** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [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/ChangedFile.md b/docs/ChangedFile.md new file mode 100644 index 0000000..3b178ba --- /dev/null +++ b/docs/ChangedFile.md @@ -0,0 +1,18 @@ +# ChangedFile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | **int** | | [optional] +**changes** | **int** | | [optional] +**contents_url** | **str** | | [optional] +**deletions** | **int** | | [optional] +**filename** | **str** | | [optional] +**html_url** | **str** | | [optional] +**previous_filename** | **str** | | [optional] +**raw_url** | **str** | | [optional] +**status** | **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/CombinedStatus.md b/docs/CombinedStatus.md new file mode 100644 index 0000000..6b92e1c --- /dev/null +++ b/docs/CombinedStatus.md @@ -0,0 +1,16 @@ +# CombinedStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit_url** | **str** | | [optional] +**repository** | [**Repository**](Repository.md) | | [optional] +**sha** | **str** | | [optional] +**state** | [**CommitStatusState**](CommitStatusState.md) | | [optional] +**statuses** | [**list[CommitStatus]**](CommitStatus.md) | | [optional] +**total_count** | **int** | | [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/Comment.md b/docs/Comment.md new file mode 100644 index 0000000..9853d24 --- /dev/null +++ b/docs/Comment.md @@ -0,0 +1,20 @@ +# Comment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**list[Attachment]**](Attachment.md) | | [optional] +**body** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**issue_url** | **str** | | [optional] +**original_author** | **str** | | [optional] +**original_author_id** | **int** | | [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/Commit.md b/docs/Commit.md new file mode 100644 index 0000000..5e0069e --- /dev/null +++ b/docs/Commit.md @@ -0,0 +1,19 @@ +# Commit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**User**](User.md) | | [optional] +**commit** | [**RepoCommit**](RepoCommit.md) | | [optional] +**committer** | [**User**](User.md) | | [optional] +**created** | **datetime** | | [optional] +**files** | [**list[CommitAffectedFiles]**](CommitAffectedFiles.md) | | [optional] +**html_url** | **str** | | [optional] +**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [optional] +**sha** | **str** | | [optional] +**stats** | [**CommitStats**](CommitStats.md) | | [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/CommitAffectedFiles.md b/docs/CommitAffectedFiles.md new file mode 100644 index 0000000..02269f7 --- /dev/null +++ b/docs/CommitAffectedFiles.md @@ -0,0 +1,11 @@ +# CommitAffectedFiles + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **str** | | [optional] +**status** | **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/CommitDateOptions.md b/docs/CommitDateOptions.md new file mode 100644 index 0000000..23530c2 --- /dev/null +++ b/docs/CommitDateOptions.md @@ -0,0 +1,11 @@ +# CommitDateOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | **datetime** | | [optional] +**committer** | **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/CommitMeta.md b/docs/CommitMeta.md new file mode 100644 index 0000000..8277532 --- /dev/null +++ b/docs/CommitMeta.md @@ -0,0 +1,12 @@ +# CommitMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**sha** | **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/CommitStats.md b/docs/CommitStats.md new file mode 100644 index 0000000..437d519 --- /dev/null +++ b/docs/CommitStats.md @@ -0,0 +1,12 @@ +# CommitStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | **int** | | [optional] +**deletions** | **int** | | [optional] +**total** | **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/CommitStatus.md b/docs/CommitStatus.md new file mode 100644 index 0000000..8fcdf51 --- /dev/null +++ b/docs/CommitStatus.md @@ -0,0 +1,18 @@ +# CommitStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**creator** | [**User**](User.md) | | [optional] +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**status** | [**CommitStatusState**](CommitStatusState.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/CommitStatusState.md b/docs/CommitStatusState.md new file mode 100644 index 0000000..c4b1ab5 --- /dev/null +++ b/docs/CommitStatusState.md @@ -0,0 +1,9 @@ +# CommitStatusState + +## 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/CommitUser.md b/docs/CommitUser.md new file mode 100644 index 0000000..a5325f9 --- /dev/null +++ b/docs/CommitUser.md @@ -0,0 +1,12 @@ +# CommitUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_date** | **str** | | [optional] +**email** | **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/Compare.md b/docs/Compare.md new file mode 100644 index 0000000..6d654ff --- /dev/null +++ b/docs/Compare.md @@ -0,0 +1,11 @@ +# Compare + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commits** | [**list[Commit]**](Commit.md) | | [optional] +**total_commits** | **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/ContentsResponse.md b/docs/ContentsResponse.md new file mode 100644 index 0000000..f713af2 --- /dev/null +++ b/docs/ContentsResponse.md @@ -0,0 +1,24 @@ +# ContentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**FileLinksResponse**](FileLinksResponse.md) | | [optional] +**content** | **str** | `content` is populated when `type` is `file`, otherwise null | [optional] +**download_url** | **str** | | [optional] +**encoding** | **str** | `encoding` is populated when `type` is `file`, otherwise null | [optional] +**git_url** | **str** | | [optional] +**html_url** | **str** | | [optional] +**last_commit_sha** | **str** | | [optional] +**name** | **str** | | [optional] +**path** | **str** | | [optional] +**sha** | **str** | | [optional] +**size** | **int** | | [optional] +**submodule_git_url** | **str** | `submodule_git_url` is populated when `type` is `submodule`, otherwise null | [optional] +**target** | **str** | `target` is populated when `type` is `symlink`, otherwise null | [optional] +**type** | **str** | `type` will be `file`, `dir`, `symlink`, or `submodule` | [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/CreateAccessTokenOption.md b/docs/CreateAccessTokenOption.md new file mode 100644 index 0000000..dd36c6e --- /dev/null +++ b/docs/CreateAccessTokenOption.md @@ -0,0 +1,11 @@ +# CreateAccessTokenOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**scopes** | **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/CreateBranchProtectionOption.md b/docs/CreateBranchProtectionOption.md new file mode 100644 index 0000000..7d0370f --- /dev/null +++ b/docs/CreateBranchProtectionOption.md @@ -0,0 +1,40 @@ +# CreateBranchProtectionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approvals_whitelist_teams** | **list[str]** | | [optional] +**approvals_whitelist_username** | **list[str]** | | [optional] +**block_admin_merge_override** | **bool** | | [optional] +**block_on_official_review_requests** | **bool** | | [optional] +**block_on_outdated_branch** | **bool** | | [optional] +**block_on_rejected_reviews** | **bool** | | [optional] +**branch_name** | **str** | Deprecated: true | [optional] +**dismiss_stale_approvals** | **bool** | | [optional] +**enable_approvals_whitelist** | **bool** | | [optional] +**enable_force_push** | **bool** | | [optional] +**enable_force_push_allowlist** | **bool** | | [optional] +**enable_merge_whitelist** | **bool** | | [optional] +**enable_push** | **bool** | | [optional] +**enable_push_whitelist** | **bool** | | [optional] +**enable_status_check** | **bool** | | [optional] +**force_push_allowlist_deploy_keys** | **bool** | | [optional] +**force_push_allowlist_teams** | **list[str]** | | [optional] +**force_push_allowlist_usernames** | **list[str]** | | [optional] +**ignore_stale_approvals** | **bool** | | [optional] +**merge_whitelist_teams** | **list[str]** | | [optional] +**merge_whitelist_usernames** | **list[str]** | | [optional] +**priority** | **int** | | [optional] +**protected_file_patterns** | **str** | | [optional] +**push_whitelist_deploy_keys** | **bool** | | [optional] +**push_whitelist_teams** | **list[str]** | | [optional] +**push_whitelist_usernames** | **list[str]** | | [optional] +**require_signed_commits** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**rule_name** | **str** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] +**unprotected_file_patterns** | **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/CreateBranchRepoOption.md b/docs/CreateBranchRepoOption.md new file mode 100644 index 0000000..e5bc81f --- /dev/null +++ b/docs/CreateBranchRepoOption.md @@ -0,0 +1,12 @@ +# CreateBranchRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_branch_name** | **str** | Name of the branch to create | +**old_branch_name** | **str** | Deprecated: true Name of the old branch to create from | [optional] +**old_ref_name** | **str** | Name of the old branch/tag/commit to create from | [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/CreateFileOptions.md b/docs/CreateFileOptions.md new file mode 100644 index 0000000..f56ff95 --- /dev/null +++ b/docs/CreateFileOptions.md @@ -0,0 +1,17 @@ +# CreateFileOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**content** | **str** | content must be base64 encoded | +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**signoff** | **bool** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [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..75efca8 --- /dev/null +++ b/docs/CreateForkOption.md @@ -0,0 +1,11 @@ +# CreateForkOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | name of the forked repository | [optional] +**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..35d189a --- /dev/null +++ b/docs/CreateGPGKeyOption.md @@ -0,0 +1,11 @@ +# CreateGPGKeyOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**armored_public_key** | **str** | An armored GPG key to add | +**armored_signature** | **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/CreateHookOption.md b/docs/CreateHookOption.md new file mode 100644 index 0000000..2c6b7bf --- /dev/null +++ b/docs/CreateHookOption.md @@ -0,0 +1,15 @@ +# CreateHookOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] [default to False] +**authorization_header** | **str** | | [optional] +**branch_filter** | **str** | | [optional] +**config** | [**CreateHookOptionConfig**](CreateHookOptionConfig.md) | | +**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/CreateHookOptionConfig.md b/docs/CreateHookOptionConfig.md new file mode 100644 index 0000000..8b73bf5 --- /dev/null +++ b/docs/CreateHookOptionConfig.md @@ -0,0 +1,9 @@ +# CreateHookOptionConfig + +## 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/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..5f96d0d --- /dev/null +++ b/docs/CreateIssueOption.md @@ -0,0 +1,18 @@ +# CreateIssueOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | **str** | deprecated | [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] +**ref** | **str** | | [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..9368651 --- /dev/null +++ b/docs/CreateLabelOption.md @@ -0,0 +1,14 @@ +# CreateLabelOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | +**description** | **str** | | [optional] +**exclusive** | **bool** | | [optional] +**is_archived** | **bool** | | [optional] +**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..0b0e172 --- /dev/null +++ b/docs/CreateMilestoneOption.md @@ -0,0 +1,13 @@ +# CreateMilestoneOption + +## 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/CreateOAuth2ApplicationOptions.md b/docs/CreateOAuth2ApplicationOptions.md new file mode 100644 index 0000000..3fe6ba7 --- /dev/null +++ b/docs/CreateOAuth2ApplicationOptions.md @@ -0,0 +1,13 @@ +# CreateOAuth2ApplicationOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**confidential_client** | **bool** | | [optional] +**name** | **str** | | [optional] +**redirect_uris** | **list[str]** | | [optional] +**skip_secondary_authorization** | **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/CreateOrUpdateSecretOption.md b/docs/CreateOrUpdateSecretOption.md new file mode 100644 index 0000000..f0c29fe --- /dev/null +++ b/docs/CreateOrUpdateSecretOption.md @@ -0,0 +1,10 @@ +# CreateOrUpdateSecretOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | Data of the secret to update | + +[[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..3975369 --- /dev/null +++ b/docs/CreateOrgOption.md @@ -0,0 +1,17 @@ +# CreateOrgOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**email** | **str** | | [optional] +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**repo_admin_change_team_access** | **bool** | | [optional] +**username** | **str** | | +**visibility** | **str** | possible values are `public` (default), `limited` or `private` | [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/CreatePullRequestOption.md b/docs/CreatePullRequestOption.md new file mode 100644 index 0000000..a735c89 --- /dev/null +++ b/docs/CreatePullRequestOption.md @@ -0,0 +1,20 @@ +# 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] +**reviewers** | **list[str]** | | [optional] +**team_reviewers** | **list[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/CreatePullReviewComment.md b/docs/CreatePullReviewComment.md new file mode 100644 index 0000000..f41ff61 --- /dev/null +++ b/docs/CreatePullReviewComment.md @@ -0,0 +1,13 @@ +# CreatePullReviewComment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**new_position** | **int** | if comment to new file line or 0 | [optional] +**old_position** | **int** | if comment to old file line or 0 | [optional] +**path** | **str** | the tree path | [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/CreatePullReviewOptions.md b/docs/CreatePullReviewOptions.md new file mode 100644 index 0000000..7a7e06a --- /dev/null +++ b/docs/CreatePullReviewOptions.md @@ -0,0 +1,13 @@ +# CreatePullReviewOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**comments** | [**list[CreatePullReviewComment]**](CreatePullReviewComment.md) | | [optional] +**commit_id** | **str** | | [optional] +**event** | [**ReviewStateType**](ReviewStateType.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/CreatePushMirrorOption.md b/docs/CreatePushMirrorOption.md new file mode 100644 index 0000000..5525722 --- /dev/null +++ b/docs/CreatePushMirrorOption.md @@ -0,0 +1,14 @@ +# CreatePushMirrorOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | **str** | | [optional] +**remote_address** | **str** | | [optional] +**remote_password** | **str** | | [optional] +**remote_username** | **str** | | [optional] +**sync_on_commit** | **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/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..5c0f41e --- /dev/null +++ b/docs/CreateRepoOption.md @@ -0,0 +1,21 @@ +# CreateRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_init** | **bool** | Whether the repository should be auto-initialized? | [optional] +**default_branch** | **str** | DefaultBranch of the repository (used when initializes and in template) | [optional] +**description** | **str** | Description of the repository to create | [optional] +**gitignores** | **str** | Gitignores to use | [optional] +**issue_labels** | **str** | Label-Set to use | [optional] +**license** | **str** | License to use | [optional] +**name** | **str** | Name of the repository to create | +**object_format_name** | **str** | ObjectFormatName of the underlying git repository | [optional] +**private** | **bool** | Whether the repository is private | [optional] +**readme** | **str** | Readme of the repository to create | [optional] +**template** | **bool** | Whether the repository is template | [optional] +**trust_model** | **str** | TrustModel of the repository | [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..278947f --- /dev/null +++ b/docs/CreateStatusOption.md @@ -0,0 +1,13 @@ +# CreateStatusOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **str** | | [optional] +**description** | **str** | | [optional] +**state** | [**CommitStatusState**](CommitStatusState.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/CreateTagOption.md b/docs/CreateTagOption.md new file mode 100644 index 0000000..0ccca92 --- /dev/null +++ b/docs/CreateTagOption.md @@ -0,0 +1,12 @@ +# CreateTagOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**tag_name** | **str** | | +**target** | **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/CreateTagProtectionOption.md b/docs/CreateTagProtectionOption.md new file mode 100644 index 0000000..10d9652 --- /dev/null +++ b/docs/CreateTagProtectionOption.md @@ -0,0 +1,12 @@ +# CreateTagProtectionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name_pattern** | **str** | | [optional] +**whitelist_teams** | **list[str]** | | [optional] +**whitelist_usernames** | **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/CreateTeamOption.md b/docs/CreateTeamOption.md new file mode 100644 index 0000000..dbd51d8 --- /dev/null +++ b/docs/CreateTeamOption.md @@ -0,0 +1,16 @@ +# CreateTeamOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_org_repo** | **bool** | | [optional] +**description** | **str** | | [optional] +**includes_all_repositories** | **bool** | | [optional] +**name** | **str** | | +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] +**units_map** | **dict(str, 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..4ceb3c9 --- /dev/null +++ b/docs/CreateUserOption.md @@ -0,0 +1,20 @@ +# CreateUserOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". | [optional] +**email** | **str** | | +**full_name** | **str** | | [optional] +**login_name** | **str** | | [optional] +**must_change_password** | **bool** | | [optional] +**password** | **str** | | [optional] +**restricted** | **bool** | | [optional] +**send_notify** | **bool** | | [optional] +**source_id** | **int** | | [optional] +**username** | **str** | | +**visibility** | **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/CreateVariableOption.md b/docs/CreateVariableOption.md new file mode 100644 index 0000000..4592e8d --- /dev/null +++ b/docs/CreateVariableOption.md @@ -0,0 +1,10 @@ +# CreateVariableOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Value of the variable to create | + +[[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/CreateWikiPageOptions.md b/docs/CreateWikiPageOptions.md new file mode 100644 index 0000000..f31b286 --- /dev/null +++ b/docs/CreateWikiPageOptions.md @@ -0,0 +1,12 @@ +# CreateWikiPageOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_base64** | **str** | content must be base64 encoded | [optional] +**message** | **str** | optional commit message summarizing the change | [optional] +**title** | **str** | page title. leave empty to keep unchanged | [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/Cron.md b/docs/Cron.md new file mode 100644 index 0000000..4c3ecc3 --- /dev/null +++ b/docs/Cron.md @@ -0,0 +1,14 @@ +# Cron + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exec_times** | **int** | | [optional] +**name** | **str** | | [optional] +**next** | **datetime** | | [optional] +**prev** | **datetime** | | [optional] +**schedule** | **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/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/DeleteFileOptions.md b/docs/DeleteFileOptions.md new file mode 100644 index 0000000..5252bbd --- /dev/null +++ b/docs/DeleteFileOptions.md @@ -0,0 +1,17 @@ +# DeleteFileOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**sha** | **str** | sha is the SHA for the file that already exists | +**signoff** | **bool** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [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/DismissPullReviewOptions.md b/docs/DismissPullReviewOptions.md new file mode 100644 index 0000000..f118aa0 --- /dev/null +++ b/docs/DismissPullReviewOptions.md @@ -0,0 +1,11 @@ +# DismissPullReviewOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**priors** | **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/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/EditBranchProtectionOption.md b/docs/EditBranchProtectionOption.md new file mode 100644 index 0000000..b6ad116 --- /dev/null +++ b/docs/EditBranchProtectionOption.md @@ -0,0 +1,38 @@ +# EditBranchProtectionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approvals_whitelist_teams** | **list[str]** | | [optional] +**approvals_whitelist_username** | **list[str]** | | [optional] +**block_admin_merge_override** | **bool** | | [optional] +**block_on_official_review_requests** | **bool** | | [optional] +**block_on_outdated_branch** | **bool** | | [optional] +**block_on_rejected_reviews** | **bool** | | [optional] +**dismiss_stale_approvals** | **bool** | | [optional] +**enable_approvals_whitelist** | **bool** | | [optional] +**enable_force_push** | **bool** | | [optional] +**enable_force_push_allowlist** | **bool** | | [optional] +**enable_merge_whitelist** | **bool** | | [optional] +**enable_push** | **bool** | | [optional] +**enable_push_whitelist** | **bool** | | [optional] +**enable_status_check** | **bool** | | [optional] +**force_push_allowlist_deploy_keys** | **bool** | | [optional] +**force_push_allowlist_teams** | **list[str]** | | [optional] +**force_push_allowlist_usernames** | **list[str]** | | [optional] +**ignore_stale_approvals** | **bool** | | [optional] +**merge_whitelist_teams** | **list[str]** | | [optional] +**merge_whitelist_usernames** | **list[str]** | | [optional] +**priority** | **int** | | [optional] +**protected_file_patterns** | **str** | | [optional] +**push_whitelist_deploy_keys** | **bool** | | [optional] +**push_whitelist_teams** | **list[str]** | | [optional] +**push_whitelist_usernames** | **list[str]** | | [optional] +**require_signed_commits** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] +**unprotected_file_patterns** | **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/EditGitHookOption.md b/docs/EditGitHookOption.md new file mode 100644 index 0000000..80a4a66 --- /dev/null +++ b/docs/EditGitHookOption.md @@ -0,0 +1,10 @@ +# EditGitHookOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **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/EditHookOption.md b/docs/EditHookOption.md new file mode 100644 index 0000000..a564772 --- /dev/null +++ b/docs/EditHookOption.md @@ -0,0 +1,14 @@ +# EditHookOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] +**authorization_header** | **str** | | [optional] +**branch_filter** | **str** | | [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..1069c32 --- /dev/null +++ b/docs/EditIssueOption.md @@ -0,0 +1,18 @@ +# EditIssueOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | **str** | deprecated | [optional] +**assignees** | **list[str]** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**milestone** | **int** | | [optional] +**ref** | **str** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] +**unset_due_date** | **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/EditLabelOption.md b/docs/EditLabelOption.md new file mode 100644 index 0000000..5e722d8 --- /dev/null +++ b/docs/EditLabelOption.md @@ -0,0 +1,14 @@ +# EditLabelOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | [optional] +**description** | **str** | | [optional] +**exclusive** | **bool** | | [optional] +**is_archived** | **bool** | | [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..fabced0 --- /dev/null +++ b/docs/EditOrgOption.md @@ -0,0 +1,16 @@ +# EditOrgOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**email** | **str** | | [optional] +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**repo_admin_change_team_access** | **bool** | | [optional] +**visibility** | **str** | possible values are `public`, `limited` or `private` | [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..68b2f50 --- /dev/null +++ b/docs/EditPullRequestOption.md @@ -0,0 +1,20 @@ +# EditPullRequestOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_maintainer_edit** | **bool** | | [optional] +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**base** | **str** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**labels** | **list[int]** | | [optional] +**milestone** | **int** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] +**unset_due_date** | **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/EditReactionOption.md b/docs/EditReactionOption.md new file mode 100644 index 0000000..54de168 --- /dev/null +++ b/docs/EditReactionOption.md @@ -0,0 +1,10 @@ +# EditReactionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **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/EditRepoOption.md b/docs/EditRepoOption.md new file mode 100644 index 0000000..53c7112 --- /dev/null +++ b/docs/EditRepoOption.md @@ -0,0 +1,41 @@ +# EditRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_fast_forward_only_merge** | **bool** | either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. | [optional] +**allow_manual_merge** | **bool** | either `true` to allow mark pr as merged manually, or `false` to prevent it. | [optional] +**allow_merge_commits** | **bool** | either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. | [optional] +**allow_rebase** | **bool** | either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. | [optional] +**allow_rebase_explicit** | **bool** | either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. | [optional] +**allow_rebase_update** | **bool** | either `true` to allow updating pull request branch by rebase, or `false` to prevent it. | [optional] +**allow_squash_merge** | **bool** | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. | [optional] +**archived** | **bool** | set to `true` to archive this repository. | [optional] +**autodetect_manual_merge** | **bool** | either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. | [optional] +**default_allow_maintainer_edit** | **bool** | set to `true` to allow edits from maintainers by default | [optional] +**default_branch** | **str** | sets the default branch for this repository. | [optional] +**default_delete_branch_after_merge** | **bool** | set to `true` to delete pr branch after merge by default | [optional] +**default_merge_style** | **str** | set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\". | [optional] +**description** | **str** | a short description of the repository. | [optional] +**enable_prune** | **bool** | enable prune - remove obsolete remote-tracking references when mirroring | [optional] +**external_tracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] +**external_wiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] +**has_actions** | **bool** | either `true` to enable actions unit, or `false` to disable them. | [optional] +**has_issues** | **bool** | either `true` to enable issues for this repository or `false` to disable them. | [optional] +**has_packages** | **bool** | either `true` to enable packages unit, or `false` to disable them. | [optional] +**has_projects** | **bool** | either `true` to enable project unit, or `false` to disable them. | [optional] +**has_pull_requests** | **bool** | either `true` to allow pull requests, or `false` to prevent pull request. | [optional] +**has_releases** | **bool** | either `true` to enable releases unit, or `false` to disable them. | [optional] +**has_wiki** | **bool** | either `true` to enable the wiki for this repository or `false` to disable it. | [optional] +**ignore_whitespace_conflicts** | **bool** | either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. | [optional] +**internal_tracker** | [**InternalTracker**](InternalTracker.md) | | [optional] +**mirror_interval** | **str** | set to a string like `8h30m0s` to set the mirror interval time | [optional] +**name** | **str** | name of the repository | [optional] +**private** | **bool** | either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. | [optional] +**projects_mode** | **str** | `repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both. | [optional] +**template** | **bool** | either `true` to make this repository a template or `false` to make it a normal repository | [optional] +**website** | **str** | a URL with more information about the repository. | [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/EditTagProtectionOption.md b/docs/EditTagProtectionOption.md new file mode 100644 index 0000000..5ef758a --- /dev/null +++ b/docs/EditTagProtectionOption.md @@ -0,0 +1,12 @@ +# EditTagProtectionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name_pattern** | **str** | | [optional] +**whitelist_teams** | **list[str]** | | [optional] +**whitelist_usernames** | **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/EditTeamOption.md b/docs/EditTeamOption.md new file mode 100644 index 0000000..0dc0f44 --- /dev/null +++ b/docs/EditTeamOption.md @@ -0,0 +1,16 @@ +# EditTeamOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_org_repo** | **bool** | | [optional] +**description** | **str** | | [optional] +**includes_all_repositories** | **bool** | | [optional] +**name** | **str** | | +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] +**units_map** | **dict(str, 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..f86bb47 --- /dev/null +++ b/docs/EditUserOption.md @@ -0,0 +1,27 @@ +# 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] +**description** | **str** | | [optional] +**email** | **str** | | [optional] +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**login_name** | **str** | | +**max_repo_creation** | **int** | | [optional] +**must_change_password** | **bool** | | [optional] +**password** | **str** | | [optional] +**prohibit_login** | **bool** | | [optional] +**restricted** | **bool** | | [optional] +**source_id** | **int** | | +**visibility** | **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/Email.md b/docs/Email.md new file mode 100644 index 0000000..e6bc118 --- /dev/null +++ b/docs/Email.md @@ -0,0 +1,14 @@ +# Email + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**primary** | **bool** | | [optional] +**user_id** | **int** | | [optional] +**username** | **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/ExternalTracker.md b/docs/ExternalTracker.md new file mode 100644 index 0000000..7846d81 --- /dev/null +++ b/docs/ExternalTracker.md @@ -0,0 +1,13 @@ +# ExternalTracker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_tracker_format** | **str** | External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. | [optional] +**external_tracker_regexp_pattern** | **str** | External Issue Tracker issue regular expression | [optional] +**external_tracker_style** | **str** | External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` | [optional] +**external_tracker_url** | **str** | URL of external issue tracker. | [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/ExternalWiki.md b/docs/ExternalWiki.md new file mode 100644 index 0000000..461befb --- /dev/null +++ b/docs/ExternalWiki.md @@ -0,0 +1,10 @@ +# ExternalWiki + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_wiki_url** | **str** | URL of external wiki. | [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/FileCommitResponse.md b/docs/FileCommitResponse.md new file mode 100644 index 0000000..21c2a65 --- /dev/null +++ b/docs/FileCommitResponse.md @@ -0,0 +1,18 @@ +# FileCommitResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**CommitUser**](CommitUser.md) | | [optional] +**committer** | [**CommitUser**](CommitUser.md) | | [optional] +**created** | **datetime** | | [optional] +**html_url** | **str** | | [optional] +**message** | **str** | | [optional] +**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [optional] +**sha** | **str** | | [optional] +**tree** | [**CommitMeta**](CommitMeta.md) | | [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/FileDeleteResponse.md b/docs/FileDeleteResponse.md new file mode 100644 index 0000000..78cc5c2 --- /dev/null +++ b/docs/FileDeleteResponse.md @@ -0,0 +1,12 @@ +# FileDeleteResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**content** | **object** | | [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/FileLinksResponse.md b/docs/FileLinksResponse.md new file mode 100644 index 0000000..ab11063 --- /dev/null +++ b/docs/FileLinksResponse.md @@ -0,0 +1,12 @@ +# FileLinksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**git** | **str** | | [optional] +**html** | **str** | | [optional] +**_self** | **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/FileResponse.md b/docs/FileResponse.md new file mode 100644 index 0000000..2126c2a --- /dev/null +++ b/docs/FileResponse.md @@ -0,0 +1,12 @@ +# FileResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**content** | [**ContentsResponse**](ContentsResponse.md) | | [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/FilesResponse.md b/docs/FilesResponse.md new file mode 100644 index 0000000..c2d1dad --- /dev/null +++ b/docs/FilesResponse.md @@ -0,0 +1,12 @@ +# FilesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**files** | [**list[ContentsResponse]**](ContentsResponse.md) | | [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/GPGKey.md b/docs/GPGKey.md new file mode 100644 index 0000000..ceb7987 --- /dev/null +++ b/docs/GPGKey.md @@ -0,0 +1,22 @@ +# 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] +**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/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/GeneralAPISettings.md b/docs/GeneralAPISettings.md new file mode 100644 index 0000000..335de3c --- /dev/null +++ b/docs/GeneralAPISettings.md @@ -0,0 +1,13 @@ +# GeneralAPISettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_git_trees_per_page** | **int** | | [optional] +**default_max_blob_size** | **int** | | [optional] +**default_paging_num** | **int** | | [optional] +**max_response_items** | **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/GeneralAttachmentSettings.md b/docs/GeneralAttachmentSettings.md new file mode 100644 index 0000000..3b370ca --- /dev/null +++ b/docs/GeneralAttachmentSettings.md @@ -0,0 +1,13 @@ +# GeneralAttachmentSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_types** | **str** | | [optional] +**enabled** | **bool** | | [optional] +**max_files** | **int** | | [optional] +**max_size** | **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/GeneralRepoSettings.md b/docs/GeneralRepoSettings.md new file mode 100644 index 0000000..51c702b --- /dev/null +++ b/docs/GeneralRepoSettings.md @@ -0,0 +1,15 @@ +# GeneralRepoSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**http_git_disabled** | **bool** | | [optional] +**lfs_disabled** | **bool** | | [optional] +**migrations_disabled** | **bool** | | [optional] +**mirrors_disabled** | **bool** | | [optional] +**stars_disabled** | **bool** | | [optional] +**time_tracking_disabled** | **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/GeneralUISettings.md b/docs/GeneralUISettings.md new file mode 100644 index 0000000..d95482f --- /dev/null +++ b/docs/GeneralUISettings.md @@ -0,0 +1,12 @@ +# GeneralUISettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_reactions** | **list[str]** | | [optional] +**custom_emojis** | **list[str]** | | [optional] +**default_theme** | **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/GenerateRepoOption.md b/docs/GenerateRepoOption.md new file mode 100644 index 0000000..49a0932 --- /dev/null +++ b/docs/GenerateRepoOption.md @@ -0,0 +1,21 @@ +# GenerateRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar** | **bool** | include avatar of the template repo | [optional] +**default_branch** | **str** | Default branch of the new repository | [optional] +**description** | **str** | Description of the repository to create | [optional] +**git_content** | **bool** | include git content of default branch in template repo | [optional] +**git_hooks** | **bool** | include git hooks in template repo | [optional] +**labels** | **bool** | include labels in template repo | [optional] +**name** | **str** | Name of the repository to create | +**owner** | **str** | The organization or person who will own the new repository | +**private** | **bool** | Whether the repository is private | [optional] +**protected_branch** | **bool** | include protected branches in template repo | [optional] +**topics** | **bool** | include topics in template repo | [optional] +**webhooks** | **bool** | include webhooks in template repo | [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/GitBlobResponse.md b/docs/GitBlobResponse.md new file mode 100644 index 0000000..656e59a --- /dev/null +++ b/docs/GitBlobResponse.md @@ -0,0 +1,14 @@ +# GitBlobResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**encoding** | **str** | | [optional] +**sha** | **str** | | [optional] +**size** | **int** | | [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/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/GitHook.md b/docs/GitHook.md new file mode 100644 index 0000000..89d3d9f --- /dev/null +++ b/docs/GitHook.md @@ -0,0 +1,12 @@ +# GitHook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**is_active** | **bool** | | [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/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..58b4e3a --- /dev/null +++ b/docs/GitTreeResponse.md @@ -0,0 +1,15 @@ +# GitTreeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | | [optional] +**sha** | **str** | | [optional] +**total_count** | **int** | | [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/GitignoreTemplateInfo.md b/docs/GitignoreTemplateInfo.md new file mode 100644 index 0000000..42d0f16 --- /dev/null +++ b/docs/GitignoreTemplateInfo.md @@ -0,0 +1,11 @@ +# GitignoreTemplateInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**source** | **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/Hook.md b/docs/Hook.md new file mode 100644 index 0000000..35d9e61 --- /dev/null +++ b/docs/Hook.md @@ -0,0 +1,18 @@ +# Hook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] +**authorization_header** | **str** | | [optional] +**branch_filter** | **str** | | [optional] +**config** | **dict(str, str)** | | [optional] +**created_at** | **datetime** | | [optional] +**events** | **list[str]** | | [optional] +**id** | **int** | | [optional] +**type** | **str** | | [optional] +**updated_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/Identity.md b/docs/Identity.md new file mode 100644 index 0000000..dbef0da --- /dev/null +++ b/docs/Identity.md @@ -0,0 +1,11 @@ +# Identity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **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/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..f026037 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,11 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Team]**](Team.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/InlineResponse2001.md b/docs/InlineResponse2001.md new file mode 100644 index 0000000..cac11ce --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,11 @@ +# InlineResponse2001 + +## 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/InternalTracker.md b/docs/InternalTracker.md new file mode 100644 index 0000000..098357f --- /dev/null +++ b/docs/InternalTracker.md @@ -0,0 +1,12 @@ +# InternalTracker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_only_contributors_to_track_time** | **bool** | Let only contributors track time (Built-in issue tracker) | [optional] +**enable_issue_dependencies** | **bool** | Enable dependencies for issues and pull requests (Built-in issue tracker) | [optional] +**enable_time_tracker** | **bool** | Enable time tracking (Built-in issue tracker) | [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..9ed76d5 --- /dev/null +++ b/docs/Issue.md @@ -0,0 +1,34 @@ +# Issue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**list[Attachment]**](Attachment.md) | | [optional] +**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] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**is_locked** | **bool** | | [optional] +**labels** | [**list[Label]**](Label.md) | | [optional] +**milestone** | [**Milestone**](Milestone.md) | | [optional] +**number** | **int** | | [optional] +**original_author** | **str** | | [optional] +**original_author_id** | **int** | | [optional] +**pin_order** | **int** | | [optional] +**pull_request** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional] +**ref** | **str** | | [optional] +**repository** | [**RepositoryMeta**](RepositoryMeta.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..4a409c9 --- /dev/null +++ b/docs/IssueApi.md @@ -0,0 +1,5925 @@ +# gitea.IssueApi + +All URIs are relative to *https://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_subscription**](IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue +[**issue_add_time**](IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue +[**issue_check_subscription**](IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an 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_issue_attachment**](IssueApi.md#issue_create_issue_attachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment +[**issue_create_issue_blocking**](IssueApi.md#issue_create_issue_blocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path +[**issue_create_issue_comment_attachment**](IssueApi.md#issue_create_issue_comment_attachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment +[**issue_create_issue_dependencies**](IssueApi.md#issue_create_issue_dependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. +[**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**](IssueApi.md#issue_delete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue +[**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_comment_reaction**](IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +[**issue_delete_issue_attachment**](IssueApi.md#issue_delete_issue_attachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment +[**issue_delete_issue_comment_attachment**](IssueApi.md#issue_delete_issue_comment_attachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment +[**issue_delete_issue_reaction**](IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue +[**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_delete_stop_watch**](IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. +[**issue_delete_subscription**](IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue +[**issue_delete_time**](IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time +[**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_attachment**](IssueApi.md#issue_edit_issue_attachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment +[**issue_edit_issue_comment_attachment**](IssueApi.md#issue_edit_issue_comment_attachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment +[**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_comment**](IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment +[**issue_get_comment_reactions**](IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue +[**issue_get_comments**](IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue +[**issue_get_comments_and_timeline**](IssueApi.md#issue_get_comments_and_timeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue +[**issue_get_issue**](IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +[**issue_get_issue_attachment**](IssueApi.md#issue_get_issue_attachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment +[**issue_get_issue_comment_attachment**](IssueApi.md#issue_get_issue_comment_attachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment +[**issue_get_issue_reactions**](IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of 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_blocks**](IssueApi.md#issue_list_blocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue +[**issue_list_issue_attachments**](IssueApi.md#issue_list_issue_attachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments +[**issue_list_issue_comment_attachments**](IssueApi.md#issue_list_issue_comment_attachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments +[**issue_list_issue_dependencies**](IssueApi.md#issue_list_issue_dependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. +[**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_post_comment_reaction**](IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue +[**issue_post_issue_reaction**](IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue +[**issue_remove_issue_blocking**](IssueApi.md#issue_remove_issue_blocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path +[**issue_remove_issue_dependencies**](IssueApi.md#issue_remove_issue_dependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency +[**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_reset_time**](IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue +[**issue_search_issues**](IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to +[**issue_start_stop_watch**](IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. +[**issue_stop_stop_watch**](IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. +[**issue_subscriptions**](IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. +[**issue_tracked_times**](IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times +[**move_issue_pin**](IssueApi.md#move_issue_pin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position +[**pin_issue**](IssueApi.md#pin_issue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue +[**unpin_issue**](IssueApi.md#unpin_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue + + +# **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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_subscription** +> issue_add_subscription(owner, repo, index, user) + +Subscribe user to issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +user = 'user_example' # str | user to subscribe + +try: + # Subscribe user to issue + api_instance.issue_add_subscription(owner, repo, index, user) +except ApiException as e: + print("Exception when calling IssueApi->issue_add_subscription: %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 | + **user** | **str**| user to subscribe | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, index, body=body) + +Add tracked time to a issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.AddTimeOption() # AddTimeOption | (optional) + +try: + # Add tracked time to a issue + api_response = api_instance.issue_add_time(owner, repo, index, 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 | + **index** | **int**| index of the issue | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_check_subscription** +> WatchInfo issue_check_subscription(owner, repo, index) + +Check if user is subscribed to an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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: + # Check if user is subscribed to an issue + api_response = api_instance.issue_check_subscription(owner, repo, index) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_check_subscription: %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 + +[**WatchInfo**](WatchInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_attachment** +> Attachment issue_create_issue_attachment(owner, repo, index, attachment, name=name) + +Create an issue attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment = '/path/to/file.txt' # file | attachment to upload +name = 'name_example' # str | name of the attachment (optional) + +try: + # Create an issue attachment + api_response = api_instance.issue_create_issue_attachment(owner, repo, index, attachment, name=name) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_issue_attachment: %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 | + **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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **issue_create_issue_blocking** +> Issue issue_create_issue_blocking(owner, repo, index, body=body) + +Block the issue given in the body by the issue in path + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 'index_example' # str | index of the issue +body = gitea.IssueMeta() # IssueMeta | (optional) + +try: + # Block the issue given in the body by the issue in path + api_response = api_instance.issue_create_issue_blocking(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_issue_blocking: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **str**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.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), [TOTPHeader](../README.md#TOTPHeader), [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_issue_comment_attachment** +> Attachment issue_create_issue_comment_attachment(owner, repo, id, attachment, name=name) + +Create a comment attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment = '/path/to/file.txt' # file | attachment to upload +name = 'name_example' # str | name of the attachment (optional) + +try: + # Create a comment attachment + api_response = api_instance.issue_create_issue_comment_attachment(owner, repo, id, attachment, name=name) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_issue_comment_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 comment | + **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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **issue_create_issue_dependencies** +> Issue issue_create_issue_dependencies(owner, repo, index, body=body) + +Make the issue in the url depend on the issue in the form. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 'index_example' # str | index of the issue +body = gitea.IssueMeta() # IssueMeta | (optional) + +try: + # Make the issue in the url depend on the issue in the form. + api_response = api_instance.issue_create_issue_dependencies(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_issue_dependencies: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **str**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.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), [TOTPHeader](../README.md#TOTPHeader), [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_label** +> Label issue_create_label(owner, repo, body=body) + +Create a label + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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** +> issue_delete(owner, repo, index) + +Delete an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of issue to delete + +try: + # Delete an issue + api_instance.issue_delete(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of issue 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), [TOTPHeader](../README.md#TOTPHeader), [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** +> issue_delete_comment(owner, repo, id) + +Delete a comment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_reaction** +> issue_delete_comment_reaction(owner, repo, id, content=content) + +Remove a reaction from a comment of an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +content = gitea.EditReactionOption() # EditReactionOption | (optional) + +try: + # Remove a reaction from a comment of an issue + api_instance.issue_delete_comment_reaction(owner, repo, id, content=content) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_comment_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.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), [TOTPHeader](../README.md#TOTPHeader), [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_issue_attachment** +> issue_delete_issue_attachment(owner, repo, index, attachment_id) + +Delete an issue attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment_id = 789 # int | id of the attachment to delete + +try: + # Delete an issue attachment + api_instance.issue_delete_issue_attachment(owner, repo, index, attachment_id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_issue_attachment: %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 | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_delete_issue_comment_attachment** +> issue_delete_issue_comment_attachment(owner, repo, id, attachment_id) + +Delete a comment attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment_id = 789 # int | id of the attachment to delete + +try: + # Delete a comment attachment + api_instance.issue_delete_issue_comment_attachment(owner, repo, id, attachment_id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_issue_comment_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 comment | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_delete_issue_reaction** +> issue_delete_issue_reaction(owner, repo, index, content=content) + +Remove a reaction from an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +content = gitea.EditReactionOption() # EditReactionOption | (optional) + +try: + # Remove a reaction from an issue + api_instance.issue_delete_issue_reaction(owner, repo, index, content=content) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_issue_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.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), [TOTPHeader](../README.md#TOTPHeader), [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_label** +> issue_delete_label(owner, repo, id) + +Delete a label + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 'id_example' # str | the milestone to delete, identified by ID and if not available by name + +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** | **str**| the milestone to delete, identified by ID and if not available by name | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_stop_watch** +> issue_delete_stop_watch(owner, repo, index) + +Delete an issue's existing stopwatch. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 stop the stopwatch on + +try: + # Delete an issue's existing stopwatch. + api_instance.issue_delete_stop_watch(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_stop_watch: %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 stop the stopwatch on | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_subscription** +> issue_delete_subscription(owner, repo, index, user) + +Unsubscribe user from issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +user = 'user_example' # str | user witch unsubscribe + +try: + # Unsubscribe user from issue + api_instance.issue_delete_subscription(owner, repo, index, user) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_subscription: %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 | + **user** | **str**| user witch unsubscribe | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_time** +> issue_delete_time(owner, repo, index, id) + +Delete specific tracked time + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 time to delete + +try: + # Delete specific tracked time + api_instance.issue_delete_time(owner, repo, index, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_time: %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 time 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), [TOTPHeader](../README.md#TOTPHeader), [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** +> Comment issue_edit_comment(owner, repo, id, body=body) + +Edit a comment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_attachment** +> Attachment issue_edit_issue_attachment(owner, repo, index, attachment_id, body=body) + +Edit an issue attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment_id = 789 # int | id of the attachment to edit +body = gitea.EditAttachmentOptions() # EditAttachmentOptions | (optional) + +try: + # Edit an issue attachment + api_response = api_instance.issue_edit_issue_attachment(owner, repo, index, attachment_id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_issue_attachment: %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 | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_comment_attachment** +> Attachment issue_edit_issue_comment_attachment(owner, repo, id, attachment_id, body=body) + +Edit a comment attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment_id = 789 # int | id of the attachment to edit +body = gitea.EditAttachmentOptions() # EditAttachmentOptions | (optional) + +try: + # Edit a comment attachment + api_response = api_instance.issue_edit_issue_comment_attachment(owner, repo, id, attachment_id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_issue_comment_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 comment | + **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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 'id_example' # str | the milestone to edit, identified by ID and if not available by name +body = gitea.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** | **str**| the milestone to edit, identified by ID and if not available by name | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_comment** +> Comment issue_get_comment(owner, repo, id) + +Get a comment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 + +try: + # Get a comment + api_response = api_instance.issue_get_comment(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_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 | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_comment_reactions** +> list[Reaction] issue_get_comment_reactions(owner, repo, id) + +Get a list of reactions from a comment of an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 + +try: + # Get a list of reactions from a comment of an issue + api_response = api_instance.issue_get_comment_reactions(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_comment_reactions: %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 | + +### Return type + +[**list[Reaction]**](Reaction.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, before=before) + +List all comments on an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated since the specified time are returned. (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated before the provided time are returned. (optional) + +try: + # List all comments on an issue + api_response = api_instance.issue_get_comments(owner, repo, index, since=since, before=before) + 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** | **datetime**| if provided, only comments updated since the specified time are returned. | [optional] + **before** | **datetime**| if provided, only comments updated before 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), [TOTPHeader](../README.md#TOTPHeader), [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_comments_and_timeline** +> list[TimelineComment] issue_get_comments_and_timeline(owner, repo, index, since=since, page=page, limit=limit, before=before) + +List all comments and events on an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated since the specified time are returned. (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated before the provided time are returned. (optional) + +try: + # List all comments and events on an issue + api_response = api_instance.issue_get_comments_and_timeline(owner, repo, index, since=since, page=page, limit=limit, before=before) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_comments_and_timeline: %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** | **datetime**| if provided, only comments updated since the specified time are returned. | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + **before** | **datetime**| if provided, only comments updated before the provided time are returned. | [optional] + +### Return type + +[**list[TimelineComment]**](TimelineComment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_attachment** +> Attachment issue_get_issue_attachment(owner, repo, index, attachment_id) + +Get an issue attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment_id = 789 # int | id of the attachment to get + +try: + # Get an issue attachment + api_response = api_instance.issue_get_issue_attachment(owner, repo, index, attachment_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_issue_attachment: %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 | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_comment_attachment** +> Attachment issue_get_issue_comment_attachment(owner, repo, id, attachment_id) + +Get a comment attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +attachment_id = 789 # int | id of the attachment to get + +try: + # Get a comment attachment + api_response = api_instance.issue_get_issue_comment_attachment(owner, repo, id, attachment_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_issue_comment_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 comment | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_reactions** +> list[Reaction] issue_get_issue_reactions(owner, repo, index, page=page, limit=limit) + +Get a list reactions of an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get a list reactions of an issue + api_response = api_instance.issue_get_issue_reactions(owner, repo, index, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_issue_reactions: %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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Reaction]**](Reaction.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_label** +> Label issue_get_label(owner, repo, id) + +Get a single label + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 'id_example' # str | the milestone to get, identified by ID and if not available by name + +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** | **str**| the milestone to get, identified by ID and if not available by name | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, state=state, name=name, page=page, limit=limit) + +Get all of a repository's opened milestones + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +state = 'state_example' # str | Milestone state, Recognized values are open, closed and all. Defaults to \"open\" (optional) +name = 'name_example' # str | filter by milestone name (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get all of a repository's opened milestones + api_response = api_instance.issue_get_milestones_list(owner, repo, state=state, name=name, page=page, limit=limit) + 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 | + **state** | **str**| Milestone state, Recognized values are open, closed and all. Defaults to \"open\" | [optional] + **name** | **str**| filter by milestone name | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, before=before, page=page, limit=limit) + +List all comments in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +since = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated since the provided time are returned. (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated before the provided time are returned. (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List all comments in a repository + api_response = api_instance.issue_get_repo_comments(owner, repo, since=since, before=before, page=page, limit=limit) + 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** | **datetime**| if provided, only comments updated since the provided time are returned. | [optional] + **before** | **datetime**| if provided, only comments updated before the provided time are returned. | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_blocks** +> list[Issue] issue_list_blocks(owner, repo, index, page=page, limit=limit) + +List issues that are blocked by this issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 'index_example' # str | index of the issue +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List issues that are blocked by this issue + api_response = api_instance.issue_list_blocks(owner, repo, index, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_list_blocks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **str**| index of the issue | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_issue_attachments** +> list[Attachment] issue_list_issue_attachments(owner, repo, index) + +List issue's attachments + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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: + # List issue's attachments + api_response = api_instance.issue_list_issue_attachments(owner, repo, index) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_list_issue_attachments: %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[Attachment]**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_issue_comment_attachments** +> list[Attachment] issue_list_issue_comment_attachments(owner, repo, id) + +List comment's attachments + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 + +try: + # List comment's attachments + api_response = api_instance.issue_list_issue_comment_attachments(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_list_issue_comment_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 comment | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_issue_dependencies** +> list[Issue] issue_list_issue_dependencies(owner, repo, index, page=page, limit=limit) + +List an issue's dependencies, i.e all issues that block this issue. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 'index_example' # str | index of the issue +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an issue's dependencies, i.e all issues that block this issue. + api_response = api_instance.issue_list_issue_dependencies(owner, repo, index, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_list_issue_dependencies: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **str**| index of the issue | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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, labels=labels, q=q, type=type, milestones=milestones, since=since, before=before, created_by=created_by, assigned_by=assigned_by, mentioned_by=mentioned_by, page=page, limit=limit) + +List a repository's issues + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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) +labels = 'labels_example' # str | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) +q = 'q_example' # str | search string (optional) +type = 'type_example' # str | filter by type (issues / pulls) if set (optional) +milestones = 'milestones_example' # str | comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show items updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show items updated before the given time. This is a timestamp in RFC 3339 format (optional) +created_by = 'created_by_example' # str | Only show items which were created by the given user (optional) +assigned_by = 'assigned_by_example' # str | Only show items for which the given user is assigned (optional) +mentioned_by = 'mentioned_by_example' # str | Only show items in which the given user was mentioned (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repository's issues + api_response = api_instance.issue_list_issues(owner, repo, state=state, labels=labels, q=q, type=type, milestones=milestones, since=since, before=before, created_by=created_by, assigned_by=assigned_by, mentioned_by=mentioned_by, page=page, limit=limit) + 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] + **labels** | **str**| comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | [optional] + **q** | **str**| search string | [optional] + **type** | **str**| filter by type (issues / pulls) if set | [optional] + **milestones** | **str**| comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded | [optional] + **since** | **datetime**| Only show items updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show items updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **created_by** | **str**| Only show items which were created by the given user | [optional] + **assigned_by** | **str**| Only show items for which the given user is assigned | [optional] + **mentioned_by** | **str**| Only show items in which the given user was mentioned | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +Get all of a repository's labels + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get all of a repository's labels + api_response = api_instance.issue_list_labels(owner, repo, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_post_comment_reaction** +> Reaction issue_post_comment_reaction(owner, repo, id, content=content) + +Add a reaction to a comment of an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +content = gitea.EditReactionOption() # EditReactionOption | (optional) + +try: + # Add a reaction to a comment of an issue + api_response = api_instance.issue_post_comment_reaction(owner, repo, id, content=content) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_post_comment_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] + +### Return type + +[**Reaction**](Reaction.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_post_issue_reaction** +> Reaction issue_post_issue_reaction(owner, repo, index, content=content) + +Add a reaction to an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +content = gitea.EditReactionOption() # EditReactionOption | (optional) + +try: + # Add a reaction to an issue + api_response = api_instance.issue_post_issue_reaction(owner, repo, index, content=content) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_post_issue_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] + +### Return type + +[**Reaction**](Reaction.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_remove_issue_blocking** +> Issue issue_remove_issue_blocking(owner, repo, index, body=body) + +Unblock the issue given in the body by the issue in path + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 'index_example' # str | index of the issue +body = gitea.IssueMeta() # IssueMeta | (optional) + +try: + # Unblock the issue given in the body by the issue in path + api_response = api_instance.issue_remove_issue_blocking(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_remove_issue_blocking: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **str**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.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), [TOTPHeader](../README.md#TOTPHeader), [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_issue_dependencies** +> Issue issue_remove_issue_dependencies(owner, repo, index, body=body) + +Remove an issue dependency + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 'index_example' # str | index of the issue +body = gitea.IssueMeta() # IssueMeta | (optional) + +try: + # Remove an issue dependency + api_response = api_instance.issue_remove_issue_dependencies(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_remove_issue_dependencies: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **str**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_reset_time** +> issue_reset_time(owner, repo, index) + +Reset a tracked time of an issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 add tracked time to + +try: + # Reset a tracked time of an issue + api_instance.issue_reset_time(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_reset_time: %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 add tracked time to | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_search_issues** +> list[Issue] issue_search_issues(state=state, labels=labels, milestones=milestones, q=q, priority_repo_id=priority_repo_id, type=type, since=since, before=before, assigned=assigned, created=created, mentioned=mentioned, review_requested=review_requested, reviewed=reviewed, owner=owner, team=team, page=page, limit=limit) + +Search for issues across the repositories that the user has access to + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +state = 'open' # str | State of the issue (optional) (default to open) +labels = 'labels_example' # str | Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. (optional) +milestones = 'milestones_example' # str | Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. (optional) +q = 'q_example' # str | Search string (optional) +priority_repo_id = 789 # int | Repository ID to prioritize in the results (optional) +type = 'type_example' # str | Filter by issue type (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show issues updated after the given time (RFC 3339 format) (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show issues updated before the given time (RFC 3339 format) (optional) +assigned = false # bool | Filter issues or pulls assigned to the authenticated user (optional) (default to false) +created = false # bool | Filter issues or pulls created by the authenticated user (optional) (default to false) +mentioned = false # bool | Filter issues or pulls mentioning the authenticated user (optional) (default to false) +review_requested = false # bool | Filter pull requests where the authenticated user's review was requested (optional) (default to false) +reviewed = false # bool | Filter pull requests reviewed by the authenticated user (optional) (default to false) +owner = 'owner_example' # str | Filter by repository owner (optional) +team = 'team_example' # str | Filter by team (requires organization owner parameter) (optional) +page = 1 # int | Page number of results to return (1-based) (optional) (default to 1) +limit = 56 # int | Number of items per page (optional) + +try: + # Search for issues across the repositories that the user has access to + api_response = api_instance.issue_search_issues(state=state, labels=labels, milestones=milestones, q=q, priority_repo_id=priority_repo_id, type=type, since=since, before=before, assigned=assigned, created=created, mentioned=mentioned, review_requested=review_requested, reviewed=reviewed, owner=owner, team=team, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_search_issues: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **state** | **str**| State of the issue | [optional] [default to open] + **labels** | **str**| Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. | [optional] + **milestones** | **str**| Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. | [optional] + **q** | **str**| Search string | [optional] + **priority_repo_id** | **int**| Repository ID to prioritize in the results | [optional] + **type** | **str**| Filter by issue type | [optional] + **since** | **datetime**| Only show issues updated after the given time (RFC 3339 format) | [optional] + **before** | **datetime**| Only show issues updated before the given time (RFC 3339 format) | [optional] + **assigned** | **bool**| Filter issues or pulls assigned to the authenticated user | [optional] [default to false] + **created** | **bool**| Filter issues or pulls created by the authenticated user | [optional] [default to false] + **mentioned** | **bool**| Filter issues or pulls mentioning the authenticated user | [optional] [default to false] + **review_requested** | **bool**| Filter pull requests where the authenticated user's review was requested | [optional] [default to false] + **reviewed** | **bool**| Filter pull requests reviewed by the authenticated user | [optional] [default to false] + **owner** | **str**| Filter by repository owner | [optional] + **team** | **str**| Filter by team (requires organization owner parameter) | [optional] + **page** | **int**| Page number of results to return (1-based) | [optional] [default to 1] + **limit** | **int**| Number of items per page | [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), [TOTPHeader](../README.md#TOTPHeader), [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_start_stop_watch** +> issue_start_stop_watch(owner, repo, index) + +Start stopwatch on an issue. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 the stopwatch on + +try: + # Start stopwatch on an issue. + api_instance.issue_start_stop_watch(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_start_stop_watch: %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 the stopwatch on | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_stop_stop_watch** +> issue_stop_stop_watch(owner, repo, index) + +Stop an issue's existing stopwatch. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 stop the stopwatch on + +try: + # Stop an issue's existing stopwatch. + api_instance.issue_stop_stop_watch(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_stop_stop_watch: %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 stop the stopwatch on | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_subscriptions** +> list[User] issue_subscriptions(owner, repo, index, page=page, limit=limit) + +Get users who subscribed on an issue. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get users who subscribed on an issue. + api_response = api_instance.issue_subscriptions(owner, repo, index, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_subscriptions: %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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, index, user=user, since=since, before=before, page=page, limit=limit) + +List an issue's tracked times + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.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 +user = 'user_example' # str | optional filter by user (available for issue managers) (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an issue's tracked times + api_response = api_instance.issue_tracked_times(owner, repo, index, user=user, since=since, before=before, page=page, limit=limit) + 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 | + **index** | **int**| index of the issue | + **user** | **str**| optional filter by user (available for issue managers) | [optional] + **since** | **datetime**| Only show times updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show times updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **move_issue_pin** +> move_issue_pin(owner, repo, index, position) + +Moves the Pin to the given Position + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of issue +position = 789 # int | the new position + +try: + # Moves the Pin to the given Position + api_instance.move_issue_pin(owner, repo, index, position) +except ApiException as e: + print("Exception when calling IssueApi->move_issue_pin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of issue | + **position** | **int**| the new position | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **pin_issue** +> pin_issue(owner, repo, index) + +Pin an Issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of issue to pin + +try: + # Pin an Issue + api_instance.pin_issue(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->pin_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 issue to pin | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **unpin_issue** +> unpin_issue(owner, repo, index) + +Unpin an Issue + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.IssueApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of issue to unpin + +try: + # Unpin an Issue + api_instance.unpin_issue(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->unpin_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 issue to unpin | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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/IssueConfig.md b/docs/IssueConfig.md new file mode 100644 index 0000000..2da736c --- /dev/null +++ b/docs/IssueConfig.md @@ -0,0 +1,11 @@ +# IssueConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**blank_issues_enabled** | **bool** | | [optional] +**contact_links** | [**list[IssueConfigContactLink]**](IssueConfigContactLink.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/IssueConfigContactLink.md b/docs/IssueConfigContactLink.md new file mode 100644 index 0000000..70f53df --- /dev/null +++ b/docs/IssueConfigContactLink.md @@ -0,0 +1,12 @@ +# IssueConfigContactLink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**about** | **str** | | [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/IssueConfigValidation.md b/docs/IssueConfigValidation.md new file mode 100644 index 0000000..03f865b --- /dev/null +++ b/docs/IssueConfigValidation.md @@ -0,0 +1,11 @@ +# IssueConfigValidation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**valid** | **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/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/IssueFormField.md b/docs/IssueFormField.md new file mode 100644 index 0000000..a3c8cef --- /dev/null +++ b/docs/IssueFormField.md @@ -0,0 +1,14 @@ +# IssueFormField + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **dict(str, object)** | | [optional] +**id** | **str** | | [optional] +**type** | [**IssueFormFieldType**](IssueFormFieldType.md) | | [optional] +**validations** | **dict(str, object)** | | [optional] +**visible** | [**list[IssueFormFieldVisible]**](IssueFormFieldVisible.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/IssueFormFieldType.md b/docs/IssueFormFieldType.md new file mode 100644 index 0000000..e514f62 --- /dev/null +++ b/docs/IssueFormFieldType.md @@ -0,0 +1,9 @@ +# IssueFormFieldType + +## 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/IssueFormFieldVisible.md b/docs/IssueFormFieldVisible.md new file mode 100644 index 0000000..d0ac8b5 --- /dev/null +++ b/docs/IssueFormFieldVisible.md @@ -0,0 +1,9 @@ +# IssueFormFieldVisible + +## 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/IssueLabelsOption.md b/docs/IssueLabelsOption.md new file mode 100644 index 0000000..477d6ef --- /dev/null +++ b/docs/IssueLabelsOption.md @@ -0,0 +1,10 @@ +# IssueLabelsOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | **list[object]** | Labels can be a list of integers representing label IDs or a list of strings representing label names | [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/IssueMeta.md b/docs/IssueMeta.md new file mode 100644 index 0000000..98fcf2c --- /dev/null +++ b/docs/IssueMeta.md @@ -0,0 +1,12 @@ +# IssueMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | | [optional] +**owner** | **str** | | [optional] +**repo** | **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/IssueTemplate.md b/docs/IssueTemplate.md new file mode 100644 index 0000000..ef97e69 --- /dev/null +++ b/docs/IssueTemplate.md @@ -0,0 +1,18 @@ +# IssueTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**about** | **str** | | [optional] +**assignees** | [**IssueTemplateStringSlice**](IssueTemplateStringSlice.md) | | [optional] +**body** | [**list[IssueFormField]**](IssueFormField.md) | | [optional] +**content** | **str** | | [optional] +**file_name** | **str** | | [optional] +**labels** | [**IssueTemplateStringSlice**](IssueTemplateStringSlice.md) | | [optional] +**name** | **str** | | [optional] +**ref** | **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/IssueTemplateStringSlice.md b/docs/IssueTemplateStringSlice.md new file mode 100644 index 0000000..4d69708 --- /dev/null +++ b/docs/IssueTemplateStringSlice.md @@ -0,0 +1,9 @@ +# IssueTemplateStringSlice + +## 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/Label.md b/docs/Label.md new file mode 100644 index 0000000..0067d87 --- /dev/null +++ b/docs/Label.md @@ -0,0 +1,16 @@ +# Label + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | [optional] +**description** | **str** | | [optional] +**exclusive** | **bool** | | [optional] +**id** | **int** | | [optional] +**is_archived** | **bool** | | [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/LabelTemplate.md b/docs/LabelTemplate.md new file mode 100644 index 0000000..aaab289 --- /dev/null +++ b/docs/LabelTemplate.md @@ -0,0 +1,13 @@ +# LabelTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | [optional] +**description** | **str** | | [optional] +**exclusive** | **bool** | | [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/LicenseTemplateInfo.md b/docs/LicenseTemplateInfo.md new file mode 100644 index 0000000..36ee8d5 --- /dev/null +++ b/docs/LicenseTemplateInfo.md @@ -0,0 +1,14 @@ +# LicenseTemplateInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**implementation** | **str** | | [optional] +**key** | **str** | | [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/LicensesTemplateListEntry.md b/docs/LicensesTemplateListEntry.md new file mode 100644 index 0000000..ce4e2f6 --- /dev/null +++ b/docs/LicensesTemplateListEntry.md @@ -0,0 +1,12 @@ +# LicensesTemplateListEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | | [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..b255145 --- /dev/null +++ b/docs/MarkdownOption.md @@ -0,0 +1,13 @@ +# MarkdownOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **str** | URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body | [optional] +**mode** | **str** | Mode to render (markdown, comment, wiki, file) in: body | [optional] +**text** | **str** | Text markdown to render in: body | [optional] +**wiki** | **bool** | Is it a wiki page? (use mode=wiki instead) Deprecated: true 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/MarkupOption.md b/docs/MarkupOption.md new file mode 100644 index 0000000..3b4d7c2 --- /dev/null +++ b/docs/MarkupOption.md @@ -0,0 +1,14 @@ +# MarkupOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **str** | URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body | [optional] +**file_path** | **str** | File path for detecting extension in file mode in: body | [optional] +**mode** | **str** | Mode to render (markdown, comment, wiki, file) in: body | [optional] +**text** | **str** | Text markup to render in: body | [optional] +**wiki** | **bool** | Is it a wiki page? (use mode=wiki instead) Deprecated: true 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/MergePullRequestOption.md b/docs/MergePullRequestOption.md new file mode 100644 index 0000000..ab95491 --- /dev/null +++ b/docs/MergePullRequestOption.md @@ -0,0 +1,17 @@ +# MergePullRequestOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**do** | **str** | | +**merge_commit_id** | **str** | | [optional] +**merge_message_field** | **str** | | [optional] +**merge_title_field** | **str** | | [optional] +**delete_branch_after_merge** | **bool** | | [optional] +**force_merge** | **bool** | | [optional] +**head_commit_id** | **str** | | [optional] +**merge_when_checks_succeed** | **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/MergeUpstreamRequest.md b/docs/MergeUpstreamRequest.md new file mode 100644 index 0000000..2b2b2ef --- /dev/null +++ b/docs/MergeUpstreamRequest.md @@ -0,0 +1,10 @@ +# MergeUpstreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**branch** | **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/MergeUpstreamResponse.md b/docs/MergeUpstreamResponse.md new file mode 100644 index 0000000..4748ce3 --- /dev/null +++ b/docs/MergeUpstreamResponse.md @@ -0,0 +1,10 @@ +# MergeUpstreamResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merge_type** | **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/MigrateRepoOptions.md b/docs/MigrateRepoOptions.md new file mode 100644 index 0000000..c71a1f5 --- /dev/null +++ b/docs/MigrateRepoOptions.md @@ -0,0 +1,31 @@ +# MigrateRepoOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_password** | **str** | | [optional] +**auth_token** | **str** | | [optional] +**auth_username** | **str** | | [optional] +**aws_access_key_id** | **str** | | [optional] +**aws_secret_access_key** | **str** | | [optional] +**clone_addr** | **str** | | +**description** | **str** | | [optional] +**issues** | **bool** | | [optional] +**labels** | **bool** | | [optional] +**lfs** | **bool** | | [optional] +**lfs_endpoint** | **str** | | [optional] +**milestones** | **bool** | | [optional] +**mirror** | **bool** | | [optional] +**mirror_interval** | **str** | | [optional] +**private** | **bool** | | [optional] +**pull_requests** | **bool** | | [optional] +**releases** | **bool** | | [optional] +**repo_name** | **str** | | +**repo_owner** | **str** | Name of User or Organisation who will own Repo after migration | [optional] +**service** | **str** | | [optional] +**uid** | **int** | deprecated (only for backwards compatibility) | [optional] +**wiki** | **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/Milestone.md b/docs/Milestone.md new file mode 100644 index 0000000..664955a --- /dev/null +++ b/docs/Milestone.md @@ -0,0 +1,19 @@ +# Milestone + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**closed_at** | **datetime** | | [optional] +**closed_issues** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**description** | **str** | | [optional] +**due_on** | **datetime** | | [optional] +**id** | **int** | | [optional] +**open_issues** | **int** | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] +**updated_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/MiscellaneousApi.md b/docs/MiscellaneousApi.md new file mode 100644 index 0000000..dd763ef --- /dev/null +++ b/docs/MiscellaneousApi.md @@ -0,0 +1,968 @@ +# gitea.MiscellaneousApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_gitignore_template_info**](MiscellaneousApi.md#get_gitignore_template_info) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template +[**get_label_template_info**](MiscellaneousApi.md#get_label_template_info) | **GET** /label/templates/{name} | Returns all labels in a template +[**get_license_template_info**](MiscellaneousApi.md#get_license_template_info) | **GET** /licenses/{name} | Returns information about a license template +[**get_node_info**](MiscellaneousApi.md#get_node_info) | **GET** /nodeinfo | Returns the nodeinfo of the Gitea application +[**get_signing_key**](MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg +[**get_version**](MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application +[**list_gitignores_templates**](MiscellaneousApi.md#list_gitignores_templates) | **GET** /gitignore/templates | Returns a list of all gitignore templates +[**list_label_templates**](MiscellaneousApi.md#list_label_templates) | **GET** /label/templates | Returns a list of all label templates +[**list_license_templates**](MiscellaneousApi.md#list_license_templates) | **GET** /licenses | Returns a list of all license templates +[**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 +[**render_markup**](MiscellaneousApi.md#render_markup) | **POST** /markup | Render a markup document as HTML + + +# **get_gitignore_template_info** +> GitignoreTemplateInfo get_gitignore_template_info(name) + +Returns information about a gitignore template + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) +name = 'name_example' # str | name of the template + +try: + # Returns information about a gitignore template + api_response = api_instance.get_gitignore_template_info(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_gitignore_template_info: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| name of the template | + +### Return type + +[**GitignoreTemplateInfo**](GitignoreTemplateInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_label_template_info** +> list[LabelTemplate] get_label_template_info(name) + +Returns all labels in a template + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) +name = 'name_example' # str | name of the template + +try: + # Returns all labels in a template + api_response = api_instance.get_label_template_info(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_label_template_info: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| name of the template | + +### Return type + +[**list[LabelTemplate]**](LabelTemplate.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_license_template_info** +> LicenseTemplateInfo get_license_template_info(name) + +Returns information about a license template + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) +name = 'name_example' # str | name of the license + +try: + # Returns information about a license template + api_response = api_instance.get_license_template_info(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_license_template_info: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| name of the license | + +### Return type + +[**LicenseTemplateInfo**](LicenseTemplateInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_node_info** +> NodeInfo get_node_info() + +Returns the nodeinfo of the Gitea application + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) + +try: + # Returns the nodeinfo of the Gitea application + api_response = api_instance.get_node_info() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_node_info: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NodeInfo**](NodeInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_signing_key** +> str get_signing_key() + +Get default signing-key.gpg + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) + +try: + # Get default signing-key.gpg + api_response = api_instance.get_signing_key() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_signing_key: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: text/plain + +[[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_version** +> ServerVersion get_version() + +Returns the version of the Gitea application + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_gitignores_templates** +> list[str] list_gitignores_templates() + +Returns a list of all gitignore templates + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) + +try: + # Returns a list of all gitignore templates + api_response = api_instance.list_gitignores_templates() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->list_gitignores_templates: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**list[str]** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_label_templates** +> list[str] list_label_templates() + +Returns a list of all label templates + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) + +try: + # Returns a list of all label templates + api_response = api_instance.list_label_templates() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->list_label_templates: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**list[str]** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_license_templates** +> list[LicensesTemplateListEntry] list_license_templates() + +Returns a list of all license templates + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) + +try: + # Returns a list of all license templates + api_response = api_instance.list_license_templates() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->list_license_templates: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[LicensesTemplateListEntry]**](LicensesTemplateListEntry.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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** +> str render_markdown(body=body) + +Render a markdown document as HTML + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) +body = gitea.MarkdownOption() # MarkdownOption | (optional) + +try: + # Render a markdown document as HTML + api_response = api_instance.render_markdown(body=body) + pprint(api_response) +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 + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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** +> str render_markdown_raw(body) + +Render raw markdown as HTML + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) +body = 'body_example' # str | Request body to render + +try: + # Render raw markdown as HTML + api_response = api_instance.render_markdown_raw(body) + pprint(api_response) +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 + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **render_markup** +> str render_markup(body=body) + +Render a markup document as HTML + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.MiscellaneousApi(gitea.ApiClient(configuration)) +body = gitea.MarkupOption() # MarkupOption | (optional) + +try: + # Render a markup document as HTML + api_response = api_instance.render_markup(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->render_markup: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MarkupOption**](MarkupOption.md)| | [optional] + +### Return type + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + diff --git a/docs/NewIssuePinsAllowed.md b/docs/NewIssuePinsAllowed.md new file mode 100644 index 0000000..52ce866 --- /dev/null +++ b/docs/NewIssuePinsAllowed.md @@ -0,0 +1,11 @@ +# NewIssuePinsAllowed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**issues** | **bool** | | [optional] +**pull_requests** | **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/NodeInfo.md b/docs/NodeInfo.md new file mode 100644 index 0000000..4f25773 --- /dev/null +++ b/docs/NodeInfo.md @@ -0,0 +1,16 @@ +# NodeInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **object** | | [optional] +**open_registrations** | **bool** | | [optional] +**protocols** | **list[str]** | | [optional] +**services** | [**NodeInfoServices**](NodeInfoServices.md) | | [optional] +**software** | [**NodeInfoSoftware**](NodeInfoSoftware.md) | | [optional] +**usage** | [**NodeInfoUsage**](NodeInfoUsage.md) | | [optional] +**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/NodeInfoServices.md b/docs/NodeInfoServices.md new file mode 100644 index 0000000..0326528 --- /dev/null +++ b/docs/NodeInfoServices.md @@ -0,0 +1,11 @@ +# NodeInfoServices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbound** | **list[str]** | | [optional] +**outbound** | **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/NodeInfoSoftware.md b/docs/NodeInfoSoftware.md new file mode 100644 index 0000000..42bfe78 --- /dev/null +++ b/docs/NodeInfoSoftware.md @@ -0,0 +1,13 @@ +# NodeInfoSoftware + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**homepage** | **str** | | [optional] +**name** | **str** | | [optional] +**repository** | **str** | | [optional] +**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/NodeInfoUsage.md b/docs/NodeInfoUsage.md new file mode 100644 index 0000000..7228ba0 --- /dev/null +++ b/docs/NodeInfoUsage.md @@ -0,0 +1,12 @@ +# NodeInfoUsage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_comments** | **int** | | [optional] +**local_posts** | **int** | | [optional] +**users** | [**NodeInfoUsageUsers**](NodeInfoUsageUsers.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/NodeInfoUsageUsers.md b/docs/NodeInfoUsageUsers.md new file mode 100644 index 0000000..c65d3d7 --- /dev/null +++ b/docs/NodeInfoUsageUsers.md @@ -0,0 +1,12 @@ +# NodeInfoUsageUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_halfyear** | **int** | | [optional] +**active_month** | **int** | | [optional] +**total** | **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/Note.md b/docs/Note.md new file mode 100644 index 0000000..1b71e8c --- /dev/null +++ b/docs/Note.md @@ -0,0 +1,11 @@ +# Note + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**Commit**](Commit.md) | | [optional] +**message** | **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/NotificationApi.md b/docs/NotificationApi.md new file mode 100644 index 0000000..b59ede9 --- /dev/null +++ b/docs/NotificationApi.md @@ -0,0 +1,624 @@ +# gitea.NotificationApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**notify_get_list**](NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads +[**notify_get_repo_list**](NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo +[**notify_get_thread**](NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID +[**notify_new_available**](NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist +[**notify_read_list**](NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read, pinned or unread +[**notify_read_repo_list**](NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread on a specific repo +[**notify_read_thread**](NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID + + +# **notify_get_list** +> list[NotificationThread] notify_get_list(all=all, status_types=status_types, subject_type=subject_type, since=since, before=before, page=page, limit=limit) + +List users's notification threads + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.NotificationApi(gitea.ApiClient(configuration)) +all = true # bool | If true, show notifications marked as read. Default value is false (optional) +status_types = ['status_types_example'] # list[str] | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. (optional) +subject_type = ['subject_type_example'] # list[str] | filter notifications by subject type (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List users's notification threads + api_response = api_instance.notify_get_list(all=all, status_types=status_types, subject_type=subject_type, since=since, before=before, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_get_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **all** | **bool**| If true, show notifications marked as read. Default value is false | [optional] + **status_types** | [**list[str]**](str.md)| Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. | [optional] + **subject_type** | [**list[str]**](str.md)| filter notifications by subject type | [optional] + **since** | **datetime**| Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[NotificationThread]**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **notify_get_repo_list** +> list[NotificationThread] notify_get_repo_list(owner, repo, all=all, status_types=status_types, subject_type=subject_type, since=since, before=before, page=page, limit=limit) + +List users's notification threads on a specific repo + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.NotificationApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +all = true # bool | If true, show notifications marked as read. Default value is false (optional) +status_types = ['status_types_example'] # list[str] | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned (optional) +subject_type = ['subject_type_example'] # list[str] | filter notifications by subject type (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List users's notification threads on a specific repo + api_response = api_instance.notify_get_repo_list(owner, repo, all=all, status_types=status_types, subject_type=subject_type, since=since, before=before, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_get_repo_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **all** | **bool**| If true, show notifications marked as read. Default value is false | [optional] + **status_types** | [**list[str]**](str.md)| Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned | [optional] + **subject_type** | [**list[str]**](str.md)| filter notifications by subject type | [optional] + **since** | **datetime**| Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[NotificationThread]**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **notify_get_thread** +> NotificationThread notify_get_thread(id) + +Get notification thread by ID + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.NotificationApi(gitea.ApiClient(configuration)) +id = 'id_example' # str | id of notification thread + +try: + # Get notification thread by ID + api_response = api_instance.notify_get_thread(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_get_thread: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| id of notification thread | + +### Return type + +[**NotificationThread**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **notify_new_available** +> NotificationCount notify_new_available() + +Check if unread notifications exist + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.NotificationApi(gitea.ApiClient(configuration)) + +try: + # Check if unread notifications exist + api_response = api_instance.notify_new_available() + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_new_available: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationCount**](NotificationCount.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **notify_read_list** +> list[NotificationThread] notify_read_list(last_read_at=last_read_at, all=all, status_types=status_types, to_status=to_status) + +Mark notification threads as read, pinned or unread + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.NotificationApi(gitea.ApiClient(configuration)) +last_read_at = '2013-10-20T19:20:30+01:00' # datetime | Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional) +all = 'all_example' # str | If true, mark all notifications on this repo. Default value is false (optional) +status_types = ['status_types_example'] # list[str] | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional) +to_status = 'to_status_example' # str | Status to mark notifications as, Defaults to read. (optional) + +try: + # Mark notification threads as read, pinned or unread + api_response = api_instance.notify_read_list(last_read_at=last_read_at, all=all, status_types=status_types, to_status=to_status) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_read_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **last_read_at** | **datetime**| Describes the last point that notifications were checked. Anything updated since this time will not be updated. | [optional] + **all** | **str**| If true, mark all notifications on this repo. Default value is false | [optional] + **status_types** | [**list[str]**](str.md)| Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | [optional] + **to_status** | **str**| Status to mark notifications as, Defaults to read. | [optional] + +### Return type + +[**list[NotificationThread]**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **notify_read_repo_list** +> list[NotificationThread] notify_read_repo_list(owner, repo, all=all, status_types=status_types, to_status=to_status, last_read_at=last_read_at) + +Mark notification threads as read, pinned or unread on a specific repo + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.NotificationApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +all = 'all_example' # str | If true, mark all notifications on this repo. Default value is false (optional) +status_types = ['status_types_example'] # list[str] | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional) +to_status = 'to_status_example' # str | Status to mark notifications as. Defaults to read. (optional) +last_read_at = '2013-10-20T19:20:30+01:00' # datetime | Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional) + +try: + # Mark notification threads as read, pinned or unread on a specific repo + api_response = api_instance.notify_read_repo_list(owner, repo, all=all, status_types=status_types, to_status=to_status, last_read_at=last_read_at) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_read_repo_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **all** | **str**| If true, mark all notifications on this repo. Default value is false | [optional] + **status_types** | [**list[str]**](str.md)| Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | [optional] + **to_status** | **str**| Status to mark notifications as. Defaults to read. | [optional] + **last_read_at** | **datetime**| Describes the last point that notifications were checked. Anything updated since this time will not be updated. | [optional] + +### Return type + +[**list[NotificationThread]**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **notify_read_thread** +> NotificationThread notify_read_thread(id, to_status=to_status) + +Mark notification thread as read by ID + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.NotificationApi(gitea.ApiClient(configuration)) +id = 'id_example' # str | id of notification thread +to_status = 'read' # str | Status to mark notifications as (optional) (default to read) + +try: + # Mark notification thread as read by ID + api_response = api_instance.notify_read_thread(id, to_status=to_status) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_read_thread: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| id of notification thread | + **to_status** | **str**| Status to mark notifications as | [optional] [default to read] + +### Return type + +[**NotificationThread**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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/NotificationCount.md b/docs/NotificationCount.md new file mode 100644 index 0000000..095ae5b --- /dev/null +++ b/docs/NotificationCount.md @@ -0,0 +1,10 @@ +# NotificationCount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new** | **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/NotificationSubject.md b/docs/NotificationSubject.md new file mode 100644 index 0000000..eb415ac --- /dev/null +++ b/docs/NotificationSubject.md @@ -0,0 +1,16 @@ +# NotificationSubject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_url** | **str** | | [optional] +**latest_comment_html_url** | **str** | | [optional] +**latest_comment_url** | **str** | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] +**type** | [**NotifySubjectType**](NotifySubjectType.md) | | [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/NotificationThread.md b/docs/NotificationThread.md new file mode 100644 index 0000000..9d4bbe8 --- /dev/null +++ b/docs/NotificationThread.md @@ -0,0 +1,16 @@ +# NotificationThread + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**pinned** | **bool** | | [optional] +**repository** | [**Repository**](Repository.md) | | [optional] +**subject** | [**NotificationSubject**](NotificationSubject.md) | | [optional] +**unread** | **bool** | | [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/NotifySubjectType.md b/docs/NotifySubjectType.md new file mode 100644 index 0000000..09b3cca --- /dev/null +++ b/docs/NotifySubjectType.md @@ -0,0 +1,9 @@ +# NotifySubjectType + +## 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/OAuth2Application.md b/docs/OAuth2Application.md new file mode 100644 index 0000000..436305b --- /dev/null +++ b/docs/OAuth2Application.md @@ -0,0 +1,17 @@ +# OAuth2Application + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_id** | **str** | | [optional] +**client_secret** | **str** | | [optional] +**confidential_client** | **bool** | | [optional] +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**redirect_uris** | **list[str]** | | [optional] +**skip_secondary_authorization** | **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/Organization.md b/docs/Organization.md new file mode 100644 index 0000000..f8f5a21 --- /dev/null +++ b/docs/Organization.md @@ -0,0 +1,20 @@ +# Organization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar_url** | **str** | | [optional] +**description** | **str** | | [optional] +**email** | **str** | | [optional] +**full_name** | **str** | | [optional] +**id** | **int** | | [optional] +**location** | **str** | | [optional] +**name** | **str** | | [optional] +**repo_admin_change_team_access** | **bool** | | [optional] +**username** | **str** | deprecated | [optional] +**visibility** | **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..a94d022 --- /dev/null +++ b/docs/OrganizationApi.md @@ -0,0 +1,4985 @@ +# gitea.OrganizationApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_org_repo**](OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization +[**create_org_repo_deprecated**](OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization +[**create_org_variable**](OrganizationApi.md#create_org_variable) | **POST** /orgs/{org}/actions/variables/{variablename} | Create an org-level variable +[**delete_org_secret**](OrganizationApi.md#delete_org_secret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization +[**delete_org_variable**](OrganizationApi.md#delete_org_variable) | **DELETE** /orgs/{org}/actions/variables/{variablename} | Delete an org-level variable +[**get_org_variable**](OrganizationApi.md#get_org_variable) | **GET** /orgs/{org}/actions/variables/{variablename} | Get an org-level variable +[**get_org_variables_list**](OrganizationApi.md#get_org_variables_list) | **GET** /orgs/{org}/actions/variables | Get an org-level variables list +[**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_label**](OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization +[**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_avatar**](OrganizationApi.md#org_delete_avatar) | **DELETE** /orgs/{org}/avatar | Delete Avatar +[**org_delete_hook**](OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +[**org_delete_label**](OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label +[**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_label**](OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label +[**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_all**](OrganizationApi.md#org_get_all) | **GET** /orgs | Get list of organizations +[**org_get_hook**](OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +[**org_get_label**](OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label +[**org_get_runner_registration_token**](OrganizationApi.md#org_get_runner_registration_token) | **GET** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token +[**org_get_team**](OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team +[**org_get_user_permissions**](OrganizationApi.md#org_get_user_permissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization +[**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_actions_secrets**](OrganizationApi.md#org_list_actions_secrets) | **GET** /orgs/{org}/actions/secrets | List an organization's actions secrets +[**org_list_activity_feeds**](OrganizationApi.md#org_list_activity_feeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds +[**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_labels**](OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels +[**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_activity_feeds**](OrganizationApi.md#org_list_team_activity_feeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds +[**org_list_team_member**](OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team +[**org_list_team_members**](OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +[**org_list_team_repo**](OrganizationApi.md#org_list_team_repo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team +[**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 +[**org_update_avatar**](OrganizationApi.md#org_update_avatar) | **POST** /orgs/{org}/avatar | Update Avatar +[**organization_block_user**](OrganizationApi.md#organization_block_user) | **PUT** /orgs/{org}/blocks/{username} | Block a user +[**organization_check_user_block**](OrganizationApi.md#organization_check_user_block) | **GET** /orgs/{org}/blocks/{username} | Check if a user is blocked by the organization +[**organization_list_blocks**](OrganizationApi.md#organization_list_blocks) | **GET** /orgs/{org}/blocks | List users blocked by the organization +[**organization_unblock_user**](OrganizationApi.md#organization_unblock_user) | **DELETE** /orgs/{org}/blocks/{username} | Unblock a user +[**team_search**](OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization +[**update_org_secret**](OrganizationApi.md#update_org_secret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization +[**update_org_variable**](OrganizationApi.md#update_org_variable) | **PUT** /orgs/{org}/actions/variables/{variablename} | Update an org-level variable + + +# **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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of organization +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_org_repo_deprecated** +> Repository create_org_repo_deprecated(org, body=body) + +Create a repository in an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of organization +body = gitea.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository in an organization + api_response = api_instance.create_org_repo_deprecated(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->create_org_repo_deprecated: %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), [TOTPHeader](../README.md#TOTPHeader), [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_org_variable** +> create_org_variable(org, variablename, body=body) + +Create an org-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +variablename = 'variablename_example' # str | name of the variable +body = gitea.CreateVariableOption() # CreateVariableOption | (optional) + +try: + # Create an org-level variable + api_instance.create_org_variable(org, variablename, body=body) +except ApiException as e: + print("Exception when calling OrganizationApi->create_org_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **variablename** | **str**| name of the variable | + **body** | [**CreateVariableOption**](CreateVariableOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **delete_org_secret** +> delete_org_secret(org, secretname) + +Delete a secret in an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of organization +secretname = 'secretname_example' # str | name of the secret + +try: + # Delete a secret in an organization + api_instance.delete_org_secret(org, secretname) +except ApiException as e: + print("Exception when calling OrganizationApi->delete_org_secret: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of organization | + **secretname** | **str**| name of the secret | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **delete_org_variable** +> ActionVariable delete_org_variable(org, variablename) + +Delete an org-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +variablename = 'variablename_example' # str | name of the variable + +try: + # Delete an org-level variable + api_response = api_instance.delete_org_variable(org, variablename) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->delete_org_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **variablename** | **str**| name of the variable | + +### Return type + +[**ActionVariable**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_org_variable** +> ActionVariable get_org_variable(org, variablename) + +Get an org-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +variablename = 'variablename_example' # str | name of the variable + +try: + # Get an org-level variable + api_response = api_instance.get_org_variable(org, variablename) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->get_org_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **variablename** | **str**| name of the variable | + +### Return type + +[**ActionVariable**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_org_variables_list** +> list[ActionVariable] get_org_variables_list(org, page=page, limit=limit) + +Get an org-level variables list + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get an org-level variables list + api_response = api_instance.get_org_variables_list(org, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->get_org_variables_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[ActionVariable]**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_member** +> org_add_team_member(id, username) + +Add a team member + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +organization = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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** +> Hook org_create_hook(org, body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = gitea.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 + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_label** +> Label org_create_label(org, body=body) + +Create a label for an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = gitea.CreateLabelOption() # CreateLabelOption | (optional) + +try: + # Create a label for an organization + api_response = api_instance.org_create_label(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_avatar** +> org_delete_avatar(org) + +Delete Avatar + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization + +try: + # Delete Avatar + api_instance.org_delete_avatar(org) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_avatar: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_label** +> org_delete_label(org, id) + +Delete a label + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the label to delete + +try: + # Delete a label + api_instance.org_delete_label(org, id) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_delete_member** +> org_delete_member(org, username) + +Remove a member from an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +Edit an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization to edit +body = gitea.EditOrgOption() # EditOrgOption | + +try: + # Edit an organization + api_response = api_instance.org_edit(org, 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)| | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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** +> Hook org_edit_hook(org, id, body=body) + +Update a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the hook to update +body = gitea.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 + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_label** +> Label org_edit_label(org, id, body=body) + +Update a label + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the label to edit +body = gitea.EditLabelOption() # EditLabelOption | (optional) + +try: + # Update a label + api_response = api_instance.org_edit_label(org, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +id = 56 # int | id of the team to edit +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_all** +> list[Organization] org_get_all(page=page, limit=limit) + +Get list of organizations + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get list of organizations + api_response = api_instance.org_get_all(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_all: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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** +> Hook org_get_hook(org, id) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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 + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_label** +> Label org_get_label(org, id) + +Get a single label + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the label to get + +try: + # Get a single label + api_response = api_instance.org_get_label(org, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **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), [TOTPHeader](../README.md#TOTPHeader), [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_runner_registration_token** +> org_get_runner_registration_token(org) + +Get an organization's actions runner registration token + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization + +try: + # Get an organization's actions runner registration token + api_instance.org_get_runner_registration_token(org) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_runner_registration_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_user_permissions** +> OrganizationPermissions org_get_user_permissions(username, org) + +Get user permissions in organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +org = 'org_example' # str | name of the organization + +try: + # Get user permissions in organization + api_response = api_instance.org_get_user_permissions(username, org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_user_permissions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **org** | **str**| name of the organization | + +### Return type + +[**OrganizationPermissions**](OrganizationPermissions.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_actions_secrets** +> list[Secret] org_list_actions_secrets(org, page=page, limit=limit) + +List an organization's actions secrets + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's actions secrets + api_response = api_instance.org_list_actions_secrets(org, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_actions_secrets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Secret]**](Secret.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_activity_feeds** +> list[Activity] org_list_activity_feeds(org, _date=_date, page=page, limit=limit) + +List an organization's activity feeds + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the org +_date = '2013-10-20' # date | the date of the activities to be found (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's activity feeds + api_response = api_instance.org_list_activity_feeds(org, _date=_date, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_activity_feeds: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the org | + **_date** | **date**| the date of the activities to be found | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Activity]**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_current_user_orgs** +> list[Organization] org_list_current_user_orgs(page=page, limit=limit) + +List the current user's organizations + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the current user's organizations + api_response = api_instance.org_list_current_user_orgs(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_current_user_orgs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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[Hook] org_list_hooks(org, page=page, limit=limit) + +List an organization's webhooks + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's webhooks + api_response = api_instance.org_list_hooks(org, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Hook]**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_labels** +> list[Label] org_list_labels(org, page=page, limit=limit) + +List an organization's labels + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's labels + api_response = api_instance.org_list_labels(org, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_labels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List an organization's members + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's members + api_response = api_instance.org_list_members(org, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List an organization's public members + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's public members + api_response = api_instance.org_list_public_members(org, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List an organization's repos + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's repos + api_response = api_instance.org_list_repos(org, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_activity_feeds** +> list[Activity] org_list_team_activity_feeds(id, _date=_date, page=page, limit=limit) + +List a team's activity feeds + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the team +_date = '2013-10-20' # date | the date of the activities to be found (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a team's activity feeds + api_response = api_instance.org_list_team_activity_feeds(id, _date=_date, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_activity_feeds: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **_date** | **date**| the date of the activities to be found | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Activity]**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_member** +> User org_list_team_member(id, username) + +List a particular member of team + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the team +username = 'username_example' # str | username of the member to list + +try: + # List a particular member of team + api_response = api_instance.org_list_team_member(id, username) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **username** | **str**| username of the member to list | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a team's members + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the team +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a team's members + api_response = api_instance.org_list_team_members(id, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_repo** +> Repository org_list_team_repo(id, org, repo) + +List a particular repo of team + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the team +org = 'org_example' # str | organization that owns the repo to list +repo = 'repo_example' # str | name of the repo to list + +try: + # List a particular repo of team + api_response = api_instance.org_list_team_repo(id, org, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **org** | **str**| organization that owns the repo to list | + **repo** | **str**| name of the repo to list | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a team's repos + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the team +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a team's repos + api_response = api_instance.org_list_team_repos(id, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List an organization's teams + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an organization's teams + api_response = api_instance.org_list_teams(org, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a user's organizations + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a user's organizations + api_response = api_instance.org_list_user_orgs(username, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_update_avatar** +> org_update_avatar(org, body=body) + +Update Avatar + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = gitea.UpdateUserAvatarOption() # UpdateUserAvatarOption | (optional) + +try: + # Update Avatar + api_instance.org_update_avatar(org, body=body) +except ApiException as e: + print("Exception when calling OrganizationApi->org_update_avatar: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **body** | [**UpdateUserAvatarOption**](UpdateUserAvatarOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **organization_block_user** +> organization_block_user(org, username, note=note) + +Block a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | user to block +note = 'note_example' # str | optional note for the block (optional) + +try: + # Block a user + api_instance.organization_block_user(org, username, note=note) +except ApiException as e: + print("Exception when calling OrganizationApi->organization_block_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| user to block | + **note** | **str**| optional note for the block | [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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **organization_check_user_block** +> organization_check_user_block(org, username) + +Check if a user is blocked by the organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | user to check + +try: + # Check if a user is blocked by the organization + api_instance.organization_check_user_block(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->organization_check_user_block: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| user to check | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **organization_list_blocks** +> list[User] organization_list_blocks(org, page=page, limit=limit) + +List users blocked by the organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List users blocked by the organization + api_response = api_instance.organization_list_blocks(org, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->organization_list_blocks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **organization_unblock_user** +> organization_unblock_user(org, username) + +Unblock a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | user to unblock + +try: + # Unblock a user + api_instance.organization_unblock_user(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->organization_unblock_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| user to unblock | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **team_search** +> InlineResponse200 team_search(org, q=q, include_desc=include_desc, page=page, limit=limit) + +Search for teams within an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +q = 'q_example' # str | keywords to search (optional) +include_desc = true # bool | include search within team description (defaults to true) (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Search for teams within an organization + api_response = api_instance.team_search(org, q=q, include_desc=include_desc, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->team_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **q** | **str**| keywords to search | [optional] + **include_desc** | **bool**| include search within team description (defaults to true) | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **update_org_secret** +> update_org_secret(org, secretname, body=body) + +Create or Update a secret value in an organization + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of organization +secretname = 'secretname_example' # str | name of the secret +body = gitea.CreateOrUpdateSecretOption() # CreateOrUpdateSecretOption | (optional) + +try: + # Create or Update a secret value in an organization + api_instance.update_org_secret(org, secretname, body=body) +except ApiException as e: + print("Exception when calling OrganizationApi->update_org_secret: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of organization | + **secretname** | **str**| name of the secret | + **body** | [**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **update_org_variable** +> update_org_variable(org, variablename, body=body) + +Update an org-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.OrganizationApi(gitea.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +variablename = 'variablename_example' # str | name of the variable +body = gitea.UpdateVariableOption() # UpdateVariableOption | (optional) + +try: + # Update an org-level variable + api_instance.update_org_variable(org, variablename, body=body) +except ApiException as e: + print("Exception when calling OrganizationApi->update_org_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **variablename** | **str**| name of the variable | + **body** | [**UpdateVariableOption**](UpdateVariableOption.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), [TOTPHeader](../README.md#TOTPHeader), [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/OrganizationPermissions.md b/docs/OrganizationPermissions.md new file mode 100644 index 0000000..56c65cf --- /dev/null +++ b/docs/OrganizationPermissions.md @@ -0,0 +1,14 @@ +# OrganizationPermissions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_repository** | **bool** | | [optional] +**can_read** | **bool** | | [optional] +**can_write** | **bool** | | [optional] +**is_admin** | **bool** | | [optional] +**is_owner** | **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/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/Package.md b/docs/Package.md new file mode 100644 index 0000000..140616b --- /dev/null +++ b/docs/Package.md @@ -0,0 +1,18 @@ +# Package + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | [optional] +**creator** | [**User**](User.md) | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**owner** | [**User**](User.md) | | [optional] +**repository** | [**Repository**](Repository.md) | | [optional] +**type** | **str** | | [optional] +**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/PackageApi.md b/docs/PackageApi.md new file mode 100644 index 0000000..5fde8be --- /dev/null +++ b/docs/PackageApi.md @@ -0,0 +1,361 @@ +# gitea.PackageApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_package**](PackageApi.md#delete_package) | **DELETE** /packages/{owner}/{type}/{name}/{version} | Delete a package +[**get_package**](PackageApi.md#get_package) | **GET** /packages/{owner}/{type}/{name}/{version} | Gets a package +[**list_package_files**](PackageApi.md#list_package_files) | **GET** /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package +[**list_packages**](PackageApi.md#list_packages) | **GET** /packages/{owner} | Gets all packages of an owner + + +# **delete_package** +> delete_package(owner, type, name, version) + +Delete a package + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.PackageApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the package +type = 'type_example' # str | type of the package +name = 'name_example' # str | name of the package +version = 'version_example' # str | version of the package + +try: + # Delete a package + api_instance.delete_package(owner, type, name, version) +except ApiException as e: + print("Exception when calling PackageApi->delete_package: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the package | + **type** | **str**| type of the package | + **name** | **str**| name of the package | + **version** | **str**| version of the package | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **get_package** +> Package get_package(owner, type, name, version) + +Gets a package + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.PackageApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the package +type = 'type_example' # str | type of the package +name = 'name_example' # str | name of the package +version = 'version_example' # str | version of the package + +try: + # Gets a package + api_response = api_instance.get_package(owner, type, name, version) + pprint(api_response) +except ApiException as e: + print("Exception when calling PackageApi->get_package: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the package | + **type** | **str**| type of the package | + **name** | **str**| name of the package | + **version** | **str**| version of the package | + +### Return type + +[**Package**](Package.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_package_files** +> list[PackageFile] list_package_files(owner, type, name, version) + +Gets all files of a package + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.PackageApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the package +type = 'type_example' # str | type of the package +name = 'name_example' # str | name of the package +version = 'version_example' # str | version of the package + +try: + # Gets all files of a package + api_response = api_instance.list_package_files(owner, type, name, version) + pprint(api_response) +except ApiException as e: + print("Exception when calling PackageApi->list_package_files: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the package | + **type** | **str**| type of the package | + **name** | **str**| name of the package | + **version** | **str**| version of the package | + +### Return type + +[**list[PackageFile]**](PackageFile.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_packages** +> list[Package] list_packages(owner, page=page, limit=limit, type=type, q=q) + +Gets all packages of an owner + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.PackageApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the packages +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) +type = 'type_example' # str | package type filter (optional) +q = 'q_example' # str | name filter (optional) + +try: + # Gets all packages of an owner + api_response = api_instance.list_packages(owner, page=page, limit=limit, type=type, q=q) + pprint(api_response) +except ApiException as e: + print("Exception when calling PackageApi->list_packages: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the packages | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + **type** | **str**| package type filter | [optional] + **q** | **str**| name filter | [optional] + +### Return type + +[**list[Package]**](Package.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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/PackageFile.md b/docs/PackageFile.md new file mode 100644 index 0000000..6d4176b --- /dev/null +++ b/docs/PackageFile.md @@ -0,0 +1,16 @@ +# PackageFile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **int** | | [optional] +**id** | **int** | | [optional] +**md5** | **str** | | [optional] +**name** | **str** | | [optional] +**sha1** | **str** | | [optional] +**sha256** | **str** | | [optional] +**sha512** | **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..aadcb9d --- /dev/null +++ b/docs/PayloadCommit.md @@ -0,0 +1,19 @@ +# PayloadCommit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**added** | **list[str]** | | [optional] +**author** | [**PayloadUser**](PayloadUser.md) | | [optional] +**committer** | [**PayloadUser**](PayloadUser.md) | | [optional] +**id** | **str** | sha1 hash of the commit | [optional] +**message** | **str** | | [optional] +**modified** | **list[str]** | | [optional] +**removed** | **list[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..7380798 --- /dev/null +++ b/docs/PayloadCommitVerification.md @@ -0,0 +1,14 @@ +# PayloadCommitVerification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payload** | **str** | | [optional] +**reason** | **str** | | [optional] +**signature** | **str** | | [optional] +**signer** | [**PayloadUser**](PayloadUser.md) | | [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..a60acc8 --- /dev/null +++ b/docs/PullRequest.md @@ -0,0 +1,46 @@ +# PullRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | **int** | | [optional] +**allow_maintainer_edit** | **bool** | | [optional] +**assignee** | [**User**](User.md) | | [optional] +**assignees** | [**list[User]**](User.md) | | [optional] +**base** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] +**body** | **str** | | [optional] +**changed_files** | **int** | | [optional] +**closed_at** | **datetime** | | [optional] +**comments** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**deletions** | **int** | | [optional] +**diff_url** | **str** | | [optional] +**draft** | **bool** | | [optional] +**due_date** | **datetime** | | [optional] +**head** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**is_locked** | **bool** | | [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] +**pin_order** | **int** | | [optional] +**requested_reviewers** | [**list[User]**](User.md) | | [optional] +**requested_reviewers_teams** | [**list[Team]**](Team.md) | | [optional] +**review_comments** | **int** | number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) | [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..25f7a62 --- /dev/null +++ b/docs/PullRequestMeta.md @@ -0,0 +1,13 @@ +# PullRequestMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**draft** | **bool** | | [optional] +**html_url** | **str** | | [optional] +**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/PullReview.md b/docs/PullReview.md new file mode 100644 index 0000000..c6f96fc --- /dev/null +++ b/docs/PullReview.md @@ -0,0 +1,23 @@ +# PullReview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**comments_count** | **int** | | [optional] +**commit_id** | **str** | | [optional] +**dismissed** | **bool** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**official** | **bool** | | [optional] +**pull_request_url** | **str** | | [optional] +**stale** | **bool** | | [optional] +**state** | [**ReviewStateType**](ReviewStateType.md) | | [optional] +**submitted_at** | **datetime** | | [optional] +**team** | [**Team**](Team.md) | | [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/PullReviewComment.md b/docs/PullReviewComment.md new file mode 100644 index 0000000..0d35509 --- /dev/null +++ b/docs/PullReviewComment.md @@ -0,0 +1,24 @@ +# PullReviewComment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**commit_id** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**diff_hunk** | **str** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**original_commit_id** | **str** | | [optional] +**original_position** | **int** | | [optional] +**path** | **str** | | [optional] +**position** | **int** | | [optional] +**pull_request_review_id** | **int** | | [optional] +**pull_request_url** | **str** | | [optional] +**resolver** | [**User**](User.md) | | [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/PullReviewRequestOptions.md b/docs/PullReviewRequestOptions.md new file mode 100644 index 0000000..5d46e76 --- /dev/null +++ b/docs/PullReviewRequestOptions.md @@ -0,0 +1,11 @@ +# PullReviewRequestOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reviewers** | **list[str]** | | [optional] +**team_reviewers** | **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/PushMirror.md b/docs/PushMirror.md new file mode 100644 index 0000000..07565d2 --- /dev/null +++ b/docs/PushMirror.md @@ -0,0 +1,17 @@ +# PushMirror + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**interval** | **str** | | [optional] +**last_error** | **str** | | [optional] +**last_update** | **datetime** | | [optional] +**remote_address** | **str** | | [optional] +**remote_name** | **str** | | [optional] +**repo_name** | **str** | | [optional] +**sync_on_commit** | **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/Reaction.md b/docs/Reaction.md new file mode 100644 index 0000000..ce1bc2a --- /dev/null +++ b/docs/Reaction.md @@ -0,0 +1,12 @@ +# Reaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**created_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/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..320a2a8 --- /dev/null +++ b/docs/Release.md @@ -0,0 +1,25 @@ +# 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] +**html_url** | **str** | | [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] +**upload_url** | **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/RenameUserOption.md b/docs/RenameUserOption.md new file mode 100644 index 0000000..6214037 --- /dev/null +++ b/docs/RenameUserOption.md @@ -0,0 +1,10 @@ +# RenameUserOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_username** | **str** | New username for this user. This name cannot be in use yet by any other user. | + +[[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/RepoCollaboratorPermission.md b/docs/RepoCollaboratorPermission.md new file mode 100644 index 0000000..e4f27fd --- /dev/null +++ b/docs/RepoCollaboratorPermission.md @@ -0,0 +1,12 @@ +# RepoCollaboratorPermission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permission** | **str** | | [optional] +**role_name** | **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/RepoCommit.md b/docs/RepoCommit.md new file mode 100644 index 0000000..d552bf2 --- /dev/null +++ b/docs/RepoCommit.md @@ -0,0 +1,15 @@ +# RepoCommit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**CommitUser**](CommitUser.md) | | [optional] +**committer** | [**CommitUser**](CommitUser.md) | | [optional] +**message** | **str** | | [optional] +**tree** | [**CommitMeta**](CommitMeta.md) | | [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/RepoTopicOptions.md b/docs/RepoTopicOptions.md new file mode 100644 index 0000000..44a62b9 --- /dev/null +++ b/docs/RepoTopicOptions.md @@ -0,0 +1,10 @@ +# RepoTopicOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topics** | **list[str]** | list of topic names | [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/RepoTransfer.md b/docs/RepoTransfer.md new file mode 100644 index 0000000..075c696 --- /dev/null +++ b/docs/RepoTransfer.md @@ -0,0 +1,12 @@ +# RepoTransfer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**doer** | [**User**](User.md) | | [optional] +**recipient** | [**User**](User.md) | | [optional] +**teams** | [**list[Team]**](Team.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/Repository.md b/docs/Repository.md new file mode 100644 index 0000000..b8e613d --- /dev/null +++ b/docs/Repository.md @@ -0,0 +1,71 @@ +# Repository + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_fast_forward_only_merge** | **bool** | | [optional] +**allow_merge_commits** | **bool** | | [optional] +**allow_rebase** | **bool** | | [optional] +**allow_rebase_explicit** | **bool** | | [optional] +**allow_rebase_update** | **bool** | | [optional] +**allow_squash_merge** | **bool** | | [optional] +**archived** | **bool** | | [optional] +**archived_at** | **datetime** | | [optional] +**avatar_url** | **str** | | [optional] +**clone_url** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**default_allow_maintainer_edit** | **bool** | | [optional] +**default_branch** | **str** | | [optional] +**default_delete_branch_after_merge** | **bool** | | [optional] +**default_merge_style** | **str** | | [optional] +**description** | **str** | | [optional] +**empty** | **bool** | | [optional] +**external_tracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] +**external_wiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] +**fork** | **bool** | | [optional] +**forks_count** | **int** | | [optional] +**full_name** | **str** | | [optional] +**has_actions** | **bool** | | [optional] +**has_issues** | **bool** | | [optional] +**has_packages** | **bool** | | [optional] +**has_projects** | **bool** | | [optional] +**has_pull_requests** | **bool** | | [optional] +**has_releases** | **bool** | | [optional] +**has_wiki** | **bool** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**ignore_whitespace_conflicts** | **bool** | | [optional] +**internal** | **bool** | | [optional] +**internal_tracker** | [**InternalTracker**](InternalTracker.md) | | [optional] +**language** | **str** | | [optional] +**languages_url** | **str** | | [optional] +**licenses** | **list[str]** | | [optional] +**link** | **str** | | [optional] +**mirror** | **bool** | | [optional] +**mirror_interval** | **str** | | [optional] +**mirror_updated** | **datetime** | | [optional] +**name** | **str** | | [optional] +**object_format_name** | **str** | ObjectFormatName of the underlying git repository | [optional] +**open_issues_count** | **int** | | [optional] +**open_pr_counter** | **int** | | [optional] +**original_url** | **str** | | [optional] +**owner** | [**User**](User.md) | | [optional] +**parent** | [**Repository**](Repository.md) | | [optional] +**permissions** | [**Permission**](Permission.md) | | [optional] +**private** | **bool** | | [optional] +**projects_mode** | **str** | | [optional] +**release_counter** | **int** | | [optional] +**repo_transfer** | [**RepoTransfer**](RepoTransfer.md) | | [optional] +**size** | **int** | | [optional] +**ssh_url** | **str** | | [optional] +**stars_count** | **int** | | [optional] +**template** | **bool** | | [optional] +**topics** | **list[str]** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [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..d938256 --- /dev/null +++ b/docs/RepositoryApi.md @@ -0,0 +1,14424 @@ +# gitea.RepositoryApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**accept_repo_transfer**](RepositoryApi.md#accept_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer +[**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 +[**create_repo_variable**](RepositoryApi.md#create_repo_variable) | **POST** /repos/{owner}/{repo}/actions/variables/{variablename} | Create a repo-level variable +[**delete_repo_secret**](RepositoryApi.md#delete_repo_secret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository +[**delete_repo_variable**](RepositoryApi.md#delete_repo_variable) | **DELETE** /repos/{owner}/{repo}/actions/variables/{variablename} | Delete a repo-level variable +[**generate_repo**](RepositoryApi.md#generate_repo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template +[**get_annotated_tag**](RepositoryApi.md#get_annotated_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +[**get_blob**](RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +[**get_repo_variable**](RepositoryApi.md#get_repo_variable) | **GET** /repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable +[**get_repo_variables_list**](RepositoryApi.md#get_repo_variables_list) | **GET** /repos/{owner}/{repo}/actions/variables | Get repo-level variables list +[**get_tree**](RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +[**list_action_tasks**](RepositoryApi.md#list_action_tasks) | **GET** /repos/{owner}/{repo}/actions/tasks | List a repository's action tasks +[**list_forks**](RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +[**reject_repo_transfer**](RepositoryApi.md#reject_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/reject | Reject a repo transfer +[**repo_add_collaborator**](RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add or Update a collaborator to a repository +[**repo_add_push_mirror**](RepositoryApi.md#repo_add_push_mirror) | **POST** /repos/{owner}/{repo}/push_mirrors | add a push mirror to the repository +[**repo_add_team**](RepositoryApi.md#repo_add_team) | **PUT** /repos/{owner}/{repo}/teams/{team} | Add a team to a repository +[**repo_add_topic**](RepositoryApi.md#repo_add_topic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository +[**repo_apply_diff_patch**](RepositoryApi.md#repo_apply_diff_patch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository +[**repo_cancel_scheduled_auto_merge**](RepositoryApi.md#repo_cancel_scheduled_auto_merge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request +[**repo_change_files**](RepositoryApi.md#repo_change_files) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in 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_check_team**](RepositoryApi.md#repo_check_team) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository +[**repo_compare_diff**](RepositoryApi.md#repo_compare_diff) | **GET** /repos/{owner}/{repo}/compare/{basehead} | Get commit comparison information +[**repo_create_branch**](RepositoryApi.md#repo_create_branch) | **POST** /repos/{owner}/{repo}/branches | Create a branch +[**repo_create_branch_protection**](RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository +[**repo_create_file**](RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in 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_pull_review**](RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request +[**repo_create_pull_review_requests**](RepositoryApi.md#repo_create_pull_review_requests) | **POST** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | create review requests for 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_create_tag**](RepositoryApi.md#repo_create_tag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository +[**repo_create_tag_protection**](RepositoryApi.md#repo_create_tag_protection) | **POST** /repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository +[**repo_create_wiki_page**](RepositoryApi.md#repo_create_wiki_page) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page +[**repo_delete**](RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +[**repo_delete_avatar**](RepositoryApi.md#repo_delete_avatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete avatar +[**repo_delete_branch**](RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository +[**repo_delete_branch_protection**](RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository +[**repo_delete_collaborator**](RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository +[**repo_delete_file**](RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository +[**repo_delete_git_hook**](RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in 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_pull_review**](RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request +[**repo_delete_pull_review_requests**](RepositoryApi.md#repo_delete_pull_review_requests) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | cancel review requests for a pull request +[**repo_delete_push_mirror**](RepositoryApi.md#repo_delete_push_mirror) | **DELETE** /repos/{owner}/{repo}/push_mirrors/{name} | deletes a push mirror from a repository by remoteName +[**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_delete_release_by_tag**](RepositoryApi.md#repo_delete_release_by_tag) | **DELETE** /repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name +[**repo_delete_tag**](RepositoryApi.md#repo_delete_tag) | **DELETE** /repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name +[**repo_delete_tag_protection**](RepositoryApi.md#repo_delete_tag_protection) | **DELETE** /repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository +[**repo_delete_team**](RepositoryApi.md#repo_delete_team) | **DELETE** /repos/{owner}/{repo}/teams/{team} | Delete a team from a repository +[**repo_delete_topic**](RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository +[**repo_delete_wiki_page**](RepositoryApi.md#repo_delete_wiki_page) | **DELETE** /repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page +[**repo_dismiss_pull_review**](RepositoryApi.md#repo_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals | Dismiss a review for a pull request +[**repo_download_commit_diff_or_patch**](RepositoryApi.md#repo_download_commit_diff_or_patch) | **GET** /repos/{owner}/{repo}/git/commits/{sha}.{diffType} | Get a commit's diff or patch +[**repo_download_pull_diff_or_patch**](RepositoryApi.md#repo_download_pull_diff_or_patch) | **GET** /repos/{owner}/{repo}/pulls/{index}.{diffType} | Get a pull request diff or patch +[**repo_edit**](RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +[**repo_edit_branch_protection**](RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed +[**repo_edit_git_hook**](RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository +[**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. If using deadline only the date will be taken into account, and time of day ignored. +[**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_edit_tag_protection**](RepositoryApi.md#repo_edit_tag_protection) | **PATCH** /repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed +[**repo_edit_wiki_page**](RepositoryApi.md#repo_edit_wiki_page) | **PATCH** /repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page +[**repo_get**](RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository +[**repo_get_all_commits**](RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository +[**repo_get_archive**](RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository +[**repo_get_assignees**](RepositoryApi.md#repo_get_assignees) | **GET** /repos/{owner}/{repo}/assignees | Return all users that have write access and can be assigned to issues +[**repo_get_branch**](RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection +[**repo_get_branch_protection**](RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the 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}/status | Get a commit's combined status, by branch/tag/commit reference +[**repo_get_commit_pull_request**](RepositoryApi.md#repo_get_commit_pull_request) | **GET** /repos/{owner}/{repo}/commits/{sha}/pull | Get the merged pull request of the commit +[**repo_get_contents**](RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir +[**repo_get_contents_list**](RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir +[**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_git_hook**](RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook +[**repo_get_hook**](RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +[**repo_get_issue_config**](RepositoryApi.md#repo_get_issue_config) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo +[**repo_get_issue_templates**](RepositoryApi.md#repo_get_issue_templates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository +[**repo_get_key**](RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id +[**repo_get_languages**](RepositoryApi.md#repo_get_languages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written +[**repo_get_latest_release**](RepositoryApi.md#repo_get_latest_release) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at +[**repo_get_licenses**](RepositoryApi.md#repo_get_licenses) | **GET** /repos/{owner}/{repo}/licenses | Get repo licenses +[**repo_get_note**](RepositoryApi.md#repo_get_note) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository +[**repo_get_pull_request**](RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +[**repo_get_pull_request_by_base_head**](RepositoryApi.md#repo_get_pull_request_by_base_head) | **GET** /repos/{owner}/{repo}/pulls/{base}/{head} | Get a pull request by base and head +[**repo_get_pull_request_commits**](RepositoryApi.md#repo_get_pull_request_commits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request +[**repo_get_pull_request_files**](RepositoryApi.md#repo_get_pull_request_files) | **GET** /repos/{owner}/{repo}/pulls/{index}/files | Get changed files for a pull request +[**repo_get_pull_review**](RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request +[**repo_get_pull_review_comments**](RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request +[**repo_get_push_mirror_by_remote_name**](RepositoryApi.md#repo_get_push_mirror_by_remote_name) | **GET** /repos/{owner}/{repo}/push_mirrors/{name} | Get push mirror of the repository by remoteName +[**repo_get_raw_file**](RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository +[**repo_get_raw_file_or_lfs**](RepositoryApi.md#repo_get_raw_file_or_lfs) | **GET** /repos/{owner}/{repo}/media/{filepath} | Get a file or it's LFS object 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_get_release_by_tag**](RepositoryApi.md#repo_get_release_by_tag) | **GET** /repos/{owner}/{repo}/releases/tags/{tag} | Get a release by tag name +[**repo_get_repo_permissions**](RepositoryApi.md#repo_get_repo_permissions) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator}/permission | Get repository permissions for a user +[**repo_get_reviewers**](RepositoryApi.md#repo_get_reviewers) | **GET** /repos/{owner}/{repo}/reviewers | Return all users that can be requested to review in this repo +[**repo_get_runner_registration_token**](RepositoryApi.md#repo_get_runner_registration_token) | **GET** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token +[**repo_get_single_commit**](RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +[**repo_get_tag**](RepositoryApi.md#repo_get_tag) | **GET** /repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name +[**repo_get_tag_protection**](RepositoryApi.md#repo_get_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository +[**repo_get_wiki_page**](RepositoryApi.md#repo_get_wiki_page) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page +[**repo_get_wiki_page_revisions**](RepositoryApi.md#repo_get_wiki_page_revisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page +[**repo_get_wiki_pages**](RepositoryApi.md#repo_get_wiki_pages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages +[**repo_list_actions_secrets**](RepositoryApi.md#repo_list_actions_secrets) | **GET** /repos/{owner}/{repo}/actions/secrets | List an repo's actions secrets +[**repo_list_activity_feeds**](RepositoryApi.md#repo_list_activity_feeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds +[**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_branch_protection**](RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository +[**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_hooks**](RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository +[**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_pinned_issues**](RepositoryApi.md#repo_list_pinned_issues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues +[**repo_list_pinned_pull_requests**](RepositoryApi.md#repo_list_pinned_pull_requests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests +[**repo_list_pull_requests**](RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests +[**repo_list_pull_reviews**](RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request +[**repo_list_push_mirrors**](RepositoryApi.md#repo_list_push_mirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository +[**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_statuses_by_ref**](RepositoryApi.md#repo_list_statuses_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference +[**repo_list_subscribers**](RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +[**repo_list_tag_protection**](RepositoryApi.md#repo_list_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections | List tag protections for a repository +[**repo_list_tags**](RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +[**repo_list_teams**](RepositoryApi.md#repo_list_teams) | **GET** /repos/{owner}/{repo}/teams | List a repository's teams +[**repo_list_topics**](RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has +[**repo_merge_pull_request**](RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +[**repo_merge_upstream**](RepositoryApi.md#repo_merge_upstream) | **POST** /repos/{owner}/{repo}/merge-upstream | Merge a branch from upstream +[**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_new_pin_allowed**](RepositoryApi.md#repo_new_pin_allowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed +[**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_push_mirror_sync**](RepositoryApi.md#repo_push_mirror_sync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository +[**repo_search**](RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories +[**repo_signing_key**](RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository +[**repo_submit_pull_review**](RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request +[**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 +[**repo_transfer**](RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership +[**repo_un_dismiss_pull_review**](RepositoryApi.md#repo_un_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request +[**repo_update_avatar**](RepositoryApi.md#repo_update_avatar) | **POST** /repos/{owner}/{repo}/avatar | Update avatar +[**repo_update_branch**](RepositoryApi.md#repo_update_branch) | **PATCH** /repos/{owner}/{repo}/branches/{branch} | Update a branch +[**repo_update_branch_protection_priories**](RepositoryApi.md#repo_update_branch_protection_priories) | **POST** /repos/{owner}/{repo}/branch_protections/priority | Update the priorities of branch protections for a repository. +[**repo_update_file**](RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository +[**repo_update_pull_request**](RepositoryApi.md#repo_update_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch +[**repo_update_topics**](RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository +[**repo_validate_issue_config**](RepositoryApi.md#repo_validate_issue_config) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config +[**topic_search**](RepositoryApi.md#topic_search) | **GET** /topics/search | search topics via keyword +[**update_repo_secret**](RepositoryApi.md#update_repo_secret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository +[**update_repo_variable**](RepositoryApi.md#update_repo_variable) | **PUT** /repos/{owner}/{repo}/actions/variables/{variablename} | Update a repo-level variable +[**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 +[**user_tracked_times**](RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo + + +# **accept_repo_transfer** +> Repository accept_repo_transfer(owner, repo) + +Accept a repo transfer + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to transfer +repo = 'repo_example' # str | name of the repo to transfer + +try: + # Accept a repo transfer + api_response = api_instance.accept_repo_transfer(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->accept_repo_transfer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to transfer | + **repo** | **str**| name of the repo to transfer | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **create_current_user_repo** +> Repository create_current_user_repo(body=body) + +Create a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to fork +repo = 'repo_example' # str | name of the repo to fork +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **create_repo_variable** +> create_repo_variable(owner, repo, variablename, body=body) + +Create a repo-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | name of the owner +repo = 'repo_example' # str | name of the repository +variablename = 'variablename_example' # str | name of the variable +body = gitea.CreateVariableOption() # CreateVariableOption | (optional) + +try: + # Create a repo-level variable + api_instance.create_repo_variable(owner, repo, variablename, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->create_repo_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| name of the owner | + **repo** | **str**| name of the repository | + **variablename** | **str**| name of the variable | + **body** | [**CreateVariableOption**](CreateVariableOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **delete_repo_secret** +> delete_repo_secret(owner, repo, secretname) + +Delete a secret in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +secretname = 'secretname_example' # str | name of the secret + +try: + # Delete a secret in a repository + api_instance.delete_repo_secret(owner, repo, secretname) +except ApiException as e: + print("Exception when calling RepositoryApi->delete_repo_secret: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **secretname** | **str**| name of the secret | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **delete_repo_variable** +> ActionVariable delete_repo_variable(owner, repo, variablename) + +Delete a repo-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | name of the owner +repo = 'repo_example' # str | name of the repository +variablename = 'variablename_example' # str | name of the variable + +try: + # Delete a repo-level variable + api_response = api_instance.delete_repo_variable(owner, repo, variablename) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->delete_repo_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| name of the owner | + **repo** | **str**| name of the repository | + **variablename** | **str**| name of the variable | + +### Return type + +[**ActionVariable**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **generate_repo** +> Repository generate_repo(template_owner, template_repo, body=body) + +Create a repository using a template + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +template_owner = 'template_owner_example' # str | name of the template repository owner +template_repo = 'template_repo_example' # str | name of the template repository +body = gitea.GenerateRepoOption() # GenerateRepoOption | (optional) + +try: + # Create a repository using a template + api_response = api_instance.generate_repo(template_owner, template_repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->generate_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_owner** | **str**| name of the template repository owner | + **template_repo** | **str**| name of the template repository | + **body** | [**GenerateRepoOption**](GenerateRepoOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **get_annotated_tag** +> AnnotatedTag get_annotated_tag(owner, repo, sha) + +Gets the tag object of an annotated tag (not lightweight tags) + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 tag. The Git tags API only supports annotated tag objects, not lightweight tags. + +try: + # Gets the tag object of an annotated tag (not lightweight tags) + api_response = api_instance.get_annotated_tag(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_annotated_tag: %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 tag. The Git tags API only supports annotated tag objects, not lightweight tags. | + +### Return type + +[**AnnotatedTag**](AnnotatedTag.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_blob** +> GitBlobResponse get_blob(owner, repo, sha) + +Gets the blob of a repository. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 blob of a repository. + api_response = api_instance.get_blob(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_blob: %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 + +[**GitBlobResponse**](GitBlobResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_repo_variable** +> ActionVariable get_repo_variable(owner, repo, variablename) + +Get a repo-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | name of the owner +repo = 'repo_example' # str | name of the repository +variablename = 'variablename_example' # str | name of the variable + +try: + # Get a repo-level variable + api_response = api_instance.get_repo_variable(owner, repo, variablename) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_repo_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| name of the owner | + **repo** | **str**| name of the repository | + **variablename** | **str**| name of the variable | + +### Return type + +[**ActionVariable**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_repo_variables_list** +> list[ActionVariable] get_repo_variables_list(owner, repo, page=page, limit=limit) + +Get repo-level variables list + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | name of the owner +repo = 'repo_example' # str | name of the repository +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get repo-level variables list + api_response = api_instance.get_repo_variables_list(owner, repo, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_repo_variables_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| name of the owner | + **repo** | **str**| name of the repository | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[ActionVariable]**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, recursive=recursive, page=page, per_page=per_page) + +Gets the tree of a repository. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +recursive = true # bool | show all directories and files (optional) +page = 56 # int | page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page (optional) +per_page = 56 # int | number of items per page (optional) + +try: + # Gets the tree of a repository. + api_response = api_instance.get_tree(owner, repo, sha, recursive=recursive, page=page, per_page=per_page) + 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 | + **recursive** | **bool**| show all directories and files | [optional] + **page** | **int**| page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page | [optional] + **per_page** | **int**| number of items per page | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_action_tasks** +> ActionTaskResponse list_action_tasks(owner, repo, page=page, limit=limit) + +List a repository's action tasks + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, default maximum page size is 50 (optional) + +try: + # List a repository's action tasks + api_response = api_instance.list_action_tasks(owner, repo, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->list_action_tasks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, default maximum page size is 50 | [optional] + +### Return type + +[**ActionTaskResponse**](ActionTaskResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a repository's forks + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repository's forks + api_response = api_instance.list_forks(owner, repo, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **reject_repo_transfer** +> Repository reject_repo_transfer(owner, repo) + +Reject a repo transfer + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to transfer +repo = 'repo_example' # str | name of the repo to transfer + +try: + # Reject a repo transfer + api_response = api_instance.reject_repo_transfer(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->reject_repo_transfer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to transfer | + **repo** | **str**| name of the repo to transfer | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 or Update a collaborator to a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 = gitea.AddCollaboratorOption() # AddCollaboratorOption | (optional) + +try: + # Add or Update 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), [TOTPHeader](../README.md#TOTPHeader), [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_push_mirror** +> PushMirror repo_add_push_mirror(owner, repo, body=body) + +add a push mirror to the repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.CreatePushMirrorOption() # CreatePushMirrorOption | (optional) + +try: + # add a push mirror to the repository + api_response = api_instance.repo_add_push_mirror(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_add_push_mirror: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreatePushMirrorOption**](CreatePushMirrorOption.md)| | [optional] + +### Return type + +[**PushMirror**](PushMirror.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_add_team** +> repo_add_team(owner, repo, team) + +Add a team to a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +team = 'team_example' # str | team name + +try: + # Add a team to a repository + api_instance.repo_add_team(owner, repo, team) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_add_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **team** | **str**| team name | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_topic** +> repo_add_topic(owner, repo, topic) + +Add a topic to a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +topic = 'topic_example' # str | name of the topic to add + +try: + # Add a topic to a repository + api_instance.repo_add_topic(owner, repo, topic) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_add_topic: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **topic** | **str**| name of the topic 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), [TOTPHeader](../README.md#TOTPHeader), [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_apply_diff_patch** +> FileResponse repo_apply_diff_patch(owner, repo, body) + +Apply diff patch to repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.UpdateFileOptions() # UpdateFileOptions | + +try: + # Apply diff patch to repository + api_response = api_instance.repo_apply_diff_patch(owner, repo, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_apply_diff_patch: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**UpdateFileOptions**](UpdateFileOptions.md)| | + +### Return type + +[**FileResponse**](FileResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_cancel_scheduled_auto_merge** +> repo_cancel_scheduled_auto_merge(owner, repo, index) + +Cancel the scheduled auto merge for the given pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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: + # Cancel the scheduled auto merge for the given pull request + api_instance.repo_cancel_scheduled_auto_merge(owner, repo, index) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_cancel_scheduled_auto_merge: %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), [TOTPHeader](../README.md#TOTPHeader), [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_change_files** +> FilesResponse repo_change_files(owner, repo, body) + +Modify multiple files in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.ChangeFilesOptions() # ChangeFilesOptions | + +try: + # Modify multiple files in a repository + api_response = api_instance.repo_change_files(owner, repo, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_change_files: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**ChangeFilesOptions**](ChangeFilesOptions.md)| | + +### Return type + +[**FilesResponse**](FilesResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_team** +> Team repo_check_team(owner, repo, team) + +Check if a team is assigned to a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +team = 'team_example' # str | team name + +try: + # Check if a team is assigned to a repository + api_response = api_instance.repo_check_team(owner, repo, team) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_check_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **team** | **str**| team name | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_compare_diff** +> Compare repo_compare_diff(owner, repo, basehead) + +Get commit comparison information + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +basehead = 'basehead_example' # str | compare two branches or commits + +try: + # Get commit comparison information + api_response = api_instance.repo_compare_diff(owner, repo, basehead) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_compare_diff: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **basehead** | **str**| compare two branches or commits | + +### Return type + +[**Compare**](Compare.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_branch** +> Branch repo_create_branch(owner, repo, body=body) + +Create a branch + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.CreateBranchRepoOption() # CreateBranchRepoOption | (optional) + +try: + # Create a branch + api_response = api_instance.repo_create_branch(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_branch: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateBranchRepoOption**](CreateBranchRepoOption.md)| | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_branch_protection** +> BranchProtection repo_create_branch_protection(owner, repo, body=body) + +Create a branch protections for a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.CreateBranchProtectionOption() # CreateBranchProtectionOption | (optional) + +try: + # Create a branch protections for a repository + api_response = api_instance.repo_create_branch_protection(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateBranchProtectionOption**](CreateBranchProtectionOption.md)| | [optional] + +### Return type + +[**BranchProtection**](BranchProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_file** +> FileResponse repo_create_file(owner, repo, filepath, body) + +Create a file in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | path of the file to create +body = gitea.CreateFileOptions() # CreateFileOptions | + +try: + # Create a file in a repository + api_response = api_instance.repo_create_file(owner, repo, filepath, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| path of the file to create | + **body** | [**CreateFileOptions**](CreateFileOptions.md)| | + +### Return type + +[**FileResponse**](FileResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_hook** +> Hook repo_create_hook(owner, repo, body=body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.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 + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_review** +> PullReview repo_create_pull_review(owner, repo, index, body) + +Create a review to an pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +body = gitea.CreatePullReviewOptions() # CreatePullReviewOptions | + +try: + # Create a review to an pull request + api_response = api_instance.repo_create_pull_review(owner, repo, index, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_pull_review: %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 | + **body** | [**CreatePullReviewOptions**](CreatePullReviewOptions.md)| | + +### Return type + +[**PullReview**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_pull_review_requests** +> list[PullReview] repo_create_pull_review_requests(owner, repo, index, body) + +create review requests for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +body = gitea.PullReviewRequestOptions() # PullReviewRequestOptions | + +try: + # create review requests for a pull request + api_response = api_instance.repo_create_pull_review_requests(owner, repo, index, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_pull_review_requests: %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 | + **body** | [**PullReviewRequestOptions**](PullReviewRequestOptions.md)| | + +### Return type + +[**list[PullReview]**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_release** +> Release repo_create_release(owner, repo, body=body) + +Create a release + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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, name=name, attachment=attachment) + +Create a release attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +name = 'name_example' # str | name of the attachment (optional) +attachment = '/path/to/file.txt' # file | attachment to upload (optional) + +try: + # Create a release attachment + api_response = api_instance.repo_create_release_attachment(owner, repo, id, name=name, attachment=attachment) + 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 | + **name** | **str**| name of the attachment | [optional] + **attachment** | **file**| attachment to upload | [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), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: multipart/form-data, application/octet-stream + - **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** +> CommitStatus repo_create_status(owner, repo, sha, body=body) + +Create a commit status + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 = gitea.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 + +[**CommitStatus**](CommitStatus.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_tag** +> Tag repo_create_tag(owner, repo, body=body) + +Create a new git tag in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.CreateTagOption() # CreateTagOption | (optional) + +try: + # Create a new git tag in a repository + api_response = api_instance.repo_create_tag(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateTagOption**](CreateTagOption.md)| | [optional] + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_tag_protection** +> TagProtection repo_create_tag_protection(owner, repo, body=body) + +Create a tag protections for a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.CreateTagProtectionOption() # CreateTagProtectionOption | (optional) + +try: + # Create a tag protections for a repository + api_response = api_instance.repo_create_tag_protection(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_tag_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateTagProtectionOption**](CreateTagProtectionOption.md)| | [optional] + +### Return type + +[**TagProtection**](TagProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_wiki_page** +> WikiPage repo_create_wiki_page(owner, repo, body=body) + +Create a wiki page + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.CreateWikiPageOptions() # CreateWikiPageOptions | (optional) + +try: + # Create a wiki page + api_response = api_instance.repo_create_wiki_page(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_wiki_page: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateWikiPageOptions**](CreateWikiPageOptions.md)| | [optional] + +### Return type + +[**WikiPage**](WikiPage.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **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** +> repo_delete(owner, repo) + +Delete a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_avatar** +> repo_delete_avatar(owner, repo) + +Delete avatar + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Delete avatar + api_instance.repo_delete_avatar(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_avatar: %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), [TOTPHeader](../README.md#TOTPHeader), [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_branch** +> repo_delete_branch(owner, repo, branch) + +Delete a specific branch from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +branch = 'branch_example' # str | branch to delete + +try: + # Delete a specific branch from a repository + api_instance.repo_delete_branch(owner, repo, branch) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_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 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), [TOTPHeader](../README.md#TOTPHeader), [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_branch_protection** +> repo_delete_branch_protection(owner, repo, name) + +Delete a specific branch protection for the repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +name = 'name_example' # str | name of protected branch + +try: + # Delete a specific branch protection for the repository + api_instance.repo_delete_branch_protection(owner, repo, name) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **name** | **str**| name of protected branch | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_file** +> FileDeleteResponse repo_delete_file(owner, repo, filepath, body) + +Delete a file in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | path of the file to delete +body = gitea.DeleteFileOptions() # DeleteFileOptions | + +try: + # Delete a file in a repository + api_response = api_instance.repo_delete_file(owner, repo, filepath, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| path of the file to delete | + **body** | [**DeleteFileOptions**](DeleteFileOptions.md)| | + +### Return type + +[**FileDeleteResponse**](FileDeleteResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_delete_git_hook** +> repo_delete_git_hook(owner, repo, id) + +Delete a Git hook in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 'id_example' # str | id of the hook to get + +try: + # Delete a Git hook in a repository + api_instance.repo_delete_git_hook(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_git_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **str**| id of the hook 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_pull_review** +> repo_delete_pull_review(owner, repo, index, id) + +Delete a specific review from a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +id = 789 # int | id of the review + +try: + # Delete a specific review from a pull request + api_instance.repo_delete_pull_review(owner, repo, index, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_pull_review: %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 | + **id** | **int**| id of the review | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_pull_review_requests** +> repo_delete_pull_review_requests(owner, repo, index, body) + +cancel review requests for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +body = gitea.PullReviewRequestOptions() # PullReviewRequestOptions | + +try: + # cancel review requests for a pull request + api_instance.repo_delete_pull_review_requests(owner, repo, index, body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_pull_review_requests: %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 | + **body** | [**PullReviewRequestOptions**](PullReviewRequestOptions.md)| | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_push_mirror** +> repo_delete_push_mirror(owner, repo, name) + +deletes a push mirror from a repository by remoteName + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +name = 'name_example' # str | remote name of the pushMirror + +try: + # deletes a push mirror from a repository by remoteName + api_instance.repo_delete_push_mirror(owner, repo, name) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_push_mirror: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **name** | **str**| remote name of the pushMirror | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_release** +> repo_delete_release(owner, repo, id) + +Delete a release + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_release_by_tag** +> repo_delete_release_by_tag(owner, repo, tag) + +Delete a release by tag name + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +tag = 'tag_example' # str | tag name of the release to delete + +try: + # Delete a release by tag name + api_instance.repo_delete_release_by_tag(owner, repo, tag) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_release_by_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **tag** | **str**| tag name 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), [TOTPHeader](../README.md#TOTPHeader), [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_tag** +> repo_delete_tag(owner, repo, tag) + +Delete a repository's tag by name + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +tag = 'tag_example' # str | name of tag to delete + +try: + # Delete a repository's tag by name + api_instance.repo_delete_tag(owner, repo, tag) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **tag** | **str**| name of tag 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), [TOTPHeader](../README.md#TOTPHeader), [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_tag_protection** +> repo_delete_tag_protection(owner, repo, id) + +Delete a specific tag protection for the repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 56 # int | id of protected tag + +try: + # Delete a specific tag protection for the repository + api_instance.repo_delete_tag_protection(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_tag_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of protected tag | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_team** +> repo_delete_team(owner, repo, team) + +Delete a team from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +team = 'team_example' # str | team name + +try: + # Delete a team from a repository + api_instance.repo_delete_team(owner, repo, team) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **team** | **str**| team name | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_topic** +> repo_delete_topic(owner, repo, topic) + +Delete a topic from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +topic = 'topic_example' # str | name of the topic to delete + +try: + # Delete a topic from a repository + api_instance.repo_delete_topic(owner, repo, topic) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_topic: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **topic** | **str**| name of the topic 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), [TOTPHeader](../README.md#TOTPHeader), [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_wiki_page** +> repo_delete_wiki_page(owner, repo, page_name) + +Delete a wiki page + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page_name = 'page_name_example' # str | name of the page + +try: + # Delete a wiki page + api_instance.repo_delete_wiki_page(owner, repo, page_name) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_wiki_page: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page_name** | **str**| name of the page | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_dismiss_pull_review** +> PullReview repo_dismiss_pull_review(owner, repo, index, id, body) + +Dismiss a review for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +id = 789 # int | id of the review +body = gitea.DismissPullReviewOptions() # DismissPullReviewOptions | + +try: + # Dismiss a review for a pull request + api_response = api_instance.repo_dismiss_pull_review(owner, repo, index, id, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_dismiss_pull_review: %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 | + **id** | **int**| id of the review | + **body** | [**DismissPullReviewOptions**](DismissPullReviewOptions.md)| | + +### Return type + +[**PullReview**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_download_commit_diff_or_patch** +> str repo_download_commit_diff_or_patch(owner, repo, sha, diff_type) + +Get a commit's diff or patch + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 to get +diff_type = 'diff_type_example' # str | whether the output is diff or patch + +try: + # Get a commit's diff or patch + api_response = api_instance.repo_download_commit_diff_or_patch(owner, repo, sha, diff_type) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_download_commit_diff_or_patch: %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 to get | + **diff_type** | **str**| whether the output is diff or patch | + +### Return type + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: text/plain + +[[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_download_pull_diff_or_patch** +> str repo_download_pull_diff_or_patch(owner, repo, index, diff_type, binary=binary) + +Get a pull request diff or patch + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +diff_type = 'diff_type_example' # str | whether the output is diff or patch +binary = true # bool | whether to include binary file changes. if true, the diff is applicable with `git apply` (optional) + +try: + # Get a pull request diff or patch + api_response = api_instance.repo_download_pull_diff_or_patch(owner, repo, index, diff_type, binary=binary) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_download_pull_diff_or_patch: %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 | + **diff_type** | **str**| whether the output is diff or patch | + **binary** | **bool**| whether to include binary file changes. if true, the diff is applicable with `git apply` | [optional] + +### Return type + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: text/plain + +[[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** +> Repository repo_edit(owner, repo, body=body) + +Edit a repository's properties. Only fields that are set will be changed. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to edit +repo = 'repo_example' # str | name of the repo to edit +body = gitea.EditRepoOption() # EditRepoOption | Properties of a repo that you can edit (optional) + +try: + # Edit a repository's properties. Only fields that are set will be changed. + api_response = api_instance.repo_edit(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to edit | + **repo** | **str**| name of the repo to edit | + **body** | [**EditRepoOption**](EditRepoOption.md)| Properties of a repo that you can edit | [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), [TOTPHeader](../README.md#TOTPHeader), [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_branch_protection** +> BranchProtection repo_edit_branch_protection(owner, repo, name, body=body) + +Edit a branch protections for a repository. Only fields that are set will be changed + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +name = 'name_example' # str | name of protected branch +body = gitea.EditBranchProtectionOption() # EditBranchProtectionOption | (optional) + +try: + # Edit a branch protections for a repository. Only fields that are set will be changed + api_response = api_instance.repo_edit_branch_protection(owner, repo, name, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **name** | **str**| name of protected branch | + **body** | [**EditBranchProtectionOption**](EditBranchProtectionOption.md)| | [optional] + +### Return type + +[**BranchProtection**](BranchProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_git_hook** +> GitHook repo_edit_git_hook(owner, repo, id, body=body) + +Edit a Git hook in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 'id_example' # str | id of the hook to get +body = gitea.EditGitHookOption() # EditGitHookOption | (optional) + +try: + # Edit a Git hook in a repository + api_response = api_instance.repo_edit_git_hook(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_git_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **str**| id of the hook to get | + **body** | [**EditGitHookOption**](EditGitHookOption.md)| | [optional] + +### Return type + +[**GitHook**](GitHook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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** +> Hook repo_edit_hook(owner, repo, id, body=body) + +Edit a hook in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 = gitea.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 + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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. 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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 = gitea.EditPullRequestOption() # EditPullRequestOption | (optional) + +try: + # Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. + 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_tag_protection** +> TagProtection repo_edit_tag_protection(owner, repo, id, body=body) + +Edit a tag protections for a repository. Only fields that are set will be changed + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 56 # int | id of protected tag +body = gitea.EditTagProtectionOption() # EditTagProtectionOption | (optional) + +try: + # Edit a tag protections for a repository. Only fields that are set will be changed + api_response = api_instance.repo_edit_tag_protection(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_tag_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of protected tag | + **body** | [**EditTagProtectionOption**](EditTagProtectionOption.md)| | [optional] + +### Return type + +[**TagProtection**](TagProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_wiki_page** +> WikiPage repo_edit_wiki_page(owner, repo, page_name, body=body) + +Edit a wiki page + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page_name = 'page_name_example' # str | name of the page +body = gitea.CreateWikiPageOptions() # CreateWikiPageOptions | (optional) + +try: + # Edit a wiki page + api_response = api_instance.repo_edit_wiki_page(owner, repo, page_name, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_wiki_page: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page_name** | **str**| name of the page | + **body** | [**CreateWikiPageOptions**](CreateWikiPageOptions.md)| | [optional] + +### Return type + +[**WikiPage**](WikiPage.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **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_get** +> Repository repo_get(owner, repo) + +Get a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_all_commits** +> list[Commit] repo_get_all_commits(owner, repo, sha=sha, path=path, stat=stat, verification=verification, files=files, page=page, limit=limit, _not=_not) + +Get a list of all commits from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +sha = 'sha_example' # str | SHA or branch to start listing commits from (usually 'master') (optional) +path = 'path_example' # str | filepath of a file/dir (optional) +stat = true # bool | include diff stats for every commit (disable for speedup, default 'true') (optional) +verification = true # bool | include verification for every commit (disable for speedup, default 'true') (optional) +files = true # bool | include a list of affected files for every commit (disable for speedup, default 'true') (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (ignored if used with 'path') (optional) +_not = '_not_example' # str | commits that match the given specifier will not be listed. (optional) + +try: + # Get a list of all commits from a repository + api_response = api_instance.repo_get_all_commits(owner, repo, sha=sha, path=path, stat=stat, verification=verification, files=files, page=page, limit=limit, _not=_not) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_all_commits: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| SHA or branch to start listing commits from (usually 'master') | [optional] + **path** | **str**| filepath of a file/dir | [optional] + **stat** | **bool**| include diff stats for every commit (disable for speedup, default 'true') | [optional] + **verification** | **bool**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **bool**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results (ignored if used with 'path') | [optional] + **_not** | **str**| commits that match the given specifier will not be listed. | [optional] + +### Return type + +[**list[Commit]**](Commit.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +archive = 'archive_example' # str | the git reference for download with attached archive format (e.g. master.zip) + +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**| the git reference for download with attached archive format (e.g. master.zip) | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_assignees** +> list[User] repo_get_assignees(owner, repo) + +Return all users that have write access and can be assigned to issues + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Return all users that have write access and can be assigned to issues + api_response = api_instance.repo_get_assignees(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_assignees: %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), [TOTPHeader](../README.md#TOTPHeader), [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, including its effective branch protection + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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, including its effective branch protection + 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), [TOTPHeader](../README.md#TOTPHeader), [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_protection** +> BranchProtection repo_get_branch_protection(owner, repo, name) + +Get a specific branch protection for the repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +name = 'name_example' # str | name of protected branch + +try: + # Get a specific branch protection for the repository + api_response = api_instance.repo_get_branch_protection(owner, repo, name) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **name** | **str**| name of protected branch | + +### Return type + +[**BranchProtection**](BranchProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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** +> CombinedStatus repo_get_combined_status_by_ref(owner, repo, ref, page=page, limit=limit) + +Get a commit's combined status, by branch/tag/commit reference + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +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, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**CombinedStatus**](CombinedStatus.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_commit_pull_request** +> PullRequest repo_get_commit_pull_request(owner, repo, sha) + +Get the merged pull request of the commit + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 to get + +try: + # Get the merged pull request of the commit + api_response = api_instance.repo_get_commit_pull_request(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_commit_pull_request: %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 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), [TOTPHeader](../README.md#TOTPHeader), [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_contents** +> ContentsResponse repo_get_contents(owner, repo, filepath, ref=ref) + +Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | path of the dir, file, symlink or submodule in the repo +ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) + +try: + # Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir + api_response = api_instance.repo_get_contents(owner, repo, filepath, ref=ref) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_contents: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| path of the dir, file, symlink or submodule in the repo | + **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] + +### Return type + +[**ContentsResponse**](ContentsResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_contents_list** +> list[ContentsResponse] repo_get_contents_list(owner, repo, ref=ref) + +Gets the metadata of all the entries of the root dir + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) + +try: + # Gets the metadata of all the entries of the root dir + api_response = api_instance.repo_get_contents_list(owner, repo, ref=ref) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_contents_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] + +### Return type + +[**list[ContentsResponse]**](ContentsResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, ref=ref) + +Get the EditorConfig definitions of a file in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) + +try: + # Get the EditorConfig definitions of a file in a repository + api_instance.repo_get_editor_config(owner, repo, filepath, ref=ref) +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 | + **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [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), [TOTPHeader](../README.md#TOTPHeader), [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_git_hook** +> GitHook repo_get_git_hook(owner, repo, id) + +Get a Git hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 'id_example' # str | id of the hook to get + +try: + # Get a Git hook + api_response = api_instance.repo_get_git_hook(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_git_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **str**| id of the hook to get | + +### Return type + +[**GitHook**](GitHook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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** +> Hook repo_get_hook(owner, repo, id) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_issue_config** +> IssueConfig repo_get_issue_config(owner, repo) + +Returns the issue config for a repo + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Returns the issue config for a repo + api_response = api_instance.repo_get_issue_config(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_issue_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**IssueConfig**](IssueConfig.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_issue_templates** +> list[IssueTemplate] repo_get_issue_templates(owner, repo) + +Get available issue templates for a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get available issue templates for a repository + api_response = api_instance.repo_get_issue_templates(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_issue_templates: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[IssueTemplate]**](IssueTemplate.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_languages** +> dict(str, int) repo_get_languages(owner, repo) + +Get languages and number of bytes of code written + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get languages and number of bytes of code written + api_response = api_instance.repo_get_languages(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_languages: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +**dict(str, int)** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_latest_release** +> Release repo_get_latest_release(owner, repo) + +Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at + api_response = api_instance.repo_get_latest_release(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_latest_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_licenses** +> list[str] repo_get_licenses(owner, repo) + +Get repo licenses + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get repo licenses + api_response = api_instance.repo_get_licenses(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_licenses: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +**list[str]** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_note** +> Note repo_get_note(owner, repo, sha, verification=verification, files=files) + +Get a note corresponding to a single commit from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +sha = 'sha_example' # str | a git ref or commit sha +verification = true # bool | include verification for every commit (disable for speedup, default 'true') (optional) +files = true # bool | include a list of affected files for every commit (disable for speedup, default 'true') (optional) + +try: + # Get a note corresponding to a single commit from a repository + api_response = api_instance.repo_get_note(owner, repo, sha, verification=verification, files=files) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_note: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| a git ref or commit sha | + **verification** | **bool**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **bool**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] + +### Return type + +[**Note**](Note.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_by_base_head** +> PullRequest repo_get_pull_request_by_base_head(owner, repo, base, head) + +Get a pull request by base and head + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +base = 'base_example' # str | base of the pull request to get +head = 'head_example' # str | head of the pull request to get + +try: + # Get a pull request by base and head + api_response = api_instance.repo_get_pull_request_by_base_head(owner, repo, base, head) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_pull_request_by_base_head: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **base** | **str**| base of the pull request to get | + **head** | **str**| head 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), [TOTPHeader](../README.md#TOTPHeader), [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_commits** +> list[Commit] repo_get_pull_request_commits(owner, repo, index, page=page, limit=limit, verification=verification, files=files) + +Get commits for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) +verification = true # bool | include verification for every commit (disable for speedup, default 'true') (optional) +files = true # bool | include a list of affected files for every commit (disable for speedup, default 'true') (optional) + +try: + # Get commits for a pull request + api_response = api_instance.repo_get_pull_request_commits(owner, repo, index, page=page, limit=limit, verification=verification, files=files) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_pull_request_commits: %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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + **verification** | **bool**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **bool**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] + +### Return type + +[**list[Commit]**](Commit.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_files** +> list[ChangedFile] repo_get_pull_request_files(owner, repo, index, skip_to=skip_to, whitespace=whitespace, page=page, limit=limit) + +Get changed files for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +skip_to = 'skip_to_example' # str | skip to given file (optional) +whitespace = 'whitespace_example' # str | whitespace behavior (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get changed files for a pull request + api_response = api_instance.repo_get_pull_request_files(owner, repo, index, skip_to=skip_to, whitespace=whitespace, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_pull_request_files: %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 | + **skip_to** | **str**| skip to given file | [optional] + **whitespace** | **str**| whitespace behavior | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[ChangedFile]**](ChangedFile.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_review** +> PullReview repo_get_pull_review(owner, repo, index, id) + +Get a specific review for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +id = 789 # int | id of the review + +try: + # Get a specific review for a pull request + api_response = api_instance.repo_get_pull_review(owner, repo, index, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_pull_review: %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 | + **id** | **int**| id of the review | + +### Return type + +[**PullReview**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_review_comments** +> list[PullReviewComment] repo_get_pull_review_comments(owner, repo, index, id) + +Get a specific review for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +id = 789 # int | id of the review + +try: + # Get a specific review for a pull request + api_response = api_instance.repo_get_pull_review_comments(owner, repo, index, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_pull_review_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 pull request | + **id** | **int**| id of the review | + +### Return type + +[**list[PullReviewComment]**](PullReviewComment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_push_mirror_by_remote_name** +> PushMirror repo_get_push_mirror_by_remote_name(owner, repo, name) + +Get push mirror of the repository by remoteName + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +name = 'name_example' # str | remote name of push mirror + +try: + # Get push mirror of the repository by remoteName + api_response = api_instance.repo_get_push_mirror_by_remote_name(owner, repo, name) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_push_mirror_by_remote_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **name** | **str**| remote name of push mirror | + +### Return type + +[**PushMirror**](PushMirror.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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** +> file repo_get_raw_file(owner, repo, filepath, ref=ref) + +Get a file from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch +ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (optional) + +try: + # Get a file from a repository + api_response = api_instance.repo_get_raw_file(owner, repo, filepath, ref=ref) + pprint(api_response) +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**| path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch | + **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch | [optional] + +### Return type + +[**file**](file.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/octet-stream + +[[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_or_lfs** +> file repo_get_raw_file_or_lfs(owner, repo, filepath, ref=ref) + +Get a file or it's LFS object from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch +ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (optional) + +try: + # Get a file or it's LFS object from a repository + api_response = api_instance.repo_get_raw_file_or_lfs(owner, repo, filepath, ref=ref) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_raw_file_or_lfs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch | + **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch | [optional] + +### Return type + +[**file**](file.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/octet-stream + +[[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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_by_tag** +> Release repo_get_release_by_tag(owner, repo, tag) + +Get a release by tag name + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +tag = 'tag_example' # str | tag name of the release to get + +try: + # Get a release by tag name + api_response = api_instance.repo_get_release_by_tag(owner, repo, tag) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_release_by_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **tag** | **str**| tag name 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), [TOTPHeader](../README.md#TOTPHeader), [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_repo_permissions** +> RepoCollaboratorPermission repo_get_repo_permissions(owner, repo, collaborator) + +Get repository permissions for a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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: + # Get repository permissions for a user + api_response = api_instance.repo_get_repo_permissions(owner, repo, collaborator) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_repo_permissions: %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 + +[**RepoCollaboratorPermission**](RepoCollaboratorPermission.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_reviewers** +> list[User] repo_get_reviewers(owner, repo) + +Return all users that can be requested to review in this repo + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Return all users that can be requested to review in this repo + api_response = api_instance.repo_get_reviewers(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_reviewers: %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), [TOTPHeader](../README.md#TOTPHeader), [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_runner_registration_token** +> repo_get_runner_registration_token(owner, repo) + +Get a repository's actions runner registration token + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get a repository's actions runner registration token + api_instance.repo_get_runner_registration_token(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_runner_registration_token: %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), [TOTPHeader](../README.md#TOTPHeader), [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_single_commit** +> Commit repo_get_single_commit(owner, repo, sha, stat=stat, verification=verification, files=files) + +Get a single commit from a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +sha = 'sha_example' # str | a git ref or commit sha +stat = true # bool | include diff stats for every commit (disable for speedup, default 'true') (optional) +verification = true # bool | include verification for every commit (disable for speedup, default 'true') (optional) +files = true # bool | include a list of affected files for every commit (disable for speedup, default 'true') (optional) + +try: + # Get a single commit from a repository + api_response = api_instance.repo_get_single_commit(owner, repo, sha, stat=stat, verification=verification, files=files) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_single_commit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| a git ref or commit sha | + **stat** | **bool**| include diff stats for every commit (disable for speedup, default 'true') | [optional] + **verification** | **bool**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **bool**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] + +### Return type + +[**Commit**](Commit.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_tag** +> Tag repo_get_tag(owner, repo, tag) + +Get the tag of a repository by tag name + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +tag = 'tag_example' # str | name of tag + +try: + # Get the tag of a repository by tag name + api_response = api_instance.repo_get_tag(owner, repo, tag) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **tag** | **str**| name of tag | + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_tag_protection** +> TagProtection repo_get_tag_protection(owner, repo, id) + +Get a specific tag protection for the repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 56 # int | id of the tag protect to get + +try: + # Get a specific tag protection for the repository + api_response = api_instance.repo_get_tag_protection(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_tag_protection: %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 tag protect to get | + +### Return type + +[**TagProtection**](TagProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_wiki_page** +> WikiPage repo_get_wiki_page(owner, repo, page_name) + +Get a wiki page + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page_name = 'page_name_example' # str | name of the page + +try: + # Get a wiki page + api_response = api_instance.repo_get_wiki_page(owner, repo, page_name) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_wiki_page: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page_name** | **str**| name of the page | + +### Return type + +[**WikiPage**](WikiPage.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_wiki_page_revisions** +> WikiCommitList repo_get_wiki_page_revisions(owner, repo, page_name, page=page) + +Get revisions of a wiki page + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page_name = 'page_name_example' # str | name of the page +page = 56 # int | page number of results to return (1-based) (optional) + +try: + # Get revisions of a wiki page + api_response = api_instance.repo_get_wiki_page_revisions(owner, repo, page_name, page=page) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_wiki_page_revisions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page_name** | **str**| name of the page | + **page** | **int**| page number of results to return (1-based) | [optional] + +### Return type + +[**WikiCommitList**](WikiCommitList.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_wiki_pages** +> list[WikiPageMetaData] repo_get_wiki_pages(owner, repo, page=page, limit=limit) + +Get all wiki pages + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get all wiki pages + api_response = api_instance.repo_get_wiki_pages(owner, repo, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_wiki_pages: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[WikiPageMetaData]**](WikiPageMetaData.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_actions_secrets** +> list[Secret] repo_list_actions_secrets(owner, repo, page=page, limit=limit) + +List an repo's actions secrets + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List an repo's actions secrets + api_response = api_instance.repo_list_actions_secrets(owner, repo, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_actions_secrets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Secret]**](Secret.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_activity_feeds** +> list[Activity] repo_list_activity_feeds(owner, repo, _date=_date, page=page, limit=limit) + +List a repository's activity feeds + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +_date = '2013-10-20' # date | the date of the activities to be found (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repository's activity feeds + api_response = api_instance.repo_list_activity_feeds(owner, repo, _date=_date, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_activity_feeds: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **_date** | **date**| the date of the activities to be found | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Activity]**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_branch_protection** +> list[BranchProtection] repo_list_branch_protection(owner, repo) + +List branch protections for a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List branch protections for a repository + api_response = api_instance.repo_list_branch_protection(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[BranchProtection]**](BranchProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a repository's branches + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repository's branches + api_response = api_instance.repo_list_branches(owner, repo, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a repository's collaborators + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repository's collaborators + api_response = api_instance.repo_list_collaborators(owner, repo, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_hooks** +> list[GitHook] repo_list_git_hooks(owner, repo) + +List the Git hooks in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List the Git hooks in a repository + api_response = api_instance.repo_list_git_hooks(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_git_hooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[GitHook]**](GitHook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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[Hook] repo_list_hooks(owner, repo, page=page, limit=limit) + +List the hooks in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the hooks in a repository + api_response = api_instance.repo_list_hooks(owner, repo, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Hook]**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a repository's keys + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repository's keys + api_response = api_instance.repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint, page=page, limit=limit) + 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] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_pinned_issues** +> list[Issue] repo_list_pinned_issues(owner, repo) + +List a repo's pinned issues + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repo's pinned issues + api_response = api_instance.repo_list_pinned_issues(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_pinned_issues: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_pinned_pull_requests** +> list[PullRequest] repo_list_pinned_pull_requests(owner, repo) + +List a repo's pinned pull requests + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repo's pinned pull requests + api_response = api_instance.repo_list_pinned_pull_requests(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_pinned_pull_requests: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, state=state, sort=sort, milestone=milestone, labels=labels, poster=poster, page=page, limit=limit) + +List a repo's pull requests + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | Owner of the repo +repo = 'repo_example' # str | Name of the repo +state = 'open' # str | State of pull request (optional) (default to open) +sort = 'sort_example' # str | Type of sort (optional) +milestone = 789 # int | ID of the milestone (optional) +labels = [56] # list[int] | Label IDs (optional) +poster = 'poster_example' # str | Filter by pull request author (optional) +page = 1 # int | Page number of results to return (1-based) (optional) (default to 1) +limit = 56 # int | Page size of results (optional) + +try: + # List a repo's pull requests + api_response = api_instance.repo_list_pull_requests(owner, repo, state=state, sort=sort, milestone=milestone, labels=labels, poster=poster, page=page, limit=limit) + 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 | + **state** | **str**| State of pull request | [optional] [default to open] + **sort** | **str**| Type of sort | [optional] + **milestone** | **int**| ID of the milestone | [optional] + **labels** | [**list[int]**](int.md)| Label IDs | [optional] + **poster** | **str**| Filter by pull request author | [optional] + **page** | **int**| Page number of results to return (1-based) | [optional] [default to 1] + **limit** | **int**| Page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_reviews** +> list[PullReview] repo_list_pull_reviews(owner, repo, index, page=page, limit=limit) + +List all reviews for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List all reviews for a pull request + api_response = api_instance.repo_list_pull_reviews(owner, repo, index, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_pull_reviews: %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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[PullReview]**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_push_mirrors** +> list[PushMirror] repo_list_push_mirrors(owner, repo, page=page, limit=limit) + +Get all push mirrors of the repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get all push mirrors of the repository + api_response = api_instance.repo_list_push_mirrors(owner, repo, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_push_mirrors: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[PushMirror]**](PushMirror.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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, draft=draft, pre_release=pre_release, page=page, limit=limit) + +List a repo's releases + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +draft = true # bool | filter (exclude / include) drafts, if you dont have repo write access none will show (optional) +pre_release = true # bool | filter (exclude / include) pre-releases (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repo's releases + api_response = api_instance.repo_list_releases(owner, repo, draft=draft, pre_release=pre_release, page=page, limit=limit) + 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 | + **draft** | **bool**| filter (exclude / include) drafts, if you dont have repo write access none will show | [optional] + **pre_release** | **bool**| filter (exclude / include) pre-releases | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a repo's stargazers + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repo's stargazers + api_response = api_instance.repo_list_stargazers(owner, repo, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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[CommitStatus] repo_list_statuses(owner, repo, sha, sort=sort, state=state, page=page, limit=limit) + +Get a commit's statuses + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +sort = 'sort_example' # str | type of sort (optional) +state = 'state_example' # str | type of state (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get a commit's statuses + api_response = api_instance.repo_list_statuses(owner, repo, sha, sort=sort, state=state, page=page, limit=limit) + 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 | + **sort** | **str**| type of sort | [optional] + **state** | **str**| type of state | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[CommitStatus]**](CommitStatus.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_by_ref** +> list[CommitStatus] repo_list_statuses_by_ref(owner, repo, ref, sort=sort, state=state, page=page, limit=limit) + +Get a commit's statuses, by branch/tag/commit reference + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +sort = 'sort_example' # str | type of sort (optional) +state = 'state_example' # str | type of state (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get a commit's statuses, by branch/tag/commit reference + api_response = api_instance.repo_list_statuses_by_ref(owner, repo, ref, sort=sort, state=state, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_statuses_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 | + **sort** | **str**| type of sort | [optional] + **state** | **str**| type of state | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[CommitStatus]**](CommitStatus.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List a repo's watchers + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repo's watchers + api_response = api_instance.repo_list_subscribers(owner, repo, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_tag_protection** +> list[TagProtection] repo_list_tag_protection(owner, repo) + +List tag protections for a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List tag protections for a repository + api_response = api_instance.repo_list_tag_protection(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_tag_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[TagProtection]**](TagProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_tags** +> list[Tag] repo_list_tags(owner, repo, page=page, limit=limit) + +List a repository's tags + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, default maximum page size is 50 (optional) + +try: + # List a repository's tags + api_response = api_instance.repo_list_tags(owner, repo, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_tags: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, default maximum page size is 50 | [optional] + +### Return type + +[**list[Tag]**](Tag.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_teams** +> list[Team] repo_list_teams(owner, repo) + +List a repository's teams + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repository's teams + api_response = api_instance.repo_list_teams(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_teams: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_topics** +> TopicName repo_list_topics(owner, repo, page=page, limit=limit) + +Get list of topics that a repository has + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get list of topics that a repository has + api_response = api_instance.repo_list_topics(owner, repo, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_topics: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**TopicName**](TopicName.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, body=body) + +Merge a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +body = gitea.MergePullRequestOption() # MergePullRequestOption | (optional) + +try: + # Merge a pull request + api_instance.repo_merge_pull_request(owner, repo, index, body=body) +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 | + **body** | [**MergePullRequestOption**](MergePullRequestOption.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), [TOTPHeader](../README.md#TOTPHeader), [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_upstream** +> MergeUpstreamResponse repo_merge_upstream(owner, repo, body=body) + +Merge a branch from upstream + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.MergeUpstreamRequest() # MergeUpstreamRequest | (optional) + +try: + # Merge a branch from upstream + api_response = api_instance.repo_merge_upstream(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_merge_upstream: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**MergeUpstreamRequest**](MergeUpstreamRequest.md)| | [optional] + +### Return type + +[**MergeUpstreamResponse**](MergeUpstreamResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +body = gitea.MigrateRepoOptions() # MigrateRepoOptions | (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** | [**MigrateRepoOptions**](MigrateRepoOptions.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_new_pin_allowed** +> NewIssuePinsAllowed repo_new_pin_allowed(owner, repo) + +Returns if new Issue Pins are allowed + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Returns if new Issue Pins are allowed + api_response = api_instance.repo_new_pin_allowed(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_new_pin_allowed: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**NewIssuePinsAllowed**](NewIssuePinsAllowed.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_push_mirror_sync** +> repo_push_mirror_sync(owner, repo) + +Sync all push mirrored repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to sync +repo = 'repo_example' # str | name of the repo to sync + +try: + # Sync all push mirrored repository + api_instance.repo_push_mirror_sync(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_push_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), [TOTPHeader](../README.md#TOTPHeader), [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, topic=topic, include_desc=include_desc, uid=uid, priority_owner_id=priority_owner_id, team_id=team_id, starred_by=starred_by, private=private, is_private=is_private, template=template, archived=archived, mode=mode, exclusive=exclusive, sort=sort, order=order, page=page, limit=limit) + +Search for repositories + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +q = 'q_example' # str | keyword (optional) +topic = true # bool | Limit search to repositories with keyword as topic (optional) +include_desc = true # bool | include search of keyword within repository description (optional) +uid = 789 # int | search only for repos that the user with the given id owns or contributes to (optional) +priority_owner_id = 789 # int | repo owner to prioritize in the results (optional) +team_id = 789 # int | search only for repos that belong to the given team id (optional) +starred_by = 789 # int | search only for repos that the user with the given id has starred (optional) +private = true # bool | include private repositories this user has access to (defaults to true) (optional) +is_private = true # bool | show only pubic, private or all repositories (defaults to all) (optional) +template = true # bool | include template repositories this user has access to (defaults to true) (optional) +archived = true # bool | show only archived, non-archived or all repositories (defaults to all) (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\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" 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) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Search for repositories + api_response = api_instance.repo_search(q=q, topic=topic, include_desc=include_desc, uid=uid, priority_owner_id=priority_owner_id, team_id=team_id, starred_by=starred_by, private=private, is_private=is_private, template=template, archived=archived, mode=mode, exclusive=exclusive, sort=sort, order=order, page=page, limit=limit) + 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] + **topic** | **bool**| Limit search to repositories with keyword as topic | [optional] + **include_desc** | **bool**| include search of keyword within repository description | [optional] + **uid** | **int**| search only for repos that the user with the given id owns or contributes to | [optional] + **priority_owner_id** | **int**| repo owner to prioritize in the results | [optional] + **team_id** | **int**| search only for repos that belong to the given team id | [optional] + **starred_by** | **int**| search only for repos that the user with the given id has starred | [optional] + **private** | **bool**| include private repositories this user has access to (defaults to true) | [optional] + **is_private** | **bool**| show only pubic, private or all repositories (defaults to all) | [optional] + **template** | **bool**| include template repositories this user has access to (defaults to true) | [optional] + **archived** | **bool**| show only archived, non-archived or all repositories (defaults to all) | [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\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" 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] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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_signing_key** +> str repo_signing_key(owner, repo) + +Get signing-key.gpg for given repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get signing-key.gpg for given repository + api_response = api_instance.repo_signing_key(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_signing_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: text/plain + +[[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_submit_pull_review** +> PullReview repo_submit_pull_review(owner, repo, index, id, body) + +Submit a pending review to an pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +id = 789 # int | id of the review +body = gitea.SubmitPullReviewOptions() # SubmitPullReviewOptions | + +try: + # Submit a pending review to an pull request + api_response = api_instance.repo_submit_pull_review(owner, repo, index, id, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_submit_pull_review: %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 | + **id** | **int**| id of the review | + **body** | [**SubmitPullReviewOptions**](SubmitPullReviewOptions.md)| | + +### Return type + +[**PullReview**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, ref=ref) + +Test a push webhook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +ref = 'ref_example' # str | The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. (optional) + +try: + # Test a push webhook + api_instance.repo_test_hook(owner, repo, id, ref=ref) +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 | + **ref** | **str**| The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. | [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), [TOTPHeader](../README.md#TOTPHeader), [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, user=user, since=since, before=before, page=page, limit=limit) + +List a repo's tracked times + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +user = 'user_example' # str | optional filter by user (available for issue managers) (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a repo's tracked times + api_response = api_instance.repo_tracked_times(owner, repo, user=user, since=since, before=before, page=page, limit=limit) + 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 | + **user** | **str**| optional filter by user (available for issue managers) | [optional] + **since** | **datetime**| Only show times updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show times updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_transfer** +> Repository repo_transfer(owner, repo, body) + +Transfer a repo ownership + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to transfer +repo = 'repo_example' # str | name of the repo to transfer +body = gitea.TransferRepoOption() # TransferRepoOption | Transfer Options + +try: + # Transfer a repo ownership + api_response = api_instance.repo_transfer(owner, repo, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_transfer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to transfer | + **repo** | **str**| name of the repo to transfer | + **body** | [**TransferRepoOption**](TransferRepoOption.md)| Transfer Options | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_un_dismiss_pull_review** +> PullReview repo_un_dismiss_pull_review(owner, repo, index, id) + +Cancel to dismiss a review for a pull request + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +id = 789 # int | id of the review + +try: + # Cancel to dismiss a review for a pull request + api_response = api_instance.repo_un_dismiss_pull_review(owner, repo, index, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_un_dismiss_pull_review: %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 | + **id** | **int**| id of the review | + +### Return type + +[**PullReview**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_update_avatar** +> repo_update_avatar(owner, repo, body=body) + +Update avatar + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.UpdateRepoAvatarOption() # UpdateRepoAvatarOption | (optional) + +try: + # Update avatar + api_instance.repo_update_avatar(owner, repo, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_avatar: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**UpdateRepoAvatarOption**](UpdateRepoAvatarOption.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), [TOTPHeader](../README.md#TOTPHeader), [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_update_branch** +> repo_update_branch(owner, repo, branch, body=body) + +Update a branch + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +branch = 'branch_example' # str | name of the branch +body = gitea.UpdateBranchRepoOption() # UpdateBranchRepoOption | (optional) + +try: + # Update a branch + api_instance.repo_update_branch(owner, repo, branch, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_branch: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **branch** | **str**| name of the branch | + **body** | [**UpdateBranchRepoOption**](UpdateBranchRepoOption.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), [TOTPHeader](../README.md#TOTPHeader), [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_update_branch_protection_priories** +> repo_update_branch_protection_priories(owner, repo, body=body) + +Update the priorities of branch protections for a repository. + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.UpdateBranchProtectionPriories() # UpdateBranchProtectionPriories | (optional) + +try: + # Update the priorities of branch protections for a repository. + api_instance.repo_update_branch_protection_priories(owner, repo, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_branch_protection_priories: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**UpdateBranchProtectionPriories**](UpdateBranchProtectionPriories.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), [TOTPHeader](../README.md#TOTPHeader), [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_update_file** +> FileResponse repo_update_file(owner, repo, filepath, body) + +Update a file in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | path of the file to update +body = gitea.UpdateFileOptions() # UpdateFileOptions | + +try: + # Update a file in a repository + api_response = api_instance.repo_update_file(owner, repo, filepath, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| path of the file to update | + **body** | [**UpdateFileOptions**](UpdateFileOptions.md)| | + +### Return type + +[**FileResponse**](FileResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_update_pull_request** +> repo_update_pull_request(owner, repo, index, style=style) + +Merge PR's baseBranch into headBranch + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 +style = 'style_example' # str | how to update pull request (optional) + +try: + # Merge PR's baseBranch into headBranch + api_instance.repo_update_pull_request(owner, repo, index, style=style) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_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 | + **style** | **str**| how to update pull request | [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), [TOTPHeader](../README.md#TOTPHeader), [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_update_topics** +> repo_update_topics(owner, repo, body=body) + +Replace list of topics for a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = gitea.RepoTopicOptions() # RepoTopicOptions | (optional) + +try: + # Replace list of topics for a repository + api_instance.repo_update_topics(owner, repo, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_topics: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**RepoTopicOptions**](RepoTopicOptions.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), [TOTPHeader](../README.md#TOTPHeader), [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_validate_issue_config** +> IssueConfigValidation repo_validate_issue_config(owner, repo) + +Returns the validation information for a issue config + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Returns the validation information for a issue config + api_response = api_instance.repo_validate_issue_config(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_validate_issue_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**IssueConfigValidation**](IssueConfigValidation.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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** +> list[TopicResponse] topic_search(q, page=page, limit=limit) + +search topics via keyword + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +q = 'q_example' # str | keywords to search +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # search topics via keyword + api_response = api_instance.topic_search(q, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[TopicResponse]**](TopicResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **update_repo_secret** +> update_repo_secret(owner, repo, secretname, body=body) + +Create or Update a secret value in a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +secretname = 'secretname_example' # str | name of the secret +body = gitea.CreateOrUpdateSecretOption() # CreateOrUpdateSecretOption | (optional) + +try: + # Create or Update a secret value in a repository + api_instance.update_repo_secret(owner, repo, secretname, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->update_repo_secret: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **secretname** | **str**| name of the secret | + **body** | [**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **update_repo_variable** +> update_repo_variable(owner, repo, variablename, body=body) + +Update a repo-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.ApiClient(configuration)) +owner = 'owner_example' # str | name of the owner +repo = 'repo_example' # str | name of the repository +variablename = 'variablename_example' # str | name of the variable +body = gitea.UpdateVariableOption() # UpdateVariableOption | (optional) + +try: + # Update a repo-level variable + api_instance.update_repo_variable(owner, repo, variablename, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->update_repo_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| name of the owner | + **repo** | **str**| name of the repository | + **variablename** | **str**| name of the variable | + **body** | [**UpdateVariableOption**](UpdateVariableOption.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.RepositoryApi(gitea.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 RepositoryApi->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), [TOTPHeader](../README.md#TOTPHeader), [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/RepositoryMeta.md b/docs/RepositoryMeta.md new file mode 100644 index 0000000..b55d458 --- /dev/null +++ b/docs/RepositoryMeta.md @@ -0,0 +1,13 @@ +# RepositoryMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**full_name** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**owner** | **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/ReviewStateType.md b/docs/ReviewStateType.md new file mode 100644 index 0000000..e821757 --- /dev/null +++ b/docs/ReviewStateType.md @@ -0,0 +1,9 @@ +# ReviewStateType + +## 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/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/Secret.md b/docs/Secret.md new file mode 100644 index 0000000..51bbf95 --- /dev/null +++ b/docs/Secret.md @@ -0,0 +1,11 @@ +# Secret + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | [optional] +**name** | **str** | the secret's name | [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/SettingsApi.md b/docs/SettingsApi.md new file mode 100644 index 0000000..b8e7c92 --- /dev/null +++ b/docs/SettingsApi.md @@ -0,0 +1,320 @@ +# gitea.SettingsApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_general_api_settings**](SettingsApi.md#get_general_api_settings) | **GET** /settings/api | Get instance's global settings for api +[**get_general_attachment_settings**](SettingsApi.md#get_general_attachment_settings) | **GET** /settings/attachment | Get instance's global settings for Attachment +[**get_general_repository_settings**](SettingsApi.md#get_general_repository_settings) | **GET** /settings/repository | Get instance's global settings for repositories +[**get_general_ui_settings**](SettingsApi.md#get_general_ui_settings) | **GET** /settings/ui | Get instance's global settings for ui + + +# **get_general_api_settings** +> GeneralAPISettings get_general_api_settings() + +Get instance's global settings for api + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.SettingsApi(gitea.ApiClient(configuration)) + +try: + # Get instance's global settings for api + api_response = api_instance.get_general_api_settings() + pprint(api_response) +except ApiException as e: + print("Exception when calling SettingsApi->get_general_api_settings: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GeneralAPISettings**](GeneralAPISettings.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_general_attachment_settings** +> GeneralAttachmentSettings get_general_attachment_settings() + +Get instance's global settings for Attachment + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.SettingsApi(gitea.ApiClient(configuration)) + +try: + # Get instance's global settings for Attachment + api_response = api_instance.get_general_attachment_settings() + pprint(api_response) +except ApiException as e: + print("Exception when calling SettingsApi->get_general_attachment_settings: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GeneralAttachmentSettings**](GeneralAttachmentSettings.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_general_repository_settings** +> GeneralRepoSettings get_general_repository_settings() + +Get instance's global settings for repositories + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.SettingsApi(gitea.ApiClient(configuration)) + +try: + # Get instance's global settings for repositories + api_response = api_instance.get_general_repository_settings() + pprint(api_response) +except ApiException as e: + print("Exception when calling SettingsApi->get_general_repository_settings: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GeneralRepoSettings**](GeneralRepoSettings.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_general_ui_settings** +> GeneralUISettings get_general_ui_settings() + +Get instance's global settings for ui + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.SettingsApi(gitea.ApiClient(configuration)) + +try: + # Get instance's global settings for ui + api_response = api_instance.get_general_ui_settings() + pprint(api_response) +except ApiException as e: + print("Exception when calling SettingsApi->get_general_ui_settings: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GeneralUISettings**](GeneralUISettings.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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/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/StopWatch.md b/docs/StopWatch.md new file mode 100644 index 0000000..c991284 --- /dev/null +++ b/docs/StopWatch.md @@ -0,0 +1,16 @@ +# StopWatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**duration** | **str** | | [optional] +**issue_index** | **int** | | [optional] +**issue_title** | **str** | | [optional] +**repo_name** | **str** | | [optional] +**repo_owner_name** | **str** | | [optional] +**seconds** | **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/SubmitPullReviewOptions.md b/docs/SubmitPullReviewOptions.md new file mode 100644 index 0000000..ce1dbd7 --- /dev/null +++ b/docs/SubmitPullReviewOptions.md @@ -0,0 +1,11 @@ +# SubmitPullReviewOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**event** | [**ReviewStateType**](ReviewStateType.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/Tag.md b/docs/Tag.md new file mode 100644 index 0000000..2ceeb1b --- /dev/null +++ b/docs/Tag.md @@ -0,0 +1,15 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**CommitMeta**](CommitMeta.md) | | [optional] +**id** | **str** | | [optional] +**message** | **str** | | [optional] +**name** | **str** | | [optional] +**tarball_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/TagProtection.md b/docs/TagProtection.md new file mode 100644 index 0000000..eb81665 --- /dev/null +++ b/docs/TagProtection.md @@ -0,0 +1,15 @@ +# TagProtection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | [optional] +**id** | **int** | | [optional] +**name_pattern** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**whitelist_teams** | **list[str]** | | [optional] +**whitelist_usernames** | **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/Team.md b/docs/Team.md new file mode 100644 index 0000000..f223795 --- /dev/null +++ b/docs/Team.md @@ -0,0 +1,18 @@ +# Team + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_org_repo** | **bool** | | [optional] +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**includes_all_repositories** | **bool** | | [optional] +**name** | **str** | | [optional] +**organization** | [**Organization**](Organization.md) | | [optional] +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] +**units_map** | **dict(str, 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/TimelineComment.md b/docs/TimelineComment.md new file mode 100644 index 0000000..f0aa4c4 --- /dev/null +++ b/docs/TimelineComment.md @@ -0,0 +1,38 @@ +# TimelineComment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | [**User**](User.md) | | [optional] +**assignee_team** | [**Team**](Team.md) | | [optional] +**body** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**dependent_issue** | [**Issue**](Issue.md) | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**issue_url** | **str** | | [optional] +**label** | [**Label**](Label.md) | | [optional] +**milestone** | [**Milestone**](Milestone.md) | | [optional] +**new_ref** | **str** | | [optional] +**new_title** | **str** | | [optional] +**old_milestone** | [**Milestone**](Milestone.md) | | [optional] +**old_project_id** | **int** | | [optional] +**old_ref** | **str** | | [optional] +**old_title** | **str** | | [optional] +**project_id** | **int** | | [optional] +**pull_request_url** | **str** | | [optional] +**ref_action** | **str** | | [optional] +**ref_comment** | [**Comment**](Comment.md) | | [optional] +**ref_commit_sha** | **str** | commit SHA where issue/PR was referenced | [optional] +**ref_issue** | [**Issue**](Issue.md) | | [optional] +**removed_assignee** | **bool** | whether the assignees were removed or added | [optional] +**resolve_doer** | [**User**](User.md) | | [optional] +**review_id** | **int** | | [optional] +**tracked_time** | [**TrackedTime**](TrackedTime.md) | | [optional] +**type** | **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/TopicName.md b/docs/TopicName.md new file mode 100644 index 0000000..ca4b554 --- /dev/null +++ b/docs/TopicName.md @@ -0,0 +1,10 @@ +# TopicName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topics** | **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/TopicResponse.md b/docs/TopicResponse.md new file mode 100644 index 0000000..1014faf --- /dev/null +++ b/docs/TopicResponse.md @@ -0,0 +1,14 @@ +# TopicResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**repo_count** | **int** | | [optional] +**topic_name** | **str** | | [optional] +**updated** | **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/TrackedTime.md b/docs/TrackedTime.md new file mode 100644 index 0000000..26521f6 --- /dev/null +++ b/docs/TrackedTime.md @@ -0,0 +1,16 @@ +# TrackedTime + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**issue** | [**Issue**](Issue.md) | | [optional] +**issue_id** | **int** | deprecated (only for backwards compatibility) | [optional] +**time** | **int** | Time in seconds | [optional] +**user_id** | **int** | deprecated (only for backwards compatibility) | [optional] +**user_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/TransferRepoOption.md b/docs/TransferRepoOption.md new file mode 100644 index 0000000..a8599fe --- /dev/null +++ b/docs/TransferRepoOption.md @@ -0,0 +1,11 @@ +# TransferRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_owner** | **str** | | +**team_ids** | **list[int]** | ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. | [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/UpdateBranchProtectionPriories.md b/docs/UpdateBranchProtectionPriories.md new file mode 100644 index 0000000..8c07101 --- /dev/null +++ b/docs/UpdateBranchProtectionPriories.md @@ -0,0 +1,10 @@ +# UpdateBranchProtectionPriories + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **list[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/UpdateBranchRepoOption.md b/docs/UpdateBranchRepoOption.md new file mode 100644 index 0000000..cdfbb51 --- /dev/null +++ b/docs/UpdateBranchRepoOption.md @@ -0,0 +1,10 @@ +# UpdateBranchRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | New branch name | + +[[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/UpdateFileOptions.md b/docs/UpdateFileOptions.md new file mode 100644 index 0000000..14763ef --- /dev/null +++ b/docs/UpdateFileOptions.md @@ -0,0 +1,19 @@ +# UpdateFileOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**content** | **str** | content must be base64 encoded | +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**from_path** | **str** | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional] +**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**sha** | **str** | sha is the SHA for the file that already exists | +**signoff** | **bool** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [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/UpdateRepoAvatarOption.md b/docs/UpdateRepoAvatarOption.md new file mode 100644 index 0000000..9bc4891 --- /dev/null +++ b/docs/UpdateRepoAvatarOption.md @@ -0,0 +1,10 @@ +# UpdateRepoAvatarOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | **str** | image must be base64 encoded | [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/UpdateUserAvatarOption.md b/docs/UpdateUserAvatarOption.md new file mode 100644 index 0000000..8dcf0ad --- /dev/null +++ b/docs/UpdateUserAvatarOption.md @@ -0,0 +1,10 @@ +# UpdateUserAvatarOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | **str** | image must be base64 encoded | [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/UpdateVariableOption.md b/docs/UpdateVariableOption.md new file mode 100644 index 0000000..c7f07d7 --- /dev/null +++ b/docs/UpdateVariableOption.md @@ -0,0 +1,11 @@ +# UpdateVariableOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | New name for the variable. If the field is empty, the variable name won't be updated. | [optional] +**value** | **str** | Value of the variable to update | + +[[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..b03d68b --- /dev/null +++ b/docs/User.md @@ -0,0 +1,31 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | Is user active | [optional] +**avatar_url** | **str** | URL to the user's avatar | [optional] +**created** | **datetime** | | [optional] +**description** | **str** | the user's description | [optional] +**email** | **str** | | [optional] +**followers_count** | **int** | user counts | [optional] +**following_count** | **int** | | [optional] +**full_name** | **str** | the user's full name | [optional] +**html_url** | **str** | URL to the user's gitea page | [optional] +**id** | **int** | the user's id | [optional] +**is_admin** | **bool** | Is the user an administrator | [optional] +**language** | **str** | User locale | [optional] +**last_login** | **datetime** | | [optional] +**location** | **str** | the user's location | [optional] +**login** | **str** | the user's username | [optional] +**login_name** | **str** | the user's authentication sign-in name. | [optional] [default to 'empty'] +**prohibit_login** | **bool** | Is user login prohibited | [optional] +**restricted** | **bool** | Is user restricted | [optional] +**source_id** | **int** | The ID of the user's Authentication Source | [optional] +**starred_repos_count** | **int** | | [optional] +**visibility** | **str** | User visibility level option: public, limited, private | [optional] +**website** | **str** | the user's website | [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..1dda777 --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,5802 @@ +# gitea.UserApi + +All URIs are relative to *https://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_current_user_repo**](UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +[**create_user_variable**](UserApi.md#create_user_variable) | **POST** /user/actions/variables/{variablename} | Create a user-level variable +[**delete_user_secret**](UserApi.md#delete_user_secret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope +[**delete_user_variable**](UserApi.md#delete_user_variable) | **DELETE** /user/actions/variables/{variablename} | Delete a user-level variable which is created by current doer +[**get_user_settings**](UserApi.md#get_user_settings) | **GET** /user/settings | Get user settings +[**get_user_variable**](UserApi.md#get_user_variable) | **GET** /user/actions/variables/{variablename} | Get a user-level variable which is created by current doer +[**get_user_variables_list**](UserApi.md#get_user_variables_list) | **GET** /user/actions/variables | Get the user-level list of variables which is created by current doer +[**get_verification_token**](UserApi.md#get_verification_token) | **GET** /user/gpg_key_token | Get a Token to verify +[**update_user_secret**](UserApi.md#update_user_secret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope +[**update_user_settings**](UserApi.md#update_user_settings) | **PATCH** /user/settings | Update user settings +[**update_user_variable**](UserApi.md#update_user_variable) | **PUT** /user/actions/variables/{variablename} | Update a user-level variable which is created by current doer +[**user_add_email**](UserApi.md#user_add_email) | **POST** /user/emails | Add email addresses +[**user_block_user**](UserApi.md#user_block_user) | **PUT** /user/blocks/{username} | Block a user +[**user_check_following**](UserApi.md#user_check_following) | **GET** /users/{username}/following/{target} | Check if one user is following another user +[**user_check_user_block**](UserApi.md#user_check_user_block) | **GET** /user/blocks/{username} | Check if a user is blocked by the authenticated user +[**user_create_hook**](UserApi.md#user_create_hook) | **POST** /user/hooks | Create a hook +[**user_create_o_auth2_application**](UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | creates a new OAuth2 application +[**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 +[**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_avatar**](UserApi.md#user_delete_avatar) | **DELETE** /user/avatar | Delete Avatar +[**user_delete_email**](UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses +[**user_delete_hook**](UserApi.md#user_delete_hook) | **DELETE** /user/hooks/{id} | Delete a hook +[**user_delete_o_auth2_application**](UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | delete an OAuth2 Application +[**user_edit_hook**](UserApi.md#user_edit_hook) | **PATCH** /user/hooks/{id} | Update a hook +[**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_hook**](UserApi.md#user_get_hook) | **GET** /user/hooks/{id} | Get a hook +[**user_get_o_auth2_application**](UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | get an OAuth2 Application +[**user_get_oauth2_application**](UserApi.md#user_get_oauth2_application) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications +[**user_get_runner_registration_token**](UserApi.md#user_get_runner_registration_token) | **GET** /user/actions/runners/registration-token | Get an user's actions runner registration token +[**user_get_stop_watches**](UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches +[**user_get_tokens**](UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens +[**user_list_activity_feeds**](UserApi.md#user_list_activity_feeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds +[**user_list_blocks**](UserApi.md#user_list_blocks) | **GET** /user/blocks | List users blocked by the authenticated user +[**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_hooks**](UserApi.md#user_list_hooks) | **GET** /user/hooks | List the authenticated user's webhooks +[**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_list_teams**](UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to +[**user_search**](UserApi.md#user_search) | **GET** /users/search | Search for users +[**user_unblock_user**](UserApi.md#user_unblock_user) | **DELETE** /user/blocks/{username} | Unblock a user +[**user_update_avatar**](UserApi.md#user_update_avatar) | **POST** /user/avatar | Update Avatar +[**user_update_o_auth2_application**](UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | update an OAuth2 Application, this includes regenerating the client secret +[**user_verify_gpg_key**](UserApi.md#user_verify_gpg_key) | **POST** /user/gpg_key_verify | Verify a GPG key + + +# **create_current_user_repo** +> Repository create_current_user_repo(body=body) + +Create a repository + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_user_variable** +> create_user_variable(variablename, body=body) + +Create a user-level variable + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +variablename = 'variablename_example' # str | name of the variable +body = gitea.CreateVariableOption() # CreateVariableOption | (optional) + +try: + # Create a user-level variable + api_instance.create_user_variable(variablename, body=body) +except ApiException as e: + print("Exception when calling UserApi->create_user_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **variablename** | **str**| name of the variable | + **body** | [**CreateVariableOption**](CreateVariableOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **delete_user_secret** +> delete_user_secret(secretname) + +Delete a secret in a user scope + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +secretname = 'secretname_example' # str | name of the secret + +try: + # Delete a secret in a user scope + api_instance.delete_user_secret(secretname) +except ApiException as e: + print("Exception when calling UserApi->delete_user_secret: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **secretname** | **str**| name of the secret | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **delete_user_variable** +> delete_user_variable(variablename) + +Delete a user-level variable which is created by current doer + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +variablename = 'variablename_example' # str | name of the variable + +try: + # Delete a user-level variable which is created by current doer + api_instance.delete_user_variable(variablename) +except ApiException as e: + print("Exception when calling UserApi->delete_user_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **variablename** | **str**| name of the variable | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_user_settings** +> list[UserSettings] get_user_settings() + +Get user settings + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) + +try: + # Get user settings + api_response = api_instance.get_user_settings() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->get_user_settings: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[UserSettings]**](UserSettings.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_user_variable** +> ActionVariable get_user_variable(variablename) + +Get a user-level variable which is created by current doer + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +variablename = 'variablename_example' # str | name of the variable + +try: + # Get a user-level variable which is created by current doer + api_response = api_instance.get_user_variable(variablename) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->get_user_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **variablename** | **str**| name of the variable | + +### Return type + +[**ActionVariable**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_user_variables_list** +> list[ActionVariable] get_user_variables_list(page=page, limit=limit) + +Get the user-level list of variables which is created by current doer + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get the user-level list of variables which is created by current doer + api_response = api_instance.get_user_variables_list(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->get_user_variables_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[ActionVariable]**](ActionVariable.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_verification_token** +> str get_verification_token() + +Get a Token to verify + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) + +try: + # Get a Token to verify + api_response = api_instance.get_verification_token() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->get_verification_token: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: text/plain + +[[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) + +# **update_user_secret** +> update_user_secret(secretname, body=body) + +Create or Update a secret value in a user scope + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +secretname = 'secretname_example' # str | name of the secret +body = gitea.CreateOrUpdateSecretOption() # CreateOrUpdateSecretOption | (optional) + +try: + # Create or Update a secret value in a user scope + api_instance.update_user_secret(secretname, body=body) +except ApiException as e: + print("Exception when calling UserApi->update_user_secret: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **secretname** | **str**| name of the secret | + **body** | [**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.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), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **update_user_settings** +> list[UserSettings] update_user_settings(body=body) + +Update user settings + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.UserSettingsOptions() # UserSettingsOptions | (optional) + +try: + # Update user settings + api_response = api_instance.update_user_settings(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->update_user_settings: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UserSettingsOptions**](UserSettingsOptions.md)| | [optional] + +### Return type + +[**list[UserSettings]**](UserSettings.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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) + +# **update_user_variable** +> update_user_variable(variablename, body=body) + +Update a user-level variable which is created by current doer + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +variablename = 'variablename_example' # str | name of the variable +body = gitea.UpdateVariableOption() # UpdateVariableOption | (optional) + +try: + # Update a user-level variable which is created by current doer + api_instance.update_user_variable(variablename, body=body) +except ApiException as e: + print("Exception when calling UserApi->update_user_variable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **variablename** | **str**| name of the variable | + **body** | [**UpdateVariableOption**](UpdateVariableOption.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_block_user** +> user_block_user(username, note=note) + +Block a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | user to block +note = 'note_example' # str | optional note for the block (optional) + +try: + # Block a user + api_instance.user_block_user(username, note=note) +except ApiException as e: + print("Exception when calling UserApi->user_block_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| user to block | + **note** | **str**| optional note for the block | [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), [TOTPHeader](../README.md#TOTPHeader), [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_check_following** +> user_check_following(username, target) + +Check if one user is following another user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of following user +target = 'target_example' # str | username of followed user + +try: + # Check if one user is following another user + api_instance.user_check_following(username, target) +except ApiException as e: + print("Exception when calling UserApi->user_check_following: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of following user | + **target** | **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), [TOTPHeader](../README.md#TOTPHeader), [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_check_user_block** +> user_check_user_block(username) + +Check if a user is blocked by the authenticated user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | user to check + +try: + # Check if a user is blocked by the authenticated user + api_instance.user_check_user_block(username) +except ApiException as e: + print("Exception when calling UserApi->user_check_user_block: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| user to check | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_hook** +> Hook user_create_hook(body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.CreateHookOption() # CreateHookOption | + +try: + # Create a hook + api_response = api_instance.user_create_hook(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_create_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateHookOption**](CreateHookOption.md)| | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_create_o_auth2_application** +> OAuth2Application user_create_o_auth2_application(body) + +creates a new OAuth2 application + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.CreateOAuth2ApplicationOptions() # CreateOAuth2ApplicationOptions | + +try: + # creates a new OAuth2 application + api_response = api_instance.user_create_o_auth2_application(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_create_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md)| | + +### Return type + +[**OAuth2Application**](OAuth2Application.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_create_token** +> AccessToken user_create_token(username, body=body) + +Create an access token + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +body = gitea.CreateAccessTokenOption() # CreateAccessTokenOption | (optional) + +try: + # Create an access token + api_response = api_instance.user_create_token(username, body=body) + pprint(api_response) +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 | + **body** | [**CreateAccessTokenOption**](CreateAccessTokenOption.md)| | [optional] + +### Return type + +[**AccessToken**](AccessToken.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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(page=page, limit=limit) + +List the authenticated user's followers + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the authenticated user's followers + api_response = api_instance.user_current_list_followers(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_followers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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(page=page, limit=limit) + +List the users that the authenticated user is following + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the users that the authenticated user is following + api_response = api_instance.user_current_list_following(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_following: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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(page=page, limit=limit) + +List the authenticated user's GPG keys + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the authenticated user's GPG keys + api_response = api_instance.user_current_list_gpg_keys(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_gpg_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List the authenticated user's public keys + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the authenticated user's public keys + api_response = api_instance.user_current_list_keys(fingerprint=fingerprint, page=page, limit=limit) + 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] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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(page=page, limit=limit) + +List the repos that the authenticated user owns + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the repos that the authenticated user owns + api_response = api_instance.user_current_list_repos(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_repos: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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(page=page, limit=limit) + +The repos that the authenticated user has starred + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # The repos that the authenticated user has starred + api_response = api_instance.user_current_list_starred(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_starred: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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(page=page, limit=limit) + +List repositories watched by the authenticated user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List repositories watched by the authenticated user + api_response = api_instance.user_current_list_subscriptions(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_subscriptions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +form = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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(page=page, limit=limit, since=since, before=before) + +List the current user's tracked times + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated before the given time. This is a timestamp in RFC 3339 format (optional) + +try: + # List the current user's tracked times + api_response = api_instance.user_current_tracked_times(page=page, limit=limit, since=since, before=before) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_tracked_times: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + **since** | **datetime**| Only show times updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show times updated before the given time. This is a timestamp in RFC 3339 format | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +token = 'token_example' # str | token to be deleted, identified by ID and if not available by name + +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** | **str**| token to be deleted, identified by ID and if not available by name | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_avatar** +> user_delete_avatar() + +Delete Avatar + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) + +try: + # Delete Avatar + api_instance.user_delete_avatar() +except ApiException as e: + print("Exception when calling UserApi->user_delete_avatar: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_hook** +> user_delete_hook(id) + +Delete a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the hook to delete + +try: + # Delete a hook + api_instance.user_delete_hook(id) +except ApiException as e: + print("Exception when calling UserApi->user_delete_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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), [TOTPHeader](../README.md#TOTPHeader), [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_o_auth2_application** +> user_delete_o_auth2_application(id) + +delete an OAuth2 Application + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +id = 789 # int | token to be deleted + +try: + # delete an OAuth2 Application + api_instance.user_delete_o_auth2_application(id) +except ApiException as e: + print("Exception when calling UserApi->user_delete_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **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), [TOTPHeader](../README.md#TOTPHeader), [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_edit_hook** +> Hook user_edit_hook(id, body=body) + +Update a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the hook to update +body = gitea.EditHookOption() # EditHookOption | (optional) + +try: + # Update a hook + api_response = api_instance.user_edit_hook(id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_edit_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the hook to update | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_get** +> User user_get(username) + +Get a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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_hook** +> Hook user_get_hook(id) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +id = 789 # int | id of the hook to get + +try: + # Get a hook + api_response = api_instance.user_get_hook(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the hook to get | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_o_auth2_application** +> OAuth2Application user_get_o_auth2_application(id) + +get an OAuth2 Application + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +id = 789 # int | Application ID to be found + +try: + # get an OAuth2 Application + api_response = api_instance.user_get_o_auth2_application(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Application ID to be found | + +### Return type + +[**OAuth2Application**](OAuth2Application.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_oauth2_application** +> list[OAuth2Application] user_get_oauth2_application(page=page, limit=limit) + +List the authenticated user's oauth2 applications + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the authenticated user's oauth2 applications + api_response = api_instance.user_get_oauth2_application(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_oauth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[OAuth2Application]**](OAuth2Application.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_runner_registration_token** +> user_get_runner_registration_token() + +Get an user's actions runner registration token + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) + +try: + # Get an user's actions runner registration token + api_instance.user_get_runner_registration_token() +except ApiException as e: + print("Exception when calling UserApi->user_get_runner_registration_token: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_stop_watches** +> list[StopWatch] user_get_stop_watches(page=page, limit=limit) + +Get list of all existing stopwatches + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Get list of all existing stopwatches + api_response = api_instance.user_get_stop_watches(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_stop_watches: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[StopWatch]**](StopWatch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_get_tokens** +> list[AccessToken] user_get_tokens(username, page=page, limit=limit) + +List the authenticated user's access tokens + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the authenticated user's access tokens + api_response = api_instance.user_get_tokens(username, page=page, limit=limit) + pprint(api_response) +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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[AccessToken]**](AccessToken.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_activity_feeds** +> list[Activity] user_list_activity_feeds(username, only_performed_by=only_performed_by, _date=_date, page=page, limit=limit) + +List a user's activity feeds + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +only_performed_by = true # bool | if true, only show actions performed by the requested user (optional) +_date = '2013-10-20' # date | the date of the activities to be found (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List a user's activity feeds + api_response = api_instance.user_list_activity_feeds(username, only_performed_by=only_performed_by, _date=_date, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_activity_feeds: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **only_performed_by** | **bool**| if true, only show actions performed by the requested user | [optional] + **_date** | **date**| the date of the activities to be found | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Activity]**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_blocks** +> list[User] user_list_blocks(page=page, limit=limit) + +List users blocked by the authenticated user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List users blocked by the authenticated user + api_response = api_instance.user_list_blocks(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_blocks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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 gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List the given user's followers + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the given user's followers + api_response = api_instance.user_list_followers(username, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List the users that the given user is following + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the users that the given user is following + api_response = api_instance.user_list_following(username, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List the given user's GPG keys + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the given user's GPG keys + api_response = api_instance.user_list_gpg_keys(username, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_hooks** +> list[Hook] user_list_hooks(page=page, limit=limit) + +List the authenticated user's webhooks + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the authenticated user's webhooks + api_response = api_instance.user_list_hooks(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_hooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**list[Hook]**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List the given user's public keys + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the given user's public keys + api_response = api_instance.user_list_keys(username, fingerprint=fingerprint, page=page, limit=limit) + 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] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List the repos owned by the given user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the repos owned by the given user + api_response = api_instance.user_list_repos(username, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +The repos that the given user has starred + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # The repos that the given user has starred + api_response = api_instance.user_list_starred(username, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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, page=page, limit=limit) + +List the repositories watched by a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | username of the user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List the repositories watched by a user + api_response = api_instance.user_list_subscriptions(username, page=page, limit=limit) + 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 | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_teams** +> list[Team] user_list_teams(page=page, limit=limit) + +List all the teams a user belongs to + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # List all the teams a user belongs to + api_response = api_instance.user_list_teams(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_teams: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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** +> InlineResponse2001 user_search(q=q, uid=uid, page=page, limit=limit) + +Search for users + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +q = 'q_example' # str | keyword (optional) +uid = 789 # int | ID of the user to search for (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results (optional) + +try: + # Search for users + api_response = api_instance.user_search(q=q, uid=uid, page=page, 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] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results | [optional] + +### Return type + +[**InlineResponse2001**](InlineResponse2001.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_unblock_user** +> user_unblock_user(username) + +Unblock a user + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +username = 'username_example' # str | user to unblock + +try: + # Unblock a user + api_instance.user_unblock_user(username) +except ApiException as e: + print("Exception when calling UserApi->user_unblock_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| user to unblock | + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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_update_avatar** +> user_update_avatar(body=body) + +Update Avatar + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +body = gitea.UpdateUserAvatarOption() # UpdateUserAvatarOption | (optional) + +try: + # Update Avatar + api_instance.user_update_avatar(body=body) +except ApiException as e: + print("Exception when calling UserApi->user_update_avatar: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateUserAvatarOption**](UpdateUserAvatarOption.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), [TOTPHeader](../README.md#TOTPHeader), [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_update_o_auth2_application** +> OAuth2Application user_update_o_auth2_application(id, body) + +update an OAuth2 Application, this includes regenerating the client secret + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) +id = 789 # int | application to be updated +body = gitea.CreateOAuth2ApplicationOptions() # CreateOAuth2ApplicationOptions | + +try: + # update an OAuth2 Application, this includes regenerating the client secret + api_response = api_instance.user_update_o_auth2_application(id, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_update_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| application to be updated | + **body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md)| | + +### Return type + +[**OAuth2Application**](OAuth2Application.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [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_verify_gpg_key** +> GPGKey user_verify_gpg_key() + +Verify a GPG key + +### Example +```python +from __future__ import print_function +import time +import gitea +from gitea.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = gitea.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 = gitea.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 = gitea.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = gitea.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_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 = gitea.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = gitea.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = gitea.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 = gitea.UserApi(gitea.ApiClient(configuration)) + +try: + # Verify a GPG key + api_response = api_instance.user_verify_gpg_key() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_verify_gpg_key: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### 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), [TOTPHeader](../README.md#TOTPHeader), [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/UserBadgeOption.md b/docs/UserBadgeOption.md new file mode 100644 index 0000000..29cbde3 --- /dev/null +++ b/docs/UserBadgeOption.md @@ -0,0 +1,10 @@ +# UserBadgeOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**badge_slugs** | **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/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/UserSettings.md b/docs/UserSettings.md new file mode 100644 index 0000000..5f0fba2 --- /dev/null +++ b/docs/UserSettings.md @@ -0,0 +1,18 @@ +# UserSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**diff_view_style** | **str** | | [optional] +**full_name** | **str** | | [optional] +**hide_activity** | **bool** | | [optional] +**hide_email** | **bool** | Privacy | [optional] +**language** | **str** | | [optional] +**location** | **str** | | [optional] +**theme** | **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/UserSettingsOptions.md b/docs/UserSettingsOptions.md new file mode 100644 index 0000000..e0a07a4 --- /dev/null +++ b/docs/UserSettingsOptions.md @@ -0,0 +1,18 @@ +# UserSettingsOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**diff_view_style** | **str** | | [optional] +**full_name** | **str** | | [optional] +**hide_activity** | **bool** | | [optional] +**hide_email** | **bool** | Privacy | [optional] +**language** | **str** | | [optional] +**location** | **str** | | [optional] +**theme** | **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/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/docs/WikiCommit.md b/docs/WikiCommit.md new file mode 100644 index 0000000..de92da0 --- /dev/null +++ b/docs/WikiCommit.md @@ -0,0 +1,13 @@ +# WikiCommit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**CommitUser**](CommitUser.md) | | [optional] +**commiter** | [**CommitUser**](CommitUser.md) | | [optional] +**message** | **str** | | [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/WikiCommitList.md b/docs/WikiCommitList.md new file mode 100644 index 0000000..57047d9 --- /dev/null +++ b/docs/WikiCommitList.md @@ -0,0 +1,11 @@ +# WikiCommitList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commits** | [**list[WikiCommit]**](WikiCommit.md) | | [optional] +**count** | **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/WikiPage.md b/docs/WikiPage.md new file mode 100644 index 0000000..fbc75e0 --- /dev/null +++ b/docs/WikiPage.md @@ -0,0 +1,17 @@ +# WikiPage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit_count** | **int** | | [optional] +**content_base64** | **str** | Page content, base64 encoded | [optional] +**footer** | **str** | | [optional] +**html_url** | **str** | | [optional] +**last_commit** | [**WikiCommit**](WikiCommit.md) | | [optional] +**sidebar** | **str** | | [optional] +**sub_url** | **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/WikiPageMetaData.md b/docs/WikiPageMetaData.md new file mode 100644 index 0000000..d73ea75 --- /dev/null +++ b/docs/WikiPageMetaData.md @@ -0,0 +1,13 @@ +# WikiPageMetaData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_url** | **str** | | [optional] +**last_commit** | [**WikiCommit**](WikiCommit.md) | | [optional] +**sub_url** | **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/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/gitea/__init__.py b/gitea/__init__.py new file mode 100644 index 0000000..7e72ab8 --- /dev/null +++ b/gitea/__init__.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from gitea.api.activitypub_api import ActivitypubApi +from gitea.api.admin_api import AdminApi +from gitea.api.issue_api import IssueApi +from gitea.api.miscellaneous_api import MiscellaneousApi +from gitea.api.notification_api import NotificationApi +from gitea.api.organization_api import OrganizationApi +from gitea.api.package_api import PackageApi +from gitea.api.repository_api import RepositoryApi +from gitea.api.settings_api import SettingsApi +from gitea.api.user_api import UserApi + +# import ApiClient +from gitea.api_client import ApiClient +from gitea.configuration import Configuration +# import models into sdk package +from gitea.models.api_error import APIError +from gitea.models.access_token import AccessToken +from gitea.models.action_task import ActionTask +from gitea.models.action_task_response import ActionTaskResponse +from gitea.models.action_variable import ActionVariable +from gitea.models.activity import Activity +from gitea.models.activity_pub import ActivityPub +from gitea.models.add_collaborator_option import AddCollaboratorOption +from gitea.models.add_time_option import AddTimeOption +from gitea.models.annotated_tag import AnnotatedTag +from gitea.models.annotated_tag_object import AnnotatedTagObject +from gitea.models.attachment import Attachment +from gitea.models.badge import Badge +from gitea.models.branch import Branch +from gitea.models.branch_protection import BranchProtection +from gitea.models.change_file_operation import ChangeFileOperation +from gitea.models.change_files_options import ChangeFilesOptions +from gitea.models.changed_file import ChangedFile +from gitea.models.combined_status import CombinedStatus +from gitea.models.comment import Comment +from gitea.models.commit import Commit +from gitea.models.commit_affected_files import CommitAffectedFiles +from gitea.models.commit_date_options import CommitDateOptions +from gitea.models.commit_meta import CommitMeta +from gitea.models.commit_stats import CommitStats +from gitea.models.commit_status import CommitStatus +from gitea.models.commit_status_state import CommitStatusState +from gitea.models.commit_user import CommitUser +from gitea.models.compare import Compare +from gitea.models.contents_response import ContentsResponse +from gitea.models.create_access_token_option import CreateAccessTokenOption +from gitea.models.create_branch_protection_option import CreateBranchProtectionOption +from gitea.models.create_branch_repo_option import CreateBranchRepoOption +from gitea.models.create_email_option import CreateEmailOption +from gitea.models.create_file_options import CreateFileOptions +from gitea.models.create_fork_option import CreateForkOption +from gitea.models.create_gpg_key_option import CreateGPGKeyOption +from gitea.models.create_hook_option import CreateHookOption +from gitea.models.create_hook_option_config import CreateHookOptionConfig +from gitea.models.create_issue_comment_option import CreateIssueCommentOption +from gitea.models.create_issue_option import CreateIssueOption +from gitea.models.create_key_option import CreateKeyOption +from gitea.models.create_label_option import CreateLabelOption +from gitea.models.create_milestone_option import CreateMilestoneOption +from gitea.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions +from gitea.models.create_or_update_secret_option import CreateOrUpdateSecretOption +from gitea.models.create_org_option import CreateOrgOption +from gitea.models.create_pull_request_option import CreatePullRequestOption +from gitea.models.create_pull_review_comment import CreatePullReviewComment +from gitea.models.create_pull_review_options import CreatePullReviewOptions +from gitea.models.create_push_mirror_option import CreatePushMirrorOption +from gitea.models.create_release_option import CreateReleaseOption +from gitea.models.create_repo_option import CreateRepoOption +from gitea.models.create_status_option import CreateStatusOption +from gitea.models.create_tag_option import CreateTagOption +from gitea.models.create_tag_protection_option import CreateTagProtectionOption +from gitea.models.create_team_option import CreateTeamOption +from gitea.models.create_user_option import CreateUserOption +from gitea.models.create_variable_option import CreateVariableOption +from gitea.models.create_wiki_page_options import CreateWikiPageOptions +from gitea.models.cron import Cron +from gitea.models.delete_email_option import DeleteEmailOption +from gitea.models.delete_file_options import DeleteFileOptions +from gitea.models.deploy_key import DeployKey +from gitea.models.dismiss_pull_review_options import DismissPullReviewOptions +from gitea.models.edit_attachment_options import EditAttachmentOptions +from gitea.models.edit_branch_protection_option import EditBranchProtectionOption +from gitea.models.edit_deadline_option import EditDeadlineOption +from gitea.models.edit_git_hook_option import EditGitHookOption +from gitea.models.edit_hook_option import EditHookOption +from gitea.models.edit_issue_comment_option import EditIssueCommentOption +from gitea.models.edit_issue_option import EditIssueOption +from gitea.models.edit_label_option import EditLabelOption +from gitea.models.edit_milestone_option import EditMilestoneOption +from gitea.models.edit_org_option import EditOrgOption +from gitea.models.edit_pull_request_option import EditPullRequestOption +from gitea.models.edit_reaction_option import EditReactionOption +from gitea.models.edit_release_option import EditReleaseOption +from gitea.models.edit_repo_option import EditRepoOption +from gitea.models.edit_tag_protection_option import EditTagProtectionOption +from gitea.models.edit_team_option import EditTeamOption +from gitea.models.edit_user_option import EditUserOption +from gitea.models.email import Email +from gitea.models.external_tracker import ExternalTracker +from gitea.models.external_wiki import ExternalWiki +from gitea.models.file_commit_response import FileCommitResponse +from gitea.models.file_delete_response import FileDeleteResponse +from gitea.models.file_links_response import FileLinksResponse +from gitea.models.file_response import FileResponse +from gitea.models.files_response import FilesResponse +from gitea.models.gpg_key import GPGKey +from gitea.models.gpg_key_email import GPGKeyEmail +from gitea.models.general_api_settings import GeneralAPISettings +from gitea.models.general_attachment_settings import GeneralAttachmentSettings +from gitea.models.general_repo_settings import GeneralRepoSettings +from gitea.models.general_ui_settings import GeneralUISettings +from gitea.models.generate_repo_option import GenerateRepoOption +from gitea.models.git_blob_response import GitBlobResponse +from gitea.models.git_entry import GitEntry +from gitea.models.git_hook import GitHook +from gitea.models.git_object import GitObject +from gitea.models.git_tree_response import GitTreeResponse +from gitea.models.gitignore_template_info import GitignoreTemplateInfo +from gitea.models.hook import Hook +from gitea.models.identity import Identity +from gitea.models.inline_response200 import InlineResponse200 +from gitea.models.inline_response2001 import InlineResponse2001 +from gitea.models.internal_tracker import InternalTracker +from gitea.models.issue import Issue +from gitea.models.issue_config import IssueConfig +from gitea.models.issue_config_contact_link import IssueConfigContactLink +from gitea.models.issue_config_validation import IssueConfigValidation +from gitea.models.issue_deadline import IssueDeadline +from gitea.models.issue_form_field import IssueFormField +from gitea.models.issue_form_field_type import IssueFormFieldType +from gitea.models.issue_form_field_visible import IssueFormFieldVisible +from gitea.models.issue_labels_option import IssueLabelsOption +from gitea.models.issue_meta import IssueMeta +from gitea.models.issue_template import IssueTemplate +from gitea.models.issue_template_string_slice import IssueTemplateStringSlice +from gitea.models.label import Label +from gitea.models.label_template import LabelTemplate +from gitea.models.license_template_info import LicenseTemplateInfo +from gitea.models.licenses_template_list_entry import LicensesTemplateListEntry +from gitea.models.markdown_option import MarkdownOption +from gitea.models.markup_option import MarkupOption +from gitea.models.merge_pull_request_option import MergePullRequestOption +from gitea.models.merge_upstream_request import MergeUpstreamRequest +from gitea.models.merge_upstream_response import MergeUpstreamResponse +from gitea.models.migrate_repo_options import MigrateRepoOptions +from gitea.models.milestone import Milestone +from gitea.models.new_issue_pins_allowed import NewIssuePinsAllowed +from gitea.models.node_info import NodeInfo +from gitea.models.node_info_services import NodeInfoServices +from gitea.models.node_info_software import NodeInfoSoftware +from gitea.models.node_info_usage import NodeInfoUsage +from gitea.models.node_info_usage_users import NodeInfoUsageUsers +from gitea.models.note import Note +from gitea.models.notification_count import NotificationCount +from gitea.models.notification_subject import NotificationSubject +from gitea.models.notification_thread import NotificationThread +from gitea.models.notify_subject_type import NotifySubjectType +from gitea.models.o_auth2_application import OAuth2Application +from gitea.models.organization import Organization +from gitea.models.organization_permissions import OrganizationPermissions +from gitea.models.pr_branch_info import PRBranchInfo +from gitea.models.package import Package +from gitea.models.package_file import PackageFile +from gitea.models.payload_commit import PayloadCommit +from gitea.models.payload_commit_verification import PayloadCommitVerification +from gitea.models.payload_user import PayloadUser +from gitea.models.permission import Permission +from gitea.models.public_key import PublicKey +from gitea.models.pull_request import PullRequest +from gitea.models.pull_request_meta import PullRequestMeta +from gitea.models.pull_review import PullReview +from gitea.models.pull_review_comment import PullReviewComment +from gitea.models.pull_review_request_options import PullReviewRequestOptions +from gitea.models.push_mirror import PushMirror +from gitea.models.reaction import Reaction +from gitea.models.reference import Reference +from gitea.models.release import Release +from gitea.models.rename_user_option import RenameUserOption +from gitea.models.repo_collaborator_permission import RepoCollaboratorPermission +from gitea.models.repo_commit import RepoCommit +from gitea.models.repo_topic_options import RepoTopicOptions +from gitea.models.repo_transfer import RepoTransfer +from gitea.models.repository import Repository +from gitea.models.repository_meta import RepositoryMeta +from gitea.models.review_state_type import ReviewStateType +from gitea.models.search_results import SearchResults +from gitea.models.secret import Secret +from gitea.models.server_version import ServerVersion +from gitea.models.state_type import StateType +from gitea.models.stop_watch import StopWatch +from gitea.models.submit_pull_review_options import SubmitPullReviewOptions +from gitea.models.tag import Tag +from gitea.models.tag_protection import TagProtection +from gitea.models.team import Team +from gitea.models.time_stamp import TimeStamp +from gitea.models.timeline_comment import TimelineComment +from gitea.models.topic_name import TopicName +from gitea.models.topic_response import TopicResponse +from gitea.models.tracked_time import TrackedTime +from gitea.models.transfer_repo_option import TransferRepoOption +from gitea.models.update_branch_protection_priories import UpdateBranchProtectionPriories +from gitea.models.update_branch_repo_option import UpdateBranchRepoOption +from gitea.models.update_file_options import UpdateFileOptions +from gitea.models.update_repo_avatar_option import UpdateRepoAvatarOption +from gitea.models.update_user_avatar_option import UpdateUserAvatarOption +from gitea.models.update_variable_option import UpdateVariableOption +from gitea.models.user import User +from gitea.models.user_badge_option import UserBadgeOption +from gitea.models.user_heatmap_data import UserHeatmapData +from gitea.models.user_settings import UserSettings +from gitea.models.user_settings_options import UserSettingsOptions +from gitea.models.watch_info import WatchInfo +from gitea.models.wiki_commit import WikiCommit +from gitea.models.wiki_commit_list import WikiCommitList +from gitea.models.wiki_page import WikiPage +from gitea.models.wiki_page_meta_data import WikiPageMetaData diff --git a/gitea/api/__init__.py b/gitea/api/__init__.py new file mode 100644 index 0000000..fb4e3b0 --- /dev/null +++ b/gitea/api/__init__.py @@ -0,0 +1,15 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from gitea.api.activitypub_api import ActivitypubApi +from gitea.api.admin_api import AdminApi +from gitea.api.issue_api import IssueApi +from gitea.api.miscellaneous_api import MiscellaneousApi +from gitea.api.notification_api import NotificationApi +from gitea.api.organization_api import OrganizationApi +from gitea.api.package_api import PackageApi +from gitea.api.repository_api import RepositoryApi +from gitea.api.settings_api import SettingsApi +from gitea.api.user_api import UserApi diff --git a/gitea/api/activitypub_api.py b/gitea/api/activitypub_api.py new file mode 100644 index 0000000..9b02c63 --- /dev/null +++ b/gitea/api/activitypub_api.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.api_client import ApiClient + + +class ActivitypubApi(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 activitypub_person(self, user_id, **kwargs): # noqa: E501 + """Returns the Person actor for 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.activitypub_person(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID of the user (required) + :return: ActivityPub + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.activitypub_person_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.activitypub_person_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def activitypub_person_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Returns the Person actor for 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.activitypub_person_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID of the user (required) + :return: ActivityPub + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_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 activitypub_person" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in params or + params['user_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `activitypub_person`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['user-id'] = params['user_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/activitypub/user-id/{user-id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActivityPub', # 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 activitypub_person_inbox(self, user_id, **kwargs): # noqa: E501 + """Send to the inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activitypub_person_inbox(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID 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.activitypub_person_inbox_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.activitypub_person_inbox_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def activitypub_person_inbox_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Send to the inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activitypub_person_inbox_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_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 activitypub_person_inbox" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in params or + params['user_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `activitypub_person_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['user-id'] = params['user_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/activitypub/user-id/{user-id}/inbox', '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/gitea/api/admin_api.py b/gitea/api/admin_api.py new file mode 100644 index 0000000..e8ef22d --- /dev/null +++ b/gitea/api/admin_api.py @@ -0,0 +1,2632 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.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_add_user_badges(self, username, **kwargs): # noqa: E501 + """Add a badge to 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_add_user_badges(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param UserBadgeOption 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.admin_add_user_badges_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_add_user_badges_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_add_user_badges_with_http_info(self, username, **kwargs): # noqa: E501 + """Add a badge to 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_add_user_badges_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param UserBadgeOption body: + :return: None + 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_add_user_badges" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_add_user_badges`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/badges', '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 admin_adopt_repository(self, owner, repo, **kwargs): # noqa: E501 + """Adopt unadopted files as 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.admin_adopt_repository(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.admin_adopt_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.admin_adopt_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def admin_adopt_repository_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Adopt unadopted files as 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.admin_adopt_repository_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 admin_adopt_repository" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `admin_adopt_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `admin_adopt_repository`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/unadopted/{owner}/{repo}', '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 admin_create_hook(self, 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.admin_create_hook(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + 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_hook_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_hook_with_http_info(body, **kwargs) # noqa: E501 + return data + + def admin_create_hook_with_http_info(self, 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.admin_create_hook_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + 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_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `admin_create_hook`") # 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( + ['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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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_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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_create_org`") # noqa: E501 + # verify the required parameter 'organization' is set + if self.api_client.client_side_validation and ('organization' not in params or + params['organization'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 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_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 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_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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_create_repo`") # noqa: E501 + # verify the required parameter 'repository' is set + if self.api_client.client_side_validation and ('repository' not in params or + params['repository'] is None): # noqa: E501 + 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', 'TOTPHeader', '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', 'TOTPHeader', '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_cron_list(self, **kwargs): # noqa: E501 + """List cron tasks # 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_cron_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Cron] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_cron_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_cron_list_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_cron_list_with_http_info(self, **kwargs): # noqa: E501 + """List cron tasks # 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_cron_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Cron] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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 admin_cron_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/cron', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Cron]', # 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_cron_run(self, task, **kwargs): # noqa: E501 + """Run cron task # 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_cron_run(task, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str task: task to run (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_cron_run_with_http_info(task, **kwargs) # noqa: E501 + else: + (data) = self.admin_cron_run_with_http_info(task, **kwargs) # noqa: E501 + return data + + def admin_cron_run_with_http_info(self, task, **kwargs): # noqa: E501 + """Run cron task # 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_cron_run_with_http_info(task, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str task: task to run (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['task'] # 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_cron_run" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'task' is set + if self.api_client.client_side_validation and ('task' not in params or + params['task'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `task` when calling `admin_cron_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'task' in params: + path_params['task'] = params['task'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/cron/{task}', '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 admin_delete_hook(self, 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.admin_delete_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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.admin_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def admin_delete_hook_with_http_info(self, 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.admin_delete_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook 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 admin_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `admin_delete_hook`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/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 admin_delete_unadopted_repository(self, owner, repo, **kwargs): # noqa: E501 + """Delete unadopted files # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_unadopted_repository(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.admin_delete_unadopted_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_unadopted_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def admin_delete_unadopted_repository_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Delete unadopted files # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_unadopted_repository_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 admin_delete_unadopted_repository" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `admin_delete_unadopted_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `admin_delete_unadopted_repository`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/unadopted/{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 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) + :param bool purge: purge the user from the system completely + :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) + :param bool purge: purge the user from the system completely + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'purge'] # 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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'purge' in params: + query_params.append(('purge', params['purge'])) # 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', 'TOTPHeader', '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_badges(self, username, **kwargs): # noqa: E501 + """Remove a badge from 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_badges(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param UserBadgeOption 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.admin_delete_user_badges_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_badges_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_delete_user_badges_with_http_info(self, username, **kwargs): # noqa: E501 + """Remove a badge from 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_badges_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param UserBadgeOption body: + :return: None + 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_delete_user_badges" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_delete_user_badges`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/badges', '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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_delete_user_public_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_hook(self, 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.admin_edit_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + 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_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.admin_edit_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def admin_edit_hook_with_http_info(self, 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.admin_edit_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + 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 admin_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `admin_edit_hook`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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) + + def admin_get_all_emails(self, **kwargs): # noqa: E501 + """List all emails # 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_get_all_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.admin_get_all_emails_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_all_emails_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_all_emails_with_http_info(self, **kwargs): # noqa: E501 + """List all emails # 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_get_all_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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 admin_get_all_emails" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/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 admin_get_all_orgs(self, **kwargs): # noqa: E501 + """List all 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.admin_get_all_orgs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.admin_get_all_orgs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_all_orgs_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_all_orgs_with_http_info(self, **kwargs): # noqa: E501 + """List all 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.admin_get_all_orgs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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 admin_get_all_orgs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/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 admin_get_hook(self, 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.admin_get_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_get_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.admin_get_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def admin_get_hook_with_http_info(self, 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.admin_get_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + 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 admin_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `admin_get_hook`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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_get_runner_registration_token(self, **kwargs): # noqa: E501 + """Get an global actions runner registration 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.admin_get_runner_registration_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_get_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_runner_registration_token_with_http_info(self, **kwargs): # noqa: E501 + """Get an global actions runner registration 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.admin_get_runner_registration_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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 admin_get_runner_registration_token" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/runners/registration-token', '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 admin_list_hooks(self, **kwargs): # noqa: E501 + """List system'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.admin_list_hooks(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_list_hooks_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_list_hooks_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_list_hooks_with_http_info(self, **kwargs): # noqa: E501 + """List system'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.admin_list_hooks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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 admin_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Hook]', # 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_list_user_badges(self, username, **kwargs): # noqa: E501 + """List a user's badges # 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_list_user_badges(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Badge] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_list_user_badges_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_list_user_badges_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_list_user_badges_with_http_info(self, username, **kwargs): # noqa: E501 + """List a user's badges # 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_list_user_badges_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :return: list[Badge] + 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_list_user_badges" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_list_user_badges`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/badges', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Badge]', # 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_rename_user(self, username, body, **kwargs): # noqa: E501 + """Rename 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_rename_user(username, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: existing username of user (required) + :param RenameUserOption body: (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_rename_user_with_http_info(username, body, **kwargs) # noqa: E501 + else: + (data) = self.admin_rename_user_with_http_info(username, body, **kwargs) # noqa: E501 + return data + + def admin_rename_user_with_http_info(self, username, body, **kwargs): # noqa: E501 + """Rename 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_rename_user_with_http_info(username, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: existing username of user (required) + :param RenameUserOption body: (required) + :return: None + 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_rename_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_rename_user`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `admin_rename_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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/rename', '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 admin_search_emails(self, **kwargs): # noqa: E501 + """Search all emails # 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_search_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.admin_search_emails_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_search_emails_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_search_emails_with_http_info(self, **kwargs): # noqa: E501 + """Search all emails # 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_search_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'page', '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 admin_search_emails" % 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 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/emails/search', '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 admin_search_users(self, **kwargs): # noqa: E501 + """Search users according filter conditions # 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_search_users(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int source_id: ID of the user's login source to search for + :param str login_name: user's login name to search for + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.admin_search_users_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_search_users_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_search_users_with_http_info(self, **kwargs): # noqa: E501 + """Search users according filter conditions # 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_search_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int source_id: ID of the user's login source to search for + :param str login_name: user's login name to search for + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['source_id', 'login_name', 'page', '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 admin_search_users" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'source_id' in params: + query_params.append(('source_id', params['source_id'])) # noqa: E501 + if 'login_name' in params: + query_params.append(('login_name', params['login_name'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users', '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 admin_unadopted_list(self, **kwargs): # noqa: E501 + """List unadopted 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.admin_unadopted_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str pattern: pattern of repositories to search for + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_unadopted_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_unadopted_list_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_unadopted_list_with_http_info(self, **kwargs): # noqa: E501 + """List unadopted 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.admin_unadopted_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str pattern: pattern of repositories to search for + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit', 'pattern'] # 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_unadopted_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + 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 'pattern' in params: + query_params.append(('pattern', params['pattern'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/unadopted', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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/gitea/api/issue_api.py b/gitea/api/issue_api.py new file mode 100644 index 0000000..4548ec9 --- /dev/null +++ b/gitea/api/issue_api.py @@ -0,0 +1,7981 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_add_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_add_label`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_subscription(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Subscribe user to 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_subscription(owner, repo, index, 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 int index: index of the issue (required) + :param str user: user to subscribe (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_add_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + return data + + def issue_add_subscription_with_http_info(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Subscribe user to 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_subscription_with_http_info(owner, repo, index, 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 int index: index of the issue (required) + :param str user: user to subscribe (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_add_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in params or + params['user'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user` when calling `issue_add_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 + if 'index' in params: + path_params['index'] = params['index'] # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}', '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 issue_add_time(self, owner, repo, index, **kwargs): # noqa: E501 + """Add 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, 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 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, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_add_time_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add 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, 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 AddTimeOption body: + :return: TrackedTime + 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_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_add_time`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_add_time`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` 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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/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_check_subscription(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if user is subscribed 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_check_subscription(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: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_check_subscription_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_check_subscription_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_check_subscription_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if user is subscribed 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_check_subscription_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: WatchInfo + 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_check_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_check_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_check_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_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 + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/check', '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 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_clear_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_clear_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_comment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_issue_attachment(self, owner, repo, index, attachment, **kwargs): # noqa: E501 + """Create an issue 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.issue_create_issue_attachment(owner, repo, index, 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 index: index of the issue (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.issue_create_issue_attachment_with_http_info(owner, repo, index, attachment, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_attachment_with_http_info(owner, repo, index, attachment, **kwargs) # noqa: E501 + return data + + def issue_create_issue_attachment_with_http_info(self, owner, repo, index, attachment, **kwargs): # noqa: E501 + """Create an issue 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.issue_create_issue_attachment_with_http_info(owner, repo, index, 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 index: index of the issue (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', 'index', '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 issue_create_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_create_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment' is set + if self.api_client.client_side_validation and ('attachment' not in params or + params['attachment'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment` when calling `issue_create_issue_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 'index' in params: + path_params['index'] = params['index'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/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 issue_create_issue_blocking(self, owner, repo, index, **kwargs): # noqa: E501 + """Block the issue given in the body by the issue in path # 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_blocking(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 str index: index of the issue (required) + :param IssueMeta 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_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_create_issue_blocking_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Block the issue given in the body by the issue in path # 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_blocking_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 str index: index of the issue (required) + :param IssueMeta 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_create_issue_blocking" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_blocking`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_blocking`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_create_issue_blocking`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/blocks', '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_issue_comment_attachment(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create a comment 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.issue_create_issue_comment_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 comment (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.issue_create_issue_comment_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_comment_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + return data + + def issue_create_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create a comment 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.issue_create_issue_comment_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 comment (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 issue_create_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_create_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment' is set + if self.api_client.client_side_validation and ('attachment' not in params or + params['attachment'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment` when calling `issue_create_issue_comment_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{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 issue_create_issue_dependencies(self, owner, repo, index, **kwargs): # noqa: E501 + """Make the issue in the url depend on the issue in the form. # 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_dependencies(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 str index: index of the issue (required) + :param IssueMeta 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_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_create_issue_dependencies_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Make the issue in the url depend on the issue in the form. # 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_dependencies_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 str index: index of the issue (required) + :param IssueMeta 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_create_issue_dependencies" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_dependencies`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_dependencies`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_create_issue_dependencies`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/dependencies', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete 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_delete(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 issue 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_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_delete_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete 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_delete_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 issue to delete (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_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_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 + 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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', '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(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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_comment_reaction(self, owner, repo, id, **kwargs): # noqa: E501 + """Remove a reaction from a comment of 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_delete_comment_reaction(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 EditReactionOption content: + :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_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_reaction_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Remove a reaction from a comment of 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_delete_comment_reaction_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 EditReactionOption content: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'content'] # 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_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment_reaction`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_comment_reaction`") # 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 'content' in params: + body_params = params['content'] + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', '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_issue_attachment(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Delete an issue 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.issue_delete_issue_attachment(owner, repo, index, 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 index: index of the issue (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.issue_delete_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_delete_issue_attachment_with_http_info(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Delete an issue 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.issue_delete_issue_attachment_with_http_info(owner, repo, index, 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 index: index of the issue (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', 'index', '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 issue_delete_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_delete_issue_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 'index' in params: + path_params['index'] = params['index'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/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 issue_delete_issue_comment_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a comment 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.issue_delete_issue_comment_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 comment (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.issue_delete_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_delete_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a comment 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.issue_delete_issue_comment_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 comment (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 issue_delete_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_delete_issue_comment_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{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 issue_delete_issue_reaction(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove a reaction 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_delete_issue_reaction(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 EditReactionOption content: + :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_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_delete_issue_reaction_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove a reaction 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_delete_issue_reaction_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 EditReactionOption content: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'content'] # 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_issue_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_issue_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_issue_reaction`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_issue_reaction`") # 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 'content' in params: + body_params = params['content'] + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/reactions', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 str id: the milestone to delete, identified by ID and if not available by name (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 str id: the milestone to delete, identified by ID and if not available by name (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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_delete_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue's existing stopwatch. # 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_stop_watch(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 stop the stopwatch on (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_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_delete_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue's existing stopwatch. # 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_stop_watch_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 stop the stopwatch on (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_delete_stop_watch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_stop_watch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_stop_watch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_stop_watch`") # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/stopwatch/delete', '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_subscription(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Unsubscribe user from 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_delete_subscription(owner, repo, index, 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 int index: index of the issue (required) + :param str user: user witch unsubscribe (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_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + return data + + def issue_delete_subscription_with_http_info(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Unsubscribe user from 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_delete_subscription_with_http_info(owner, repo, index, 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 int index: index of the issue (required) + :param str user: user witch unsubscribe (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_delete_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_subscription`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in params or + params['user'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user` when calling `issue_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 + if 'index' in params: + path_params['index'] = params['index'] # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}', '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_time(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete specific tracked time # 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_time(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 time 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_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_delete_time_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete specific tracked time # 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_time_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 time 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_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_time`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_time`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_time`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_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 '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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/times/{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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_attachment(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Edit an issue 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.issue_edit_issue_attachment(owner, repo, index, 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 index: index of the issue (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.issue_edit_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_attachment_with_http_info(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Edit an issue 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.issue_edit_issue_attachment_with_http_info(owner, repo, index, 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 index: index of the issue (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', 'index', '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 issue_edit_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_edit_issue_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 'index' in params: + path_params['index'] = params['index'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/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 issue_edit_issue_comment_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a comment 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.issue_edit_issue_comment_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 comment (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.issue_edit_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a comment 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.issue_edit_issue_comment_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 comment (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 issue_edit_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_edit_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_edit_issue_comment_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{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 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 str id: the milestone to edit, identified by ID and if not available by name (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 str id: the milestone to edit, identified by ID and if not available by name (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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Get 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_get_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 (required) + :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_get_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get 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_get_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 (required) + :return: Comment + 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_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_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']) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}', 'GET', + 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_get_comment_reactions(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a list of reactions from a comment of 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_comment_reactions(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) + :return: list[Reaction] + 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_comment_reactions_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comment_reactions_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_comment_reactions_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a list of reactions from a comment of 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_comment_reactions_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) + :return: list[Reaction] + 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_comment_reactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comment_reactions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comment_reactions`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_comment_reactions`") # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reaction]', # 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 datetime since: if provided, only comments updated since the specified time are returned. + :param datetime before: if provided, only comments updated before 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_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 datetime since: if provided, only comments updated since the specified time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'since', 'before'] # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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 + if 'before' in params: + query_params.append(('before', params['before'])) # 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', 'TOTPHeader', '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_comments_and_timeline(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments and events 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_and_timeline(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 datetime since: if provided, only comments updated since the specified time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[TimelineComment] + 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_and_timeline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comments_and_timeline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_comments_and_timeline_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments and events 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_and_timeline_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 datetime since: if provided, only comments updated since the specified time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[TimelineComment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'since', 'page', 'limit', 'before'] # 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_and_timeline" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comments_and_timeline`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comments_and_timeline`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_comments_and_timeline`") # 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 + 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 'before' in params: + query_params.append(('before', params['before'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/timeline', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TimelineComment]', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_issue_attachment(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Get an issue 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.issue_get_issue_attachment(owner, repo, index, 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 index: index of the issue (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.issue_get_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_get_issue_attachment_with_http_info(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Get an issue 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.issue_get_issue_attachment_with_http_info(owner, repo, index, 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 index: index of the issue (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', 'index', '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 issue_get_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_get_issue_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 'index' in params: + path_params['index'] = params['index'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/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 issue_get_issue_comment_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a comment 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.issue_get_issue_comment_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 comment (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.issue_get_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_get_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a comment 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.issue_get_issue_comment_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 comment (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 issue_get_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_get_issue_comment_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{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 issue_get_issue_reactions(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a list reactions of 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_reactions(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 int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Reaction] + 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_reactions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_reactions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_issue_reactions_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a list reactions of 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_reactions_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 int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', '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 issue_get_issue_reactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue_reactions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue_reactions`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue_reactions`") # 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 'page' in params: + query_params.append(('page', params['page'])) # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/reactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reaction]', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 str id: the milestone to get, identified by ID and if not available by name (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 str id: the milestone to get, identified by ID and if not available by name (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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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) + :param str state: Milestone state, Recognized values are open, closed and all. Defaults to \"open\" + :param str name: filter by milestone name + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param str state: Milestone state, Recognized values are open, closed and all. Defaults to \"open\" + :param str name: filter by milestone name + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Milestone] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'state', 'name', 'page', '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 issue_get_milestones_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestones_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'name' in params: + query_params.append(('name', params['name'])) # 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 + + 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', 'TOTPHeader', '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 datetime since: if provided, only comments updated since the provided time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 datetime since: if provided, only comments updated since the provided time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'since', 'before', 'page', '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 issue_get_repo_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_repo_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + 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', 'TOTPHeader', '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_blocks(self, owner, repo, index, **kwargs): # noqa: E501 + """List issues that are blocked by this 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_list_blocks(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 str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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_blocks_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_blocks_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_list_blocks_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List issues that are blocked by this 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_list_blocks_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 str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', '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 issue_list_blocks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_blocks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_blocks`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_list_blocks`") # 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 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/blocks', '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_issue_attachments(self, owner, repo, index, **kwargs): # noqa: E501 + """List issue'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.issue_list_issue_attachments(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[Attachment] + 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_issue_attachments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issue_attachments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_list_issue_attachments_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List issue'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.issue_list_issue_attachments_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[Attachment] + 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_list_issue_attachments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issue_attachments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issue_attachments`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_list_issue_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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/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 issue_list_issue_comment_attachments(self, owner, repo, id, **kwargs): # noqa: E501 + """List comment'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.issue_list_issue_comment_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 comment (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.issue_list_issue_comment_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issue_comment_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_list_issue_comment_attachments_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """List comment'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.issue_list_issue_comment_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 comment (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 issue_list_issue_comment_attachments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issue_comment_attachments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issue_comment_attachments`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_list_issue_comment_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{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 issue_list_issue_dependencies(self, owner, repo, index, **kwargs): # noqa: E501 + """List an issue's dependencies, i.e all issues that block this 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_list_issue_dependencies(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 str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_list_issue_dependencies_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List an issue's dependencies, i.e all issues that block this 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_list_issue_dependencies_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 str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', '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 issue_list_issue_dependencies" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issue_dependencies`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issue_dependencies`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_list_issue_dependencies`") # 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 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/dependencies', '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_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 str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param str type: filter by type (issues / pulls) if set + :param str milestones: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded + :param datetime since: Only show items updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show items updated before the given time. This is a timestamp in RFC 3339 format + :param str created_by: Only show items which were created by the given user + :param str assigned_by: Only show items for which the given user is assigned + :param str mentioned_by: Only show items in which the given user was mentioned + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param str type: filter by type (issues / pulls) if set + :param str milestones: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded + :param datetime since: Only show items updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show items updated before the given time. This is a timestamp in RFC 3339 format + :param str created_by: Only show items which were created by the given user + :param str assigned_by: Only show items for which the given user is assigned + :param str mentioned_by: Only show items in which the given user was mentioned + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'state', 'labels', 'q', 'type', 'milestones', 'since', 'before', 'created_by', 'assigned_by', 'mentioned_by', 'page', '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 issue_list_issues" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issues`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'milestones' in params: + query_params.append(('milestones', params['milestones'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'created_by' in params: + query_params.append(('created_by', params['created_by'])) # noqa: E501 + if 'assigned_by' in params: + query_params.append(('assigned_by', params['assigned_by'])) # noqa: E501 + if 'mentioned_by' in params: + query_params.append(('mentioned_by', params['mentioned_by'])) # 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 + + 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 issue_list_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_post_comment_reaction(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a reaction to a comment of 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_post_comment_reaction(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 EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_post_comment_reaction_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a reaction to a comment of 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_post_comment_reaction_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 EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'content'] # 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_post_comment_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_post_comment_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_post_comment_reaction`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_post_comment_reaction`") # 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 'content' in params: + body_params = params['content'] + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Reaction', # 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_post_issue_reaction(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a reaction 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_post_issue_reaction(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 EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_post_issue_reaction_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a reaction 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_post_issue_reaction_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 EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'content'] # 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_post_issue_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_post_issue_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_post_issue_reaction`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_post_issue_reaction`") # 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 'content' in params: + body_params = params['content'] + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/reactions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Reaction', # 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_issue_blocking(self, owner, repo, index, **kwargs): # noqa: E501 + """Unblock the issue given in the body by the issue in path # 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_issue_blocking(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 str index: index of the issue (required) + :param IssueMeta 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_remove_issue_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_remove_issue_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_remove_issue_blocking_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Unblock the issue given in the body by the issue in path # 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_issue_blocking_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 str index: index of the issue (required) + :param IssueMeta 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_remove_issue_blocking" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_issue_blocking`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_issue_blocking`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_remove_issue_blocking`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/blocks', 'DELETE', + 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_remove_issue_dependencies(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove an issue dependency # 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_issue_dependencies(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 str index: index of the issue (required) + :param IssueMeta 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_remove_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_remove_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_remove_issue_dependencies_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove an issue dependency # 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_issue_dependencies_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 str index: index of the issue (required) + :param IssueMeta 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_remove_issue_dependencies" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_issue_dependencies`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_issue_dependencies`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_remove_issue_dependencies`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/dependencies', 'DELETE', + 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_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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_replace_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_replace_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_reset_time(self, owner, repo, index, **kwargs): # noqa: E501 + """Reset a tracked time of 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_reset_time(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 add tracked time to (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_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_reset_time_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Reset a tracked time of 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_reset_time_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 add tracked time to (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_reset_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_reset_time`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_reset_time`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_reset_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 '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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/times', '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_search_issues(self, **kwargs): # noqa: E501 + """Search for issues across the repositories that the user 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.issue_search_issues(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str state: State of the issue + :param str labels: Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. + :param str milestones: Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. + :param str q: Search string + :param int priority_repo_id: Repository ID to prioritize in the results + :param str type: Filter by issue type + :param datetime since: Only show issues updated after the given time (RFC 3339 format) + :param datetime before: Only show issues updated before the given time (RFC 3339 format) + :param bool assigned: Filter issues or pulls assigned to the authenticated user + :param bool created: Filter issues or pulls created by the authenticated user + :param bool mentioned: Filter issues or pulls mentioning the authenticated user + :param bool review_requested: Filter pull requests where the authenticated user's review was requested + :param bool reviewed: Filter pull requests reviewed by the authenticated user + :param str owner: Filter by repository owner + :param str team: Filter by team (requires organization owner parameter) + :param int page: Page number of results to return (1-based) + :param int limit: Number of items per page + :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_search_issues_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.issue_search_issues_with_http_info(**kwargs) # noqa: E501 + return data + + def issue_search_issues_with_http_info(self, **kwargs): # noqa: E501 + """Search for issues across the repositories that the user 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.issue_search_issues_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str state: State of the issue + :param str labels: Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. + :param str milestones: Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. + :param str q: Search string + :param int priority_repo_id: Repository ID to prioritize in the results + :param str type: Filter by issue type + :param datetime since: Only show issues updated after the given time (RFC 3339 format) + :param datetime before: Only show issues updated before the given time (RFC 3339 format) + :param bool assigned: Filter issues or pulls assigned to the authenticated user + :param bool created: Filter issues or pulls created by the authenticated user + :param bool mentioned: Filter issues or pulls mentioning the authenticated user + :param bool review_requested: Filter pull requests where the authenticated user's review was requested + :param bool reviewed: Filter pull requests reviewed by the authenticated user + :param str owner: Filter by repository owner + :param str team: Filter by team (requires organization owner parameter) + :param int page: Page number of results to return (1-based) + :param int limit: Number of items per page + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['state', 'labels', 'milestones', 'q', 'priority_repo_id', 'type', 'since', 'before', 'assigned', 'created', 'mentioned', 'review_requested', 'reviewed', 'owner', 'team', 'page', '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 issue_search_issues" % key + ) + params[key] = val + del params['kwargs'] + + if self.api_client.client_side_validation and ('page' in params and params['page'] < 1): # noqa: E501 + raise ValueError("Invalid value for parameter `page` when calling `issue_search_issues`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0): # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `issue_search_issues`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + if 'milestones' in params: + query_params.append(('milestones', params['milestones'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'priority_repo_id' in params: + query_params.append(('priority_repo_id', params['priority_repo_id'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'assigned' in params: + query_params.append(('assigned', params['assigned'])) # noqa: E501 + if 'created' in params: + query_params.append(('created', params['created'])) # noqa: E501 + if 'mentioned' in params: + query_params.append(('mentioned', params['mentioned'])) # noqa: E501 + if 'review_requested' in params: + query_params.append(('review_requested', params['review_requested'])) # noqa: E501 + if 'reviewed' in params: + query_params.append(('reviewed', params['reviewed'])) # noqa: E501 + if 'owner' in params: + query_params.append(('owner', params['owner'])) # noqa: E501 + if 'team' in params: + query_params.append(('team', params['team'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/issues/search', '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_start_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Start stopwatch 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_start_stop_watch(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 the stopwatch on (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_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_start_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Start stopwatch 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_start_stop_watch_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 the stopwatch on (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_start_stop_watch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_start_stop_watch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_start_stop_watch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_start_stop_watch`") # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/stopwatch/start', '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 issue_stop_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Stop an issue's existing stopwatch. # 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_stop_stop_watch(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 stop the stopwatch on (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_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_stop_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Stop an issue's existing stopwatch. # 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_stop_stop_watch_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 stop the stopwatch on (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_stop_stop_watch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_stop_stop_watch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_stop_stop_watch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_stop_stop_watch`") # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/stopwatch/stop', '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 issue_subscriptions(self, owner, repo, index, **kwargs): # noqa: E501 + """Get users who subscribed 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_subscriptions(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 int page: page number of results to return (1-based) + :param int limit: page size of results + :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.issue_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_subscriptions_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get users who subscribed 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_subscriptions_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 int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', '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 issue_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_subscriptions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_subscriptions`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_subscriptions`") # 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 'page' in params: + query_params.append(('page', params['page'])) # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions', '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 issue_tracked_times(self, owner, repo, index, **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, 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 user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_tracked_times_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_tracked_times_with_http_info(self, owner, repo, index, **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, 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 user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'user', 'since', 'before', 'page', '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 issue_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_tracked_times`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` 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 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/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 move_issue_pin(self, owner, repo, index, position, **kwargs): # noqa: E501 + """Moves the Pin to the given Position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.move_issue_pin(owner, repo, index, position, 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 issue (required) + :param int position: the new position (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.move_issue_pin_with_http_info(owner, repo, index, position, **kwargs) # noqa: E501 + else: + (data) = self.move_issue_pin_with_http_info(owner, repo, index, position, **kwargs) # noqa: E501 + return data + + def move_issue_pin_with_http_info(self, owner, repo, index, position, **kwargs): # noqa: E501 + """Moves the Pin to the given Position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.move_issue_pin_with_http_info(owner, repo, index, position, 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 issue (required) + :param int position: the new position (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'position'] # 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 move_issue_pin" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `move_issue_pin`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `move_issue_pin`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `move_issue_pin`") # noqa: E501 + # verify the required parameter 'position' is set + if self.api_client.client_side_validation and ('position' not in params or + params['position'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `position` when calling `move_issue_pin`") # 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 'position' in params: + path_params['position'] = params['position'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/pin/{position}', 'PATCH', + 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 pin_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Pin 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.pin_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 issue to pin (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.pin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.pin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def pin_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Pin 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.pin_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 issue to pin (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 pin_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `pin_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `pin_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `pin_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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/pin', '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 unpin_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Unpin 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.unpin_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 issue to unpin (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.unpin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.unpin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def unpin_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Unpin 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.unpin_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 issue to unpin (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 unpin_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `unpin_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `unpin_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `unpin_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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/pin', '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/gitea/api/miscellaneous_api.py b/gitea/api/miscellaneous_api.py new file mode 100644 index 0000000..bcd41a0 --- /dev/null +++ b/gitea/api/miscellaneous_api.py @@ -0,0 +1,1142 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.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_gitignore_template_info(self, name, **kwargs): # noqa: E501 + """Returns information about a gitignore template # 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_gitignore_template_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: GitignoreTemplateInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_gitignore_template_info_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.get_gitignore_template_info_with_http_info(name, **kwargs) # noqa: E501 + return data + + def get_gitignore_template_info_with_http_info(self, name, **kwargs): # noqa: E501 + """Returns information about a gitignore template # 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_gitignore_template_info_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: GitignoreTemplateInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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 get_gitignore_template_info" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_gitignore_template_info`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/gitignore/templates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitignoreTemplateInfo', # 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_label_template_info(self, name, **kwargs): # noqa: E501 + """Returns all labels in a template # 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_label_template_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: list[LabelTemplate] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_label_template_info_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.get_label_template_info_with_http_info(name, **kwargs) # noqa: E501 + return data + + def get_label_template_info_with_http_info(self, name, **kwargs): # noqa: E501 + """Returns all labels in a template # 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_label_template_info_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: list[LabelTemplate] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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 get_label_template_info" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_label_template_info`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/label/templates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LabelTemplate]', # 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_license_template_info(self, name, **kwargs): # noqa: E501 + """Returns information about a license template # 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_license_template_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the license (required) + :return: LicenseTemplateInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_license_template_info_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.get_license_template_info_with_http_info(name, **kwargs) # noqa: E501 + return data + + def get_license_template_info_with_http_info(self, name, **kwargs): # noqa: E501 + """Returns information about a license template # 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_license_template_info_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the license (required) + :return: LicenseTemplateInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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 get_license_template_info" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_license_template_info`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/licenses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LicenseTemplateInfo', # 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_node_info(self, **kwargs): # noqa: E501 + """Returns the nodeinfo 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_node_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NodeInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_node_info_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_node_info_with_http_info(**kwargs) # noqa: E501 + return data + + def get_node_info_with_http_info(self, **kwargs): # noqa: E501 + """Returns the nodeinfo 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_node_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NodeInfo + 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_node_info" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/nodeinfo', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NodeInfo', # 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_signing_key(self, **kwargs): # noqa: E501 + """Get default signing-key.gpg # 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_signing_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_signing_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_signing_key_with_http_info(**kwargs) # noqa: E501 + return data + + def get_signing_key_with_http_info(self, **kwargs): # noqa: E501 + """Get default signing-key.gpg # 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_signing_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + 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_signing_key" % 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( + ['text/plain']) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/signing-key.gpg', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=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_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', 'TOTPHeader', '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 list_gitignores_templates(self, **kwargs): # noqa: E501 + """Returns a list of all gitignore templates # 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_gitignores_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_gitignores_templates_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_gitignores_templates_with_http_info(**kwargs) # noqa: E501 + return data + + def list_gitignores_templates_with_http_info(self, **kwargs): # noqa: E501 + """Returns a list of all gitignore templates # 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_gitignores_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + 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 list_gitignores_templates" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/gitignore/templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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_label_templates(self, **kwargs): # noqa: E501 + """Returns a list of all label templates # 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_label_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_label_templates_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_label_templates_with_http_info(**kwargs) # noqa: E501 + return data + + def list_label_templates_with_http_info(self, **kwargs): # noqa: E501 + """Returns a list of all label templates # 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_label_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + 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 list_label_templates" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/label/templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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_license_templates(self, **kwargs): # noqa: E501 + """Returns a list of all license templates # 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_license_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[LicensesTemplateListEntry] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_license_templates_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_license_templates_with_http_info(**kwargs) # noqa: E501 + return data + + def list_license_templates_with_http_info(self, **kwargs): # noqa: E501 + """Returns a list of all license templates # 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_license_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[LicensesTemplateListEntry] + 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 list_license_templates" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/licenses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LicensesTemplateListEntry]', # 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: str + 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: str + 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', 'TOTPHeader', '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='str', # 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: str + 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: str + 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 self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='str', # 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_markup(self, **kwargs): # noqa: E501 + """Render a markup 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_markup(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkupOption body: + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.render_markup_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.render_markup_with_http_info(**kwargs) # noqa: E501 + return data + + def render_markup_with_http_info(self, **kwargs): # noqa: E501 + """Render a markup 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_markup_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkupOption body: + :return: str + 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_markup" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=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/gitea/api/notification_api.py b/gitea/api/notification_api.py new file mode 100644 index 0000000..f566716 --- /dev/null +++ b/gitea/api/notification_api.py @@ -0,0 +1,803 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.api_client import ApiClient + + +class NotificationApi(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 notify_get_list(self, **kwargs): # noqa: E501 + """List users's notification threads # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_get_list_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_get_list_with_http_info(self, **kwargs): # noqa: E501 + """List users's notification threads # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['all', 'status_types', 'subject_type', 'since', 'before', 'page', '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 notify_get_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'subject_type' in params: + query_params.append(('subject-type', params['subject_type'])) # noqa: E501 + collection_formats['subject-type'] = 'multi' # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_get_repo_list(self, owner, repo, **kwargs): # noqa: E501 + """List users's notification threads on a specific 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.notify_get_repo_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) + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def notify_get_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List users's notification threads on a specific 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.notify_get_repo_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) + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'all', 'status_types', 'subject_type', 'since', 'before', 'page', '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 notify_get_repo_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `notify_get_repo_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `notify_get_repo_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 = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'subject_type' in params: + query_params.append(('subject-type', params['subject_type'])) # noqa: E501 + collection_formats['subject-type'] = 'multi' # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/notifications', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_get_thread(self, id, **kwargs): # noqa: E501 + """Get notification thread 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.notify_get_thread(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501 + return data + + def notify_get_thread_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification thread 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.notify_get_thread_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: NotificationThread + 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 notify_get_thread" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `notify_get_thread`") # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/threads/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationThread', # 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 notify_new_available(self, **kwargs): # noqa: E501 + """Check if unread notifications exist # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_new_available(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationCount + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_new_available_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_new_available_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_new_available_with_http_info(self, **kwargs): # noqa: E501 + """Check if unread notifications exist # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_new_available_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationCount + 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 notify_new_available" % 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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/new', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationCount', # 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 notify_read_list(self, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as, Defaults to read. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_read_list_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_read_list_with_http_info(self, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as, Defaults to read. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['last_read_at', 'all', 'status_types', 'to_status'] # 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 notify_read_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'last_read_at' in params: + query_params.append(('last_read_at', params['last_read_at'])) # noqa: E501 + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_read_repo_list(self, owner, repo, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread on a specific 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.notify_read_repo_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) + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as. Defaults to read. + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def notify_read_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread on a specific 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.notify_read_repo_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) + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as. Defaults to read. + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'all', 'status_types', 'to_status', 'last_read_at'] # 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 notify_read_repo_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `notify_read_repo_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `notify_read_repo_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 = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # noqa: E501 + if 'last_read_at' in params: + query_params.append(('last_read_at', params['last_read_at'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/notifications', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_read_thread(self, id, **kwargs): # noqa: E501 + """Mark notification thread as read 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.notify_read_thread(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :param str to_status: Status to mark notifications as + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501 + return data + + def notify_read_thread_with_http_info(self, id, **kwargs): # noqa: E501 + """Mark notification thread as read 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.notify_read_thread_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :param str to_status: Status to mark notifications as + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'to_status'] # 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 notify_read_thread" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `notify_read_thread`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/threads/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationThread', # 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/gitea/api/organization_api.py b/gitea/api/organization_api.py new file mode 100644 index 0000000..23f6a71 --- /dev/null +++ b/gitea/api/organization_api.py @@ -0,0 +1,6199 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{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 create_org_repo_deprecated(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_deprecated(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_deprecated_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.create_org_repo_deprecated_with_http_info(org, **kwargs) # noqa: E501 + return data + + def create_org_repo_deprecated_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_deprecated_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_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `create_org_repo_deprecated`") # 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', 'TOTPHeader', '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 create_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Create an org-level variable # 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_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption 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.create_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.create_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def create_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Create an org-level variable # 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_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename', '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_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `create_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `create_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', '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 delete_org_secret(self, org, secretname, **kwargs): # noqa: E501 + """Delete a secret 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.delete_org_secret(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (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.delete_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + else: + (data) = self.delete_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + return data + + def delete_org_secret_with_http_info(self, org, secretname, **kwargs): # noqa: E501 + """Delete a secret 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.delete_org_secret_with_http_info(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'secretname'] # 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 delete_org_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `delete_org_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `delete_org_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/secrets/{secretname}', '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 delete_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Delete an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.delete_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def delete_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Delete an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename'] # 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 delete_org_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `delete_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `delete_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Get an org-level variable # 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_org_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.get_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def get_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Get an org-level variable # 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_org_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename'] # 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_org_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `get_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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_org_variables_list(self, org, **kwargs): # noqa: E501 + """Get an org-level variables list # 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_org_variables_list(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_variables_list_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.get_org_variables_list_with_http_info(org, **kwargs) # noqa: E501 + return data + + def get_org_variables_list_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an org-level variables list # 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_org_variables_list_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 get_org_variables_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_variables_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ActionVariable]', # 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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_add_team_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_add_team_repository`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_add_team_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_conceal_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('organization' not in params or + params['organization'] is None): # noqa: E501 + 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', 'TOTPHeader', '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: Hook + 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: Hook + 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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_create_hook`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='Hook', # 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_label(self, org, **kwargs): # noqa: E501 + """Create a label for 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_label(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (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.org_create_label_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_create_label_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_create_label_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a label for 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_label_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateLabelOption body: + :return: Label + 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_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_create_label`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/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 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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_avatar(self, org, **kwargs): # noqa: E501 + """Delete Avatar # 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_avatar(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (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_avatar_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_avatar_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_delete_avatar_with_http_info(self, org, **kwargs): # noqa: E501 + """Delete Avatar # 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_avatar_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (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_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_avatar`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/avatar', '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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_label(self, org, 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.org_delete_label(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 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.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_delete_label_with_http_info(self, org, 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.org_delete_label_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 label 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_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_delete_label`") # 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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/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 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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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, body, **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, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: (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_edit_with_http_info(org, body, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_with_http_info(org, body, **kwargs) # noqa: E501 + return data + + def org_edit_with_http_info(self, org, body, **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, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: (required) + :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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_edit`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` 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', 'TOTPHeader', '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: Hook + 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: Hook + 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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_edit_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='Hook', # 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_label(self, org, 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.org_edit_label(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 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.org_edit_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_edit_label_with_http_info(self, org, 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.org_edit_label_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 label to edit (required) + :param EditLabelOption body: + :return: Label + 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_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_edit_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_edit_label`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/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 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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_all(self, **kwargs): # noqa: E501 + """Get list of 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_get_all(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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_get_all_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.org_get_all_with_http_info(**kwargs) # noqa: E501 + return data + + def org_get_all_with_http_info(self, **kwargs): # noqa: E501 + """Get list of 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_get_all_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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 org_get_all" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/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_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: Hook + 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: Hook + 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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='Hook', # 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_label(self, org, 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.org_get_label(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 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.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_get_label_with_http_info(self, org, 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.org_get_label_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 label to get (required) + :return: Label + 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_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_get_label`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/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 org_get_runner_registration_token(self, org, **kwargs): # noqa: E501 + """Get an organization's actions runner registration 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.org_get_runner_registration_token(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (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_get_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_get_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_get_runner_registration_token_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an organization's actions runner registration 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.org_get_runner_registration_token_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (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_get_runner_registration_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_runner_registration_token`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/runners/registration-token', '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_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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_get_user_permissions(self, username, org, **kwargs): # noqa: E501 + """Get user permissions in 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_user_permissions(username, org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param str org: name of the organization (required) + :return: OrganizationPermissions + 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_user_permissions_with_http_info(username, org, **kwargs) # noqa: E501 + else: + (data) = self.org_get_user_permissions_with_http_info(username, org, **kwargs) # noqa: E501 + return data + + def org_get_user_permissions_with_http_info(self, username, org, **kwargs): # noqa: E501 + """Get user permissions in 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_user_permissions_with_http_info(username, org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param str org: name of the organization (required) + :return: OrganizationPermissions + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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_user_permissions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_get_user_permissions`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_user_permissions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/orgs/{org}/permissions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrganizationPermissions', # 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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_is_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_is_public_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_actions_secrets(self, org, **kwargs): # noqa: E501 + """List an organization's actions secrets # 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_actions_secrets(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + 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_actions_secrets_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_actions_secrets_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_actions_secrets_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's actions secrets # 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_actions_secrets_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 org_list_actions_secrets" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_actions_secrets`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/secrets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Secret]', # 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_activity_feeds(self, org, **kwargs): # noqa: E501 + """List an organization's activity feeds # 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_activity_feeds(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the org (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + 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_activity_feeds_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_activity_feeds_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_activity_feeds_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's activity feeds # 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_activity_feeds_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the org (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '_date', 'page', '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 org_list_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_activity_feeds`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if '_date' in params: + query_params.append(('date', params['_date'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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 org_list_current_user_orgs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 org_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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[Hook]', # 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_labels(self, org, **kwargs): # noqa: E501 + """List an organization'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.org_list_labels(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.org_list_labels_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_labels_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_labels_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization'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.org_list_labels_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 org_list_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/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 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 org_list_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 org_list_public_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 org_list_repos" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_activity_feeds(self, id, **kwargs): # noqa: E501 + """List a team's activity feeds # 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_activity_feeds(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + 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_activity_feeds_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_activity_feeds_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_activity_feeds_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's activity feeds # 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_activity_feeds_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', '_date', 'page', '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 org_list_team_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_activity_feeds`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if '_date' in params: + query_params.append(('date', params['_date'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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_member(self, id, username, **kwargs): # noqa: E501 + """List a particular member of 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_list_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 member to list (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.org_list_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_list_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """List a particular member of 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_list_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 member to list (required) + :return: User + 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_list_team_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_list_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members/{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 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'page', '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 org_list_team_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_repo(self, id, org, repo, **kwargs): # noqa: E501 + """List a particular repo of 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_list_team_repo(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 list (required) + :param str repo: name of the repo to list (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.org_list_team_repo_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_repo_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_list_team_repo_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """List a particular repo of 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_list_team_repo_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 list (required) + :param str repo: name of the repo to list (required) + :return: Repository + 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_list_team_repo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_repo`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_team_repo`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `org_list_team_repo`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos/{org}/{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 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'page', '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 org_list_team_repos" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 org_list_teams" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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 org_list_user_orgs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_publicize_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_remove_team_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_remove_team_repository`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_remove_team_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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) + + def org_update_avatar(self, org, **kwargs): # noqa: E501 + """Update Avatar # 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_update_avatar(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param UpdateUserAvatarOption 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.org_update_avatar_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_update_avatar_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_update_avatar_with_http_info(self, org, **kwargs): # noqa: E501 + """Update Avatar # 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_update_avatar_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param UpdateUserAvatarOption body: + :return: None + 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_update_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_update_avatar`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/avatar', '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 organization_block_user(self, org, username, **kwargs): # noqa: E501 + """Block 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.organization_block_user(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: user to block (required) + :param str note: optional note for the block + :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.organization_block_user_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.organization_block_user_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def organization_block_user_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Block 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.organization_block_user_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: user to block (required) + :param str note: optional note for the block + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username', 'note'] # 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 organization_block_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_block_user`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `organization_block_user`") # 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 = [] + if 'note' in params: + query_params.append(('note', params['note'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks/{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 organization_check_user_block(self, org, username, **kwargs): # noqa: E501 + """Check if a user is blocked by the 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.organization_check_user_block(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: user to check (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.organization_check_user_block_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.organization_check_user_block_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def organization_check_user_block_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is blocked by the 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.organization_check_user_block_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: user to check (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 organization_check_user_block" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_check_user_block`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `organization_check_user_block`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks/{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 organization_list_blocks(self, org, **kwargs): # noqa: E501 + """List users blocked by the 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.organization_list_blocks(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.organization_list_blocks_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.organization_list_blocks_with_http_info(org, **kwargs) # noqa: E501 + return data + + def organization_list_blocks_with_http_info(self, org, **kwargs): # noqa: E501 + """List users blocked by the 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.organization_list_blocks_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', '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 organization_list_blocks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_list_blocks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks', '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 organization_unblock_user(self, org, username, **kwargs): # noqa: E501 + """Unblock 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.organization_unblock_user(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: user to unblock (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.organization_unblock_user_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.organization_unblock_user_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def organization_unblock_user_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Unblock 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.organization_unblock_user_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: user to unblock (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 organization_unblock_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_unblock_user`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `organization_unblock_user`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks/{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 team_search(self, org, **kwargs): # noqa: E501 + """Search for teams within 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.team_search(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str q: keywords to search + :param bool include_desc: include search within team description (defaults to true) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.team_search_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.team_search_with_http_info(org, **kwargs) # noqa: E501 + return data + + def team_search_with_http_info(self, org, **kwargs): # noqa: E501 + """Search for teams within 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.team_search_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str q: keywords to search + :param bool include_desc: include search within team description (defaults to true) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'q', 'include_desc', 'page', '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 team_search" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `team_search`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'include_desc' in params: + query_params.append(('include_desc', params['include_desc'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/teams/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 update_org_secret(self, org, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value 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.update_org_secret(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption 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.update_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + else: + (data) = self.update_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + return data + + def update_org_secret_with_http_info(self, org, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value 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.update_org_secret_with_http_info(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'secretname', '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 update_org_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `update_org_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `update_org_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/secrets/{secretname}', '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 update_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Update an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_org_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption 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.update_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.update_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def update_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Update an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_org_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename', '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 update_org_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `update_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `update_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', '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) diff --git a/gitea/api/package_api.py b/gitea/api/package_api.py new file mode 100644 index 0000000..ec8b2b2 --- /dev/null +++ b/gitea/api/package_api.py @@ -0,0 +1,510 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.api_client import ApiClient + + +class PackageApi(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 delete_package(self, owner, type, name, version, **kwargs): # noqa: E501 + """Delete a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_package(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (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.delete_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + else: + (data) = self.delete_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + return data + + def delete_package_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501 + """Delete a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_package_with_http_info(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'version'] # 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 delete_package" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_package`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `delete_package`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `delete_package`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in params or + params['version'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `version` when calling `delete_package`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'version' in params: + path_params['version'] = params['version'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/{version}', '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 get_package(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets a package # 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_package(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: Package + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + else: + (data) = self.get_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + return data + + def get_package_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets a package # 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_package_with_http_info(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: Package + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'version'] # 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_package" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_package`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `get_package`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_package`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in params or + params['version'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `version` when calling `get_package`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'version' in params: + path_params['version'] = params['version'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/{version}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Package', # 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_package_files(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets all files of a package # 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_package_files(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: list[PackageFile] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_package_files_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + else: + (data) = self.list_package_files_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + return data + + def list_package_files_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets all files of a package # 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_package_files_with_http_info(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: list[PackageFile] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'version'] # 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_package_files" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_package_files`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `list_package_files`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `list_package_files`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in params or + params['version'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `version` when calling `list_package_files`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'version' in params: + path_params['version'] = params['version'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/{version}/files', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PackageFile]', # 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_packages(self, owner, **kwargs): # noqa: E501 + """Gets all packages of an owner # 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_packages(owner, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the packages (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str type: package type filter + :param str q: name filter + :return: list[Package] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_packages_with_http_info(owner, **kwargs) # noqa: E501 + else: + (data) = self.list_packages_with_http_info(owner, **kwargs) # noqa: E501 + return data + + def list_packages_with_http_info(self, owner, **kwargs): # noqa: E501 + """Gets all packages of an owner # 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_packages_with_http_info(owner, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the packages (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str type: package type filter + :param str q: name filter + :return: list[Package] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'page', 'limit', 'type', '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 list_packages" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_packages`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + + query_params = [] + 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 'type' in params: + query_params.append(('type', params['type'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Package]', # 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/gitea/api/repository_api.py b/gitea/api/repository_api.py new file mode 100644 index 0000000..e35b039 --- /dev/null +++ b/gitea/api/repository_api.py @@ -0,0 +1,18929 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.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 accept_repo_transfer(self, owner, repo, **kwargs): # noqa: E501 + """Accept a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.accept_repo_transfer(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (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.accept_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.accept_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def accept_repo_transfer_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Accept a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.accept_repo_transfer_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (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 accept_repo_transfer" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `accept_repo_transfer`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `accept_repo_transfer`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/transfer/accept', '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_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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `create_fork`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 create_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Create a repo-level variable # 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_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption 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.create_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.create_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def create_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Create a repo-level variable # 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_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename', '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_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `create_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `create_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `create_repo_variable`") # 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 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', '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 delete_repo_secret(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Delete a secret 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.delete_repo_secret(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (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.delete_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + else: + (data) = self.delete_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + return data + + def delete_repo_secret_with_http_info(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Delete a secret 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.delete_repo_secret_with_http_info(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'secretname'] # 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 delete_repo_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_repo_secret`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `delete_repo_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `delete_repo_secret`") # 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 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/secrets/{secretname}', '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 delete_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Delete a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.delete_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def delete_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Delete a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename'] # 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 delete_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `delete_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `delete_repo_variable`") # 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 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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 generate_repo(self, template_owner, template_repo, **kwargs): # noqa: E501 + """Create a repository using a template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_repo(template_owner, template_repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str template_owner: name of the template repository owner (required) + :param str template_repo: name of the template repository (required) + :param GenerateRepoOption 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.generate_repo_with_http_info(template_owner, template_repo, **kwargs) # noqa: E501 + else: + (data) = self.generate_repo_with_http_info(template_owner, template_repo, **kwargs) # noqa: E501 + return data + + def generate_repo_with_http_info(self, template_owner, template_repo, **kwargs): # noqa: E501 + """Create a repository using a template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_repo_with_http_info(template_owner, template_repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str template_owner: name of the template repository owner (required) + :param str template_repo: name of the template repository (required) + :param GenerateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['template_owner', 'template_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 generate_repo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'template_owner' is set + if self.api_client.client_side_validation and ('template_owner' not in params or + params['template_owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `template_owner` when calling `generate_repo`") # noqa: E501 + # verify the required parameter 'template_repo' is set + if self.api_client.client_side_validation and ('template_repo' not in params or + params['template_repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `template_repo` when calling `generate_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'template_owner' in params: + path_params['template_owner'] = params['template_owner'] # noqa: E501 + if 'template_repo' in params: + path_params['template_repo'] = params['template_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{template_owner}/{template_repo}/generate', '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_annotated_tag(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tag object of an annotated tag (not lightweight tags) # 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_annotated_tag(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 tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + :return: AnnotatedTag + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_annotated_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_annotated_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_annotated_tag_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tag object of an annotated tag (not lightweight tags) # 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_annotated_tag_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 tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + :return: AnnotatedTag + 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_annotated_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_annotated_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_annotated_tag`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `get_annotated_tag`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/tags/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AnnotatedTag', # 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_blob(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the blob 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_blob(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: GitBlobResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_blob_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the blob 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_blob_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: GitBlobResponse + 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_blob" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_blob`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_blob`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `get_blob`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/blobs/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitBlobResponse', # 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_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Get a repo-level variable # 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_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.get_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def get_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Get a repo-level variable # 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_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename'] # 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_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `get_repo_variable`") # 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 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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_repo_variables_list(self, owner, repo, **kwargs): # noqa: E501 + """Get repo-level variables list # 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_repo_variables_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_repo_variables_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.get_repo_variables_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def get_repo_variables_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get repo-level variables list # 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_repo_variables_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 get_repo_variables_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_repo_variables_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_repo_variables_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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ActionVariable]', # 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) + :param bool recursive: show all directories and files + :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page + :param int per_page: number of items per page + :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) + :param bool recursive: show all directories and files + :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page + :param int per_page: number of items per page + :return: GitTreeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'recursive', 'page', 'per_page'] # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_tree`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_tree`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + 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 = [] + if 'recursive' in params: + query_params.append(('recursive', params['recursive'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'per_page' in params: + query_params.append(('per_page', params['per_page'])) # 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', 'TOTPHeader', '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_action_tasks(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's action tasks # 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_action_tasks(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 of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: ActionTaskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_action_tasks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_action_tasks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_action_tasks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's action tasks # 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_action_tasks_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 of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: ActionTaskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 list_action_tasks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_action_tasks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `list_action_tasks`") # 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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/tasks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionTaskResponse', # 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 list_forks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_forks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 reject_repo_transfer(self, owner, repo, **kwargs): # noqa: E501 + """Reject a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reject_repo_transfer(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (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.reject_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.reject_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def reject_repo_transfer_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Reject a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reject_repo_transfer_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (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 reject_repo_transfer" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `reject_repo_transfer`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `reject_repo_transfer`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/transfer/reject', '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_add_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Add or Update 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 or Update 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_add_push_mirror(self, owner, repo, **kwargs): # noqa: E501 + """add a push mirror to the 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_push_mirror(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 CreatePushMirrorOption body: + :return: PushMirror + 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_push_mirror_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_push_mirror_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_add_push_mirror_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """add a push mirror to the 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_push_mirror_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 CreatePushMirrorOption body: + :return: PushMirror + 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_add_push_mirror" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_push_mirror`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_push_mirror`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PushMirror', # 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_team(self, owner, repo, team, **kwargs): # noqa: E501 + """Add a team 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_team(owner, repo, team, 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 team: team name (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_add_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + return data + + def repo_add_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 + """Add a team 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_team_with_http_info(owner, repo, team, 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 team: team name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'team'] # 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_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_team`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_team`") # noqa: E501 + # verify the required parameter 'team' is set + if self.api_client.client_side_validation and ('team' not in params or + params['team'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `team` when calling `repo_add_team`") # 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 'team' in params: + path_params['team'] = params['team'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/teams/{team}', '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_add_topic(self, owner, repo, topic, **kwargs): # noqa: E501 + """Add a topic 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_topic(owner, repo, topic, 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 topic: name of the topic 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.repo_add_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + return data + + def repo_add_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 + """Add a topic 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_topic_with_http_info(owner, repo, topic, 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 topic: name of the topic to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'topic'] # 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_topic" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_topic`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_topic`") # noqa: E501 + # verify the required parameter 'topic' is set + if self.api_client.client_side_validation and ('topic' not in params or + params['topic'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `topic` when calling `repo_add_topic`") # 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 'topic' in params: + path_params['topic'] = params['topic'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics/{topic}', '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_apply_diff_patch(self, owner, repo, body, **kwargs): # noqa: E501 + """Apply diff patch to 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_apply_diff_patch(owner, repo, body, 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 UpdateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_apply_diff_patch_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_apply_diff_patch_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_apply_diff_patch_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Apply diff patch to 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_apply_diff_patch_with_http_info(owner, repo, body, 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 UpdateFileOptions body: (required) + :return: FileResponse + 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_apply_diff_patch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_apply_diff_patch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_apply_diff_patch`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_apply_diff_patch`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/diffpatch', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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_cancel_scheduled_auto_merge(self, owner, repo, index, **kwargs): # noqa: E501 + """Cancel the scheduled auto merge for the given 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_cancel_scheduled_auto_merge(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_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_cancel_scheduled_auto_merge_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Cancel the scheduled auto merge for the given 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_cancel_scheduled_auto_merge_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_cancel_scheduled_auto_merge" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_cancel_scheduled_auto_merge`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/merge', '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_change_files(self, owner, repo, body, **kwargs): # noqa: E501 + """Modify multiple files 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_change_files(owner, repo, body, 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 ChangeFilesOptions body: (required) + :return: FilesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_change_files_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_change_files_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_change_files_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Modify multiple files 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_change_files_with_http_info(owner, repo, body, 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 ChangeFilesOptions body: (required) + :return: FilesResponse + 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_change_files" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_change_files`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_change_files`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_change_files`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FilesResponse', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_check_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_check_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_check_team(self, owner, repo, team, **kwargs): # noqa: E501 + """Check if a team is assigned 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_check_team(owner, repo, team, 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 team: team name (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.repo_check_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + else: + (data) = self.repo_check_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + return data + + def repo_check_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 + """Check if a team is assigned 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_check_team_with_http_info(owner, repo, team, 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 team: team name (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'team'] # 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_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_check_team`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_check_team`") # noqa: E501 + # verify the required parameter 'team' is set + if self.api_client.client_side_validation and ('team' not in params or + params['team'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `team` when calling `repo_check_team`") # 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 'team' in params: + path_params['team'] = params['team'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/teams/{team}', '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 repo_compare_diff(self, owner, repo, basehead, **kwargs): # noqa: E501 + """Get commit comparison information # 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_compare_diff(owner, repo, basehead, 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 basehead: compare two branches or commits (required) + :return: Compare + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_compare_diff_with_http_info(owner, repo, basehead, **kwargs) # noqa: E501 + else: + (data) = self.repo_compare_diff_with_http_info(owner, repo, basehead, **kwargs) # noqa: E501 + return data + + def repo_compare_diff_with_http_info(self, owner, repo, basehead, **kwargs): # noqa: E501 + """Get commit comparison information # 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_compare_diff_with_http_info(owner, repo, basehead, 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 basehead: compare two branches or commits (required) + :return: Compare + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'basehead'] # 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_compare_diff" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_compare_diff`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_compare_diff`") # noqa: E501 + # verify the required parameter 'basehead' is set + if self.api_client.client_side_validation and ('basehead' not in params or + params['basehead'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `basehead` when calling `repo_compare_diff`") # 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 'basehead' in params: + path_params['basehead'] = params['basehead'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/compare/{basehead}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Compare', # 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_branch(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch # 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_branch(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 CreateBranchRepoOption body: + :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_create_branch_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_branch_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_branch_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch # 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_branch_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 CreateBranchRepoOption body: + :return: 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_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches', 'POST', + 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_create_branch_protection(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch protections for 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_branch_protection(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 CreateBranchProtectionOption body: + :return: BranchProtection + 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_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch protections for 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_branch_protection_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 CreateBranchProtectionOption body: + :return: BranchProtection + 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_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_branch_protection`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # 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_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Create 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_create_file(owner, repo, filepath, body, 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: path of the file to create (required) + :param CreateFileOptions body: (required) + :return: FileResponse + 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_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_create_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Create 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_create_file_with_http_info(owner, repo, filepath, body, 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: path of the file to create (required) + :param CreateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_create_file`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_create_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 + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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: Hook + 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: Hook + 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='Hook', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_pull_review(self, owner, repo, index, body, **kwargs): # noqa: E501 + """Create a review to an 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_review(owner, repo, index, body, 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) + :param CreatePullReviewOptions body: (required) + :return: PullReview + 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_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + return data + + def repo_create_pull_review_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 + """Create a review to an 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_review_with_http_info(owner, repo, index, body, 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) + :param CreatePullReviewOptions body: (required) + :return: PullReview + 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_create_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_create_pull_review`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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_review_requests(self, owner, repo, index, body, **kwargs): # noqa: E501 + """create review requests for 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_review_requests(owner, repo, index, body, 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) + :param PullReviewRequestOptions body: (required) + :return: list[PullReview] + 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_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + return data + + def repo_create_pull_review_requests_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 + """create review requests for 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_review_requests_with_http_info(owner, repo, index, body, 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) + :param PullReviewRequestOptions body: (required) + :return: list[PullReview] + 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_create_pull_review_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_review_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_review_requests`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_create_pull_review_requests`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_create_pull_review_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 + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/requested_reviewers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullReview]', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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, **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, 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 str name: name of the attachment + :param file attachment: attachment to upload + :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, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_release_attachment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_create_release_attachment_with_http_info(self, owner, repo, id, **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, 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 str name: name of the attachment + :param file attachment: attachment to upload + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'name', 'attachment'] # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` 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', 'application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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: CommitStatus + 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: CommitStatus + 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_status`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_status`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='CommitStatus', # 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_tag(self, owner, repo, **kwargs): # noqa: E501 + """Create a new git tag 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_create_tag(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 CreateTagOption body: + :return: Tag + 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_tag_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_tag_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_tag_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a new git tag 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_create_tag_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 CreateTagOption body: + :return: Tag + 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_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_tag`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Tag', # 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_tag_protection(self, owner, repo, **kwargs): # noqa: E501 + """Create a tag protections for 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_tag_protection(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 CreateTagProtectionOption body: + :return: TagProtection + 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_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_tag_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a tag protections for 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_tag_protection_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 CreateTagProtectionOption body: + :return: TagProtection + 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_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_tag_protection`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TagProtection', # 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_wiki_page(self, owner, repo, **kwargs): # noqa: E501 + """Create a wiki page # 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_wiki_page(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 CreateWikiPageOptions body: + :return: WikiPage + 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_wiki_page_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_wiki_page_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_wiki_page_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a wiki page # 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_wiki_page_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 CreateWikiPageOptions body: + :return: WikiPage + 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_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_wiki_page`") # 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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/new', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiPage', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_avatar(self, owner, repo, **kwargs): # noqa: E501 + """Delete avatar # 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_avatar(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.repo_delete_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_delete_avatar_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Delete avatar # 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_avatar_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 repo_delete_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_avatar`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_avatar`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/avatar', '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_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Delete 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_delete_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 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_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return data + + def repo_delete_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Delete 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_delete_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 delete (required) + :return: None + 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_delete_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if self.api_client.client_side_validation and ('branch' not in params or + params['branch'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `branch` when calling `repo_delete_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches/{branch}', '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_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Delete a specific branch protection for the 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_branch_protection(owner, repo, name, 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 name: name of protected branch (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_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_delete_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Delete a specific branch protection for the 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_branch_protection_with_http_info(owner, repo, name, 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 name: name of protected branch (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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_delete_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_delete_branch_protection`") # 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 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/{name}', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Delete 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_delete_file(owner, repo, filepath, body, 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: path of the file to delete (required) + :param DeleteFileOptions body: (required) + :return: FileDeleteResponse + 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_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Delete 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_delete_file_with_http_info(owner, repo, filepath, body, 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: path of the file to delete (required) + :param DeleteFileOptions body: (required) + :return: FileDeleteResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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_delete_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_delete_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 + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileDeleteResponse', # 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_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a Git 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_git_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 str id: id of the hook 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_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a Git 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_git_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 str id: id of the hook to get (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_git_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_git_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_git_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_git_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git/{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_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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a specific review from 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_delete_pull_review(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 pull request (required) + :param int id: id of the review (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_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_delete_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a specific review from 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_delete_pull_review_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 pull request (required) + :param int id: id of the review (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 repo_delete_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_pull_review`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{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_pull_review_requests(self, owner, repo, index, body, **kwargs): # noqa: E501 + """cancel review requests for 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_delete_pull_review_requests(owner, repo, index, body, 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) + :param PullReviewRequestOptions body: (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_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + return data + + def repo_delete_pull_review_requests_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 + """cancel review requests for 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_delete_pull_review_requests_with_http_info(owner, repo, index, body, 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) + :param PullReviewRequestOptions body: (required) + :return: None + 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_delete_pull_review_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_pull_review_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_pull_review_requests`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_delete_pull_review_requests`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_delete_pull_review_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 + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/requested_reviewers', '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_push_mirror(self, owner, repo, name, **kwargs): # noqa: E501 + """deletes a push mirror from a repository by remoteName # 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_push_mirror(owner, repo, name, 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 name: remote name of the pushMirror (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_push_mirror_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_push_mirror_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_delete_push_mirror_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """deletes a push mirror from a repository by remoteName # 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_push_mirror_with_http_info(owner, repo, name, 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 name: remote name of the pushMirror (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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_delete_push_mirror" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_push_mirror`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_push_mirror`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_delete_push_mirror`") # 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 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors/{name}', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_delete_release_by_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a release by tag name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_by_tag(owner, repo, tag, 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 tag: tag name 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_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_delete_release_by_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a release by tag name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_by_tag_with_http_info(owner, repo, tag, 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 tag: tag name of the release to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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_by_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_by_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_by_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_delete_release_by_tag`") # 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 'tag' in params: + path_params['tag'] = params['tag'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/tags/{tag}', '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_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a repository's tag by name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_tag(owner, repo, tag, 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 tag: name of tag 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_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_delete_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a repository's tag by name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_tag_with_http_info(owner, repo, tag, 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 tag: name of tag to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_delete_tag`") # 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 'tag' in params: + path_params['tag'] = params['tag'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags/{tag}', '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_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a specific tag protection for the 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_tag_protection(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 protected tag (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_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a specific tag protection for the 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_tag_protection_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 protected tag (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_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_tag_protection`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_tag_protection`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections/{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_team(self, owner, repo, team, **kwargs): # noqa: E501 + """Delete a team 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_team(owner, repo, team, 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 team: team name (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_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + return data + + def repo_delete_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 + """Delete a team 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_team_with_http_info(owner, repo, team, 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 team: team name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'team'] # 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_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_team`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_team`") # noqa: E501 + # verify the required parameter 'team' is set + if self.api_client.client_side_validation and ('team' not in params or + params['team'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `team` when calling `repo_delete_team`") # 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 'team' in params: + path_params['team'] = params['team'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/teams/{team}', '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_topic(self, owner, repo, topic, **kwargs): # noqa: E501 + """Delete a topic 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_topic(owner, repo, topic, 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 topic: name of the topic 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_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + return data + + def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 + """Delete a topic 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_topic_with_http_info(owner, repo, topic, 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 topic: name of the topic to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'topic'] # 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_topic" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_topic`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_topic`") # noqa: E501 + # verify the required parameter 'topic' is set + if self.api_client.client_side_validation and ('topic' not in params or + params['topic'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `topic` when calling `repo_delete_topic`") # 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 'topic' in params: + path_params['topic'] = params['topic'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics/{topic}', '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_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Delete a wiki page # 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_wiki_page(owner, repo, page_name, 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 page_name: name of the page (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_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_delete_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Delete a wiki page # 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_wiki_page_with_http_info(owner, repo, page_name, 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 page_name: name of the page (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_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_delete_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_wiki_page`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_delete_wiki_page`") # 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 'page_name' in params: + path_params['pageName'] = params['page_name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/page/{pageName}', '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_dismiss_pull_review(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Dismiss a review for 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_dismiss_pull_review(owner, repo, index, id, body, 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) + :param int id: id of the review (required) + :param DismissPullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + return data + + def repo_dismiss_pull_review_with_http_info(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Dismiss a review for 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_dismiss_pull_review_with_http_info(owner, repo, index, id, body, 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) + :param int id: id of the review (required) + :param DismissPullReviewOptions body: (required) + :return: PullReview + 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 repo_dismiss_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_dismiss_pull_review`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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_download_commit_diff_or_patch(self, owner, repo, sha, diff_type, **kwargs): # noqa: E501 + """Get a commit's diff or patch # 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_download_commit_diff_or_patch(owner, repo, sha, diff_type, 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 to get (required) + :param str diff_type: whether the output is diff or patch (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, **kwargs) # noqa: E501 + else: + (data) = self.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, **kwargs) # noqa: E501 + return data + + def repo_download_commit_diff_or_patch_with_http_info(self, owner, repo, sha, diff_type, **kwargs): # noqa: E501 + """Get a commit's diff or patch # 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_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, 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 to get (required) + :param str diff_type: whether the output is diff or patch (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'diff_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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_download_commit_diff_or_patch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 + # verify the required parameter 'diff_type' is set + if self.api_client.client_side_validation and ('diff_type' not in params or + params['diff_type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `diff_type` when calling `repo_download_commit_diff_or_patch`") # 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 + if 'diff_type' in params: + path_params['diffType'] = params['diff_type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/commits/{sha}.{diffType}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=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_download_pull_diff_or_patch(self, owner, repo, index, diff_type, **kwargs): # noqa: E501 + """Get a pull request diff or patch # 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_download_pull_diff_or_patch(owner, repo, index, diff_type, 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) + :param str diff_type: whether the output is diff or patch (required) + :param bool binary: whether to include binary file changes. if true, the diff is applicable with `git apply` + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, **kwargs) # noqa: E501 + else: + (data) = self.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, **kwargs) # noqa: E501 + return data + + def repo_download_pull_diff_or_patch_with_http_info(self, owner, repo, index, diff_type, **kwargs): # noqa: E501 + """Get a pull request diff or patch # 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_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, 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) + :param str diff_type: whether the output is diff or patch (required) + :param bool binary: whether to include binary file changes. if true, the diff is applicable with `git apply` + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'diff_type', 'binary'] # 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_download_pull_diff_or_patch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 + # verify the required parameter 'diff_type' is set + if self.api_client.client_side_validation and ('diff_type' not in params or + params['diff_type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `diff_type` when calling `repo_download_pull_diff_or_patch`") # 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 'diff_type' in params: + path_params['diffType'] = params['diff_type'] # noqa: E501 + + query_params = [] + if 'binary' in params: + query_params.append(('binary', params['binary'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}.{diffType}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=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(self, owner, repo, **kwargs): # noqa: E501 + """Edit a repository's properties. Only fields that are set will be changed. # 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(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to edit (required) + :param str repo: name of the repo to edit (required) + :param EditRepoOption body: Properties of a repo that you can edit + :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_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Edit a repository's properties. Only fields that are set will be changed. # 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_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to edit (required) + :param str repo: name of the repo to edit (required) + :param EditRepoOption body: Properties of a repo that you can edit + :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 repo_edit" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}', 'PATCH', + 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_edit_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Edit a branch protections for a repository. Only fields that are set will be changed # 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_branch_protection(owner, repo, name, 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 name: name of protected branch (required) + :param EditBranchProtectionOption body: + :return: BranchProtection + 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_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_edit_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Edit a branch protections for a repository. Only fields that are set will be changed # 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_branch_protection_with_http_info(owner, repo, name, 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 name: name of protected branch (required) + :param EditBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'name', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_edit_branch_protection`") # 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 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # 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_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a Git 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_git_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 str id: id of the hook to get (required) + :param EditGitHookOption body: + :return: GitHook + 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_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a Git 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_git_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 str id: id of the hook to get (required) + :param EditGitHookOption body: + :return: GitHook + 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_git_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_git_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_git_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_git_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitHook', # 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: Hook + 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: Hook + 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='Hook', # 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. 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.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. 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.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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_edit_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a tag protections for a repository. Only fields that are set will be changed # 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_tag_protection(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 protected tag (required) + :param EditTagProtectionOption body: + :return: TagProtection + 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_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a tag protections for a repository. Only fields that are set will be changed # 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_tag_protection_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 protected tag (required) + :param EditTagProtectionOption body: + :return: TagProtection + 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_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_tag_protection`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_tag_protection`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TagProtection', # 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_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Edit a wiki page # 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_wiki_page(owner, repo, page_name, 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 page_name: name of the page (required) + :param CreateWikiPageOptions body: + :return: WikiPage + 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_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_edit_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Edit a wiki page # 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_wiki_page_with_http_info(owner, repo, page_name, 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 page_name: name of the page (required) + :param CreateWikiPageOptions body: + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_name', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_wiki_page`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_edit_wiki_page`") # 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 'page_name' in params: + path_params['pageName'] = params['page_name'] # 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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/page/{pageName}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiPage', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_all_commits(self, owner, repo, **kwargs): # noqa: E501 + """Get a list of all commits 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_all_commits(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 sha: SHA or branch to start listing commits from (usually 'master') + :param str path: filepath of a file/dir + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :param int page: page number of results to return (1-based) + :param int limit: page size of results (ignored if used with 'path') + :param str _not: commits that match the given specifier will not be listed. + :return: list[Commit] + 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_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a list of all commits 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_all_commits_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 sha: SHA or branch to start listing commits from (usually 'master') + :param str path: filepath of a file/dir + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :param int page: page number of results to return (1-based) + :param int limit: page size of results (ignored if used with 'path') + :param str _not: commits that match the given specifier will not be listed. + :return: list[Commit] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'path', 'stat', 'verification', 'files', 'page', 'limit', '_not'] # 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_all_commits" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_all_commits`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_all_commits`") # 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 'sha' in params: + query_params.append(('sha', params['sha'])) # noqa: E501 + if 'path' in params: + query_params.append(('path', params['path'])) # noqa: E501 + if 'stat' in params: + query_params.append(('stat', params['stat'])) # noqa: E501 + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # 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 '_not' in params: + query_params.append(('not', params['_not'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Commit]', # 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: the git reference for download with attached archive format (e.g. master.zip) (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: the git reference for download with attached archive format (e.g. master.zip) (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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_archive`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_archive`") # noqa: E501 + # verify the required parameter 'archive' is set + if self.api_client.client_side_validation and ('archive' not in params or + params['archive'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_assignees(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that have write access and can be assigned to 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.repo_get_assignees(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_get_assignees_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_assignees_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_assignees_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that have write access and can be assigned to 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.repo_get_assignees_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_get_assignees" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_assignees`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_assignees`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/assignees', '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_get_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Retrieve a specific branch from a repository, including its effective branch protection # 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, including its effective branch protection # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if self.api_client.client_side_validation and ('branch' not in params or + params['branch'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Get a specific branch protection for the 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_protection(owner, repo, name, 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 name: name of protected branch (required) + :return: BranchProtection + 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_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_get_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Get a specific branch protection for the 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_protection_with_http_info(owner, repo, name, 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 name: name of protected branch (required) + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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_get_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_get_branch_protection`") # 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 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # 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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: CombinedStatus + 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: CombinedStatus + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref', 'page', '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 repo_get_combined_status_by_ref" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + 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 self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 self.api_client.client_side_validation and ('ref' not in params or + params['ref'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits/{ref}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CombinedStatus', # 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_commit_pull_request(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get the merged pull request of the commit # 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_commit_pull_request(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 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_commit_pull_request_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_commit_pull_request_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_get_commit_pull_request_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get the merged pull request of the commit # 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_commit_pull_request_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 to get (required) + :return: PullRequest + 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_get_commit_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_commit_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_commit_pull_request`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_get_commit_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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits/{sha}/pull', '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_contents(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # 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_contents(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: path of the dir, file, symlink or submodule in the repo (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: ContentsResponse + 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_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # 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_contents_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: path of the dir, file, symlink or submodule in the repo (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: ContentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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_contents" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_contents`") # 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 = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContentsResponse', # 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_contents_list(self, owner, repo, **kwargs): # noqa: E501 + """Gets the metadata of all the entries of the root dir # 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_contents_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) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: list[ContentsResponse] + 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_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Gets the metadata of all the entries of the root dir # 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_contents_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) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: list[ContentsResponse] + 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_contents_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents_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 = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ContentsResponse]', # 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) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :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) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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_editor_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + 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 = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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', 'TOTPHeader', '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_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a Git 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_git_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 str id: id of the hook to get (required) + :return: GitHook + 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_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a Git 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_git_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 str id: id of the hook to get (required) + :return: GitHook + 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_git_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_git_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_git_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_git_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitHook', # 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: Hook + 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: Hook + 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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='Hook', # 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_issue_config(self, owner, repo, **kwargs): # noqa: E501 + """Returns the issue config for 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.repo_get_issue_config(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: IssueConfig + 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_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_issue_config_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Returns the issue config for 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.repo_get_issue_config_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: IssueConfig + 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_issue_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_issue_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_issue_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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issue_config', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IssueConfig', # 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_issue_templates(self, owner, repo, **kwargs): # noqa: E501 + """Get available issue templates for 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_issue_templates(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[IssueTemplate] + 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_issue_templates_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_issue_templates_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_issue_templates_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get available issue templates for 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_issue_templates_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[IssueTemplate] + 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_issue_templates" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_issue_templates`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_issue_templates`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issue_templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[IssueTemplate]', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_languages(self, owner, repo, **kwargs): # noqa: E501 + """Get languages and number of bytes of code written # 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_languages(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: dict(str, int) + 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_languages_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_languages_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_languages_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get languages and number of bytes of code written # 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_languages_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: dict(str, int) + 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_languages" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_languages`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_languages`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/languages', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, int)', # 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_latest_release(self, owner, repo, **kwargs): # noqa: E501 + """Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # 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_latest_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) + :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_latest_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_latest_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_latest_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # 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_latest_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) + :return: 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_get_latest_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_latest_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_latest_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 + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/latest', '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_licenses(self, owner, repo, **kwargs): # noqa: E501 + """Get repo licenses # 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_licenses(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[str] + 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_licenses_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_licenses_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_licenses_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get repo licenses # 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_licenses_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[str] + 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_licenses" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_licenses`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_licenses`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/licenses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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_note(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a note corresponding to a single commit 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_note(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: a git ref or commit sha (required) + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Note + 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_note_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_note_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_get_note_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a note corresponding to a single commit 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_note_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: a git ref or commit sha (required) + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Note + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'verification', 'files'] # 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_note" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_note`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_note`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_get_note`") # 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 = [] + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/notes/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Note', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_pull_request_by_base_head(self, owner, repo, base, head, **kwargs): # noqa: E501 + """Get a pull request by base and head # 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_by_base_head(owner, repo, base, head, 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 base: base of the pull request to get (required) + :param str head: head 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_by_base_head_with_http_info(owner, repo, base, head, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_by_base_head_with_http_info(owner, repo, base, head, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_by_base_head_with_http_info(self, owner, repo, base, head, **kwargs): # noqa: E501 + """Get a pull request by base and head # 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_by_base_head_with_http_info(owner, repo, base, head, 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 base: base of the pull request to get (required) + :param str head: head of the pull request to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'base', 'head'] # 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_by_base_head" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 + # verify the required parameter 'base' is set + if self.api_client.client_side_validation and ('base' not in params or + params['base'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `base` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 + # verify the required parameter 'head' is set + if self.api_client.client_side_validation and ('head' not in params or + params['head'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `head` when calling `repo_get_pull_request_by_base_head`") # 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 'base' in params: + path_params['base'] = params['base'] # noqa: E501 + if 'head' in params: + path_params['head'] = params['head'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{base}/{head}', '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_pull_request_commits(self, owner, repo, index, **kwargs): # noqa: E501 + """Get commits for 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_commits(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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: list[Commit] + 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_commits_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_commits_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_commits_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get commits for 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_commits_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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: list[Commit] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit', 'verification', 'files'] # 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_commits" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_commits`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_commits`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request_commits`") # 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 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/commits', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Commit]', # 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_files(self, owner, repo, index, **kwargs): # noqa: E501 + """Get changed files for 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_files(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) + :param str skip_to: skip to given file + :param str whitespace: whitespace behavior + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ChangedFile] + 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_files_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_files_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_files_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get changed files for 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_files_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) + :param str skip_to: skip to given file + :param str whitespace: whitespace behavior + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ChangedFile] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'skip_to', 'whitespace', 'page', '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 repo_get_pull_request_files" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_files`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_files`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request_files`") # 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 'skip_to' in params: + query_params.append(('skip-to', params['skip_to'])) # noqa: E501 + if 'whitespace' in params: + query_params.append(('whitespace', params['whitespace'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/files', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ChangedFile]', # 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_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for 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_review(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 pull request (required) + :param int id: id of the review (required) + :return: PullReview + 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_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_get_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for 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_review_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 pull request (required) + :param int id: id of the review (required) + :return: PullReview + 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 repo_get_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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_review_comments(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for 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_review_comments(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 pull request (required) + :param int id: id of the review (required) + :return: list[PullReviewComment] + 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_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_get_pull_review_comments_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for 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_review_comments_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 pull request (required) + :param int id: id of the review (required) + :return: list[PullReviewComment] + 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 repo_get_pull_review_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review_comments`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review_comments`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review_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 + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullReviewComment]', # 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_push_mirror_by_remote_name(self, owner, repo, name, **kwargs): # noqa: E501 + """Get push mirror of the repository by remoteName # 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_push_mirror_by_remote_name(owner, repo, name, 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 name: remote name of push mirror (required) + :return: PushMirror + 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_push_mirror_by_remote_name_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_push_mirror_by_remote_name_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_get_push_mirror_by_remote_name_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Get push mirror of the repository by remoteName # 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_push_mirror_by_remote_name_with_http_info(owner, repo, name, 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 name: remote name of push mirror (required) + :return: PushMirror + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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_get_push_mirror_by_remote_name" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_get_push_mirror_by_remote_name`") # 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 'name' in params: + path_params['name'] = params['name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PushMirror', # 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: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch + :return: file + 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: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch + :return: file + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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_raw_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + 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 = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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/octet-stream']) # 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', 'TOTPHeader', '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='file', # 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_or_lfs(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file or it's LFS object 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_or_lfs(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: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch + :return: file + 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_or_lfs_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_raw_file_or_lfs_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_raw_file_or_lfs_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file or it's LFS object 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_or_lfs_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: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch + :return: file + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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_raw_file_or_lfs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file_or_lfs`") # 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 = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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/octet-stream']) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/media/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='file', # noqa: E501 + auth_settings=auth_settings, + async_req=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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_get_release_by_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get a release by tag name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_by_tag(owner, repo, tag, 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 tag: tag name 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_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_get_release_by_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get a release by tag name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_by_tag_with_http_info(owner, repo, tag, 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 tag: tag name of the release to get (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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_by_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_by_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_by_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_get_release_by_tag`") # 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 'tag' in params: + path_params['tag'] = params['tag'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/tags/{tag}', '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_repo_permissions(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Get repository permissions for 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.repo_get_repo_permissions(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: RepoCollaboratorPermission + 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_repo_permissions_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_repo_permissions_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_get_repo_permissions_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Get repository permissions for 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.repo_get_repo_permissions_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: RepoCollaboratorPermission + 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_get_repo_permissions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_repo_permissions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_repo_permissions`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `collaborator` when calling `repo_get_repo_permissions`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}/permission', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RepoCollaboratorPermission', # 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_reviewers(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that can be requested to review in this 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.repo_get_reviewers(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_get_reviewers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_reviewers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_reviewers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that can be requested to review in this 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.repo_get_reviewers_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_get_reviewers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_reviewers`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_reviewers`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/reviewers', '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_get_runner_registration_token(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository's actions runner registration 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.repo_get_runner_registration_token(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.repo_get_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_runner_registration_token_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository's actions runner registration 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.repo_get_runner_registration_token_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 repo_get_runner_registration_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_runner_registration_token`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_runner_registration_token`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runners/registration-token', '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_single_commit(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a single commit 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_single_commit(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: a git ref or commit sha (required) + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Commit + 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_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a single commit 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_single_commit_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: a git ref or commit sha (required) + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Commit + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'stat', 'verification', 'files'] # 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_single_commit" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_get_single_commit`") # 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 = [] + if 'stat' in params: + query_params.append(('stat', params['stat'])) # noqa: E501 + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/commits/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Commit', # 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_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get the tag of a repository by tag name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_tag(owner, repo, tag, 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 tag: name of tag (required) + :return: Tag + 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_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_get_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get the tag of a repository by tag name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_tag_with_http_info(owner, repo, tag, 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 tag: name of tag (required) + :return: Tag + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_get_tag`") # 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 'tag' in params: + path_params['tag'] = params['tag'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags/{tag}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Tag', # 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_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a specific tag protection for the 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_tag_protection(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 tag protect to get (required) + :return: TagProtection + 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_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a specific tag protection for the 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_tag_protection_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 tag protect to get (required) + :return: TagProtection + 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_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_tag_protection`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_tag_protection`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TagProtection', # 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_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get a wiki page # 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_wiki_page(owner, repo, page_name, 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 page_name: name of the page (required) + :return: WikiPage + 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_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_get_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get a wiki page # 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_wiki_page_with_http_info(owner, repo, page_name, 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 page_name: name of the page (required) + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_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_get_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_page`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_get_wiki_page`") # 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 'page_name' in params: + path_params['pageName'] = params['page_name'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/page/{pageName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiPage', # 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_wiki_page_revisions(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get revisions of a wiki page # 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_wiki_page_revisions(owner, repo, page_name, 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 page_name: name of the page (required) + :param int page: page number of results to return (1-based) + :return: WikiCommitList + 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_wiki_page_revisions_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_wiki_page_revisions_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_get_wiki_page_revisions_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get revisions of a wiki page # 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_wiki_page_revisions_with_http_info(owner, repo, page_name, 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 page_name: name of the page (required) + :param int page: page number of results to return (1-based) + :return: WikiCommitList + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_name', 'page'] # 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_wiki_page_revisions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_page_revisions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_page_revisions`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_get_wiki_page_revisions`") # 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 'page_name' in params: + path_params['pageName'] = params['page_name'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/revisions/{pageName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiCommitList', # 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_wiki_pages(self, owner, repo, **kwargs): # noqa: E501 + """Get all wiki pages # 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_wiki_pages(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 of results to return (1-based) + :param int limit: page size of results + :return: list[WikiPageMetaData] + 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_wiki_pages_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_wiki_pages_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_wiki_pages_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all wiki pages # 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_wiki_pages_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 of results to return (1-based) + :param int limit: page size of results + :return: list[WikiPageMetaData] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_get_wiki_pages" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_pages`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_pages`") # 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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/pages', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[WikiPageMetaData]', # 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_actions_secrets(self, owner, repo, **kwargs): # noqa: E501 + """List an repo's actions secrets # 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_actions_secrets(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + 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_actions_secrets_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_actions_secrets_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_actions_secrets_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List an repo's actions secrets # 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_actions_secrets_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_actions_secrets" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_actions_secrets`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_actions_secrets`") # 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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/secrets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Secret]', # 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_activity_feeds(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's activity feeds # 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_activity_feeds(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 date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + 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_activity_feeds_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_activity_feeds_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_activity_feeds_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's activity feeds # 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_activity_feeds_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 date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '_date', 'page', '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 repo_list_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_activity_feeds`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_activity_feeds`") # 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 '_date' in params: + query_params.append(('date', params['_date'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_all_git_refs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_branch_protection(self, owner, repo, **kwargs): # noqa: E501 + """List branch protections for 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_branch_protection(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[BranchProtection] + 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_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List branch protections for 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_branch_protection_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[BranchProtection] + 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_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_branch_protection`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BranchProtection]', # 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_branches" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_branches`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_collaborators" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_collaborators`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_hooks(self, owner, repo, **kwargs): # noqa: E501 + """List the Git 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_git_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[GitHook] + 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_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_git_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_git_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List the Git 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_git_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[GitHook] + 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_git_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_hooks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GitHook]', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_refs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_refs`") # noqa: E501 + # verify the required parameter 'ref' is set + if self.api_client.client_side_validation and ('ref' not in params or + params['ref'] is None): # noqa: E501 + 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_hooks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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[Hook]', # 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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[DeployKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'key_id', 'fingerprint', 'page', '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 repo_list_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_keys`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_pinned_issues(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned 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.repo_list_pinned_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) + :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.repo_list_pinned_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pinned_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_pinned_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned 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.repo_list_pinned_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) + :return: list[Issue] + 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_pinned_issues" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pinned_issues`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pinned_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 = [] + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/pinned', '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 repo_list_pinned_pull_requests(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned 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_pinned_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) + :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_pinned_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pinned_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_pinned_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned 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_pinned_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) + :return: list[PullRequest] + 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_pinned_pull_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pinned_pull_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pinned_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 = [] + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/pinned', '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_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 str state: State of pull request + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :param str poster: Filter by pull request author + :param int page: Page number of results to return (1-based) + :param int limit: Page size of results + :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 str state: State of pull request + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :param str poster: Filter by pull request author + :param int page: Page number of results to return (1-based) + :param int limit: Page size of results + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'state', 'sort', 'milestone', 'labels', 'poster', 'page', '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 repo_list_pull_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_requests`") # noqa: E501 + + if self.api_client.client_side_validation and ('page' in params and params['page'] < 1): # noqa: E501 + raise ValueError("Invalid value for parameter `page` when calling `repo_list_pull_requests`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0): # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `repo_list_pull_requests`, must be a value greater than or equal to `0`") # 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 '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 + if 'poster' in params: + query_params.append(('poster', params['poster'])) # 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 + + 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', 'TOTPHeader', '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_pull_reviews(self, owner, repo, index, **kwargs): # noqa: E501 + """List all reviews for 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_list_pull_reviews(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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PullReview] + 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_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_list_pull_reviews_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List all reviews for 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_list_pull_reviews_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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PullReview] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', '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 repo_list_pull_reviews" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_reviews`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_reviews`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_list_pull_reviews`") # 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 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullReview]', # 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_push_mirrors(self, owner, repo, **kwargs): # noqa: E501 + """Get all push mirrors of the 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_push_mirrors(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 of results to return (1-based) + :param int limit: page size of results + :return: list[PushMirror] + 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_push_mirrors_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_push_mirrors_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_push_mirrors_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all push mirrors of the 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_push_mirrors_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 of results to return (1-based) + :param int limit: page size of results + :return: list[PushMirror] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_push_mirrors" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_push_mirrors`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_push_mirrors`") # 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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PushMirror]', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_release_attachments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_release_attachments`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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) + :param bool draft: filter (exclude / include) drafts, if you dont have repo write access none will show + :param bool pre_release: filter (exclude / include) pre-releases + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param bool draft: filter (exclude / include) drafts, if you dont have repo write access none will show + :param bool pre_release: filter (exclude / include) pre-releases + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Release] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'draft', 'pre_release', 'page', '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 repo_list_releases" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_releases`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'draft' in params: + query_params.append(('draft', params['draft'])) # noqa: E501 + if 'pre_release' in params: + query_params.append(('pre-release', params['pre_release'])) # 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 + + 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_stargazers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_stargazers`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + 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) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'sort', 'state', 'page', '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 repo_list_statuses" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + 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 = [] + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + 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 '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', 'TOTPHeader', '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[CommitStatus]', # 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_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's statuses, 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_list_statuses_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) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + 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_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_statuses_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_list_statuses_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's statuses, 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_list_statuses_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) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref', 'sort', 'state', 'page', '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 repo_list_statuses_by_ref" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses_by_ref`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses_by_ref`") # noqa: E501 + # verify the required parameter 'ref' is set + if self.api_client.client_side_validation and ('ref' not in params or + params['ref'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `ref` when calling `repo_list_statuses_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 = [] + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + 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 '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', 'TOTPHeader', '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='list[CommitStatus]', # 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_subscribers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_subscribers`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_list_tag_protection(self, owner, repo, **kwargs): # noqa: E501 + """List tag protections for 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_tag_protection(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[TagProtection] + 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_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_tag_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List tag protections for 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_tag_protection_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[TagProtection] + 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_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_tag_protection`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TagProtection]', # 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_tags(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's tags # 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_tags(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 of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: list[Tag] + 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_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_tags_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's tags # 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_tags_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 of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: list[Tag] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_tags" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_tags`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_tags`") # 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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Tag]', # 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_teams(self, owner, repo, **kwargs): # noqa: E501 + """List a repository'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.repo_list_teams(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[Team] + 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_teams_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_teams_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_teams_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository'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.repo_list_teams_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[Team] + 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_teams" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_teams`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_teams`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/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 repo_list_topics(self, owner, repo, **kwargs): # noqa: E501 + """Get list of topics that a repository has # 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_topics(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 of results to return (1-based) + :param int limit: page size of results + :return: TopicName + 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_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get list of topics that a repository has # 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_topics_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 of results to return (1-based) + :param int limit: page size of results + :return: TopicName + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', '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 repo_list_topics" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_topics`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_topics`") # 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 '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TopicName', # 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) + :param MergePullRequestOption 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_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) + :param MergePullRequestOption body: + :return: None + 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_merge_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_merge_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_merge_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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 + 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', 'TOTPHeader', '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_merge_upstream(self, owner, repo, **kwargs): # noqa: E501 + """Merge a branch from upstream # 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_upstream(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 MergeUpstreamRequest body: + :return: MergeUpstreamResponse + 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_upstream_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_merge_upstream_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_merge_upstream_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Merge a branch from upstream # 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_upstream_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 MergeUpstreamRequest body: + :return: MergeUpstreamResponse + 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_merge_upstream" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_merge_upstream`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_merge_upstream`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/merge-upstream', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MergeUpstreamResponse', # 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 MigrateRepoOptions 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 MigrateRepoOptions 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_mirror_sync`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_new_pin_allowed(self, owner, repo, **kwargs): # noqa: E501 + """Returns if new Issue Pins are allowed # 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_new_pin_allowed(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: NewIssuePinsAllowed + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_new_pin_allowed_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_new_pin_allowed_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_new_pin_allowed_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Returns if new Issue Pins are allowed # 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_new_pin_allowed_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: NewIssuePinsAllowed + 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_new_pin_allowed" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_new_pin_allowed`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_new_pin_allowed`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/new_pin_allowed', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NewIssuePinsAllowed', # 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_pull_request_is_merged`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_pull_request_is_merged`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_push_mirror_sync(self, owner, repo, **kwargs): # noqa: E501 + """Sync all push 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_push_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_push_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_push_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_push_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Sync all push 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_push_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_push_mirror_sync" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_push_mirror_sync`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_push_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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors-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_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 bool topic: Limit search to repositories with keyword as topic + :param bool include_desc: include search of keyword within repository description + :param int uid: search only for repos that the user with the given id owns or contributes to + :param int priority_owner_id: repo owner to prioritize in the results + :param int team_id: search only for repos that belong to the given team id + :param int starred_by: search only for repos that the user with the given id has starred + :param bool private: include private repositories this user has access to (defaults to true) + :param bool is_private: show only pubic, private or all repositories (defaults to all) + :param bool template: include template repositories this user has access to (defaults to true) + :param bool archived: show only archived, non-archived or all repositories (defaults to all) + :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\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" 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. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 bool topic: Limit search to repositories with keyword as topic + :param bool include_desc: include search of keyword within repository description + :param int uid: search only for repos that the user with the given id owns or contributes to + :param int priority_owner_id: repo owner to prioritize in the results + :param int team_id: search only for repos that belong to the given team id + :param int starred_by: search only for repos that the user with the given id has starred + :param bool private: include private repositories this user has access to (defaults to true) + :param bool is_private: show only pubic, private or all repositories (defaults to all) + :param bool template: include template repositories this user has access to (defaults to true) + :param bool archived: show only archived, non-archived or all repositories (defaults to all) + :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\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" 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. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: SearchResults + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'topic', 'include_desc', 'uid', 'priority_owner_id', 'team_id', 'starred_by', 'private', 'is_private', 'template', 'archived', 'mode', 'exclusive', 'sort', 'order', 'page', '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 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 'topic' in params: + query_params.append(('topic', params['topic'])) # noqa: E501 + if 'include_desc' in params: + query_params.append(('includeDesc', params['include_desc'])) # noqa: E501 + if 'uid' in params: + query_params.append(('uid', params['uid'])) # noqa: E501 + if 'priority_owner_id' in params: + query_params.append(('priority_owner_id', params['priority_owner_id'])) # noqa: E501 + if 'team_id' in params: + query_params.append(('team_id', params['team_id'])) # noqa: E501 + if 'starred_by' in params: + query_params.append(('starredBy', params['starred_by'])) # noqa: E501 + if 'private' in params: + query_params.append(('private', params['private'])) # noqa: E501 + if 'is_private' in params: + query_params.append(('is_private', params['is_private'])) # noqa: E501 + if 'template' in params: + query_params.append(('template', params['template'])) # noqa: E501 + if 'archived' in params: + query_params.append(('archived', params['archived'])) # 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 + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_signing_key(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.gpg for given 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_signing_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) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.gpg for given 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_signing_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) + :return: str + 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_signing_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_signing_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_signing_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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/signing-key.gpg', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=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_submit_pull_review(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Submit a pending review to an 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_submit_pull_review(owner, repo, index, id, body, 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) + :param int id: id of the review (required) + :param SubmitPullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + return data + + def repo_submit_pull_review_with_http_info(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Submit a pending review to an 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_submit_pull_review_with_http_info(owner, repo, index, id, body, 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) + :param int id: id of the review (required) + :param SubmitPullReviewOptions body: (required) + :return: PullReview + 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 repo_submit_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_submit_pull_review`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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) + :param str ref: The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. + :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) + :param str ref: The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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_test_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_test_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_test_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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 = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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', 'TOTPHeader', '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) + :param str user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param str user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'user', 'since', 'before', 'page', '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 repo_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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 = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + 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', 'TOTPHeader', '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 repo_transfer(self, owner, repo, body, **kwargs): # noqa: E501 + """Transfer a repo ownership # 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_transfer(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :param TransferRepoOption body: Transfer Options (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_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_transfer_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Transfer a repo ownership # 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_transfer_with_http_info(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :param TransferRepoOption body: Transfer Options (required) + :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 repo_transfer" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_transfer`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_transfer`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_transfer`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/transfer', '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_un_dismiss_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Cancel to dismiss a review for 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_un_dismiss_pull_review(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 pull request (required) + :param int id: id of the review (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_un_dismiss_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Cancel to dismiss a review for 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_un_dismiss_pull_review_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 pull request (required) + :param int id: id of the review (required) + :return: PullReview + 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 repo_un_dismiss_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_un_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_un_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_un_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_un_dismiss_pull_review`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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_update_avatar(self, owner, repo, **kwargs): # noqa: E501 + """Update avatar # 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_update_avatar(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 UpdateRepoAvatarOption 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_update_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_update_avatar_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Update avatar # 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_update_avatar_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 UpdateRepoAvatarOption body: + :return: None + 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_update_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_avatar`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_avatar`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/avatar', '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_update_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Update a branch # 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_update_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: name of the branch (required) + :param UpdateBranchRepoOption 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_update_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return data + + def repo_update_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Update a branch # 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_update_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: name of the branch (required) + :param UpdateBranchRepoOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'branch', '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_update_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if self.api_client.client_side_validation and ('branch' not in params or + params['branch'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `branch` when calling `repo_update_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 + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches/{branch}', 'PATCH', + 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_update_branch_protection_priories(self, owner, repo, **kwargs): # noqa: E501 + """Update the priorities of branch protections for 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_update_branch_protection_priories(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 UpdateBranchProtectionPriories 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_update_branch_protection_priories_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_branch_protection_priories_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_update_branch_protection_priories_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Update the priorities of branch protections for 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_update_branch_protection_priories_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 UpdateBranchProtectionPriories body: + :return: None + 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_update_branch_protection_priories" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_branch_protection_priories`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_branch_protection_priories`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/priority', '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_update_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Update 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_update_file(owner, repo, filepath, body, 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: path of the file to update (required) + :param UpdateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_update_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Update 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_update_file_with_http_info(owner, repo, filepath, body, 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: path of the file to update (required) + :param UpdateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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_update_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_update_file`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_update_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 + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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_update_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge PR's baseBranch into headBranch # 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_update_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) + :param str style: how to update pull request + :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_update_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_update_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge PR's baseBranch into headBranch # 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_update_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) + :param str style: how to update pull request + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'style'] # 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_update_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_update_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 = [] + if 'style' in params: + query_params.append(('style', params['style'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/update', '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_update_topics(self, owner, repo, **kwargs): # noqa: E501 + """Replace list of topics for 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_update_topics(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 RepoTopicOptions 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_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_update_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Replace list of topics for 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_update_topics_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 RepoTopicOptions body: + :return: None + 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_update_topics" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_topics`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_topics`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics', '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_validate_issue_config(self, owner, repo, **kwargs): # noqa: E501 + """Returns the validation information for a issue config # 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_validate_issue_config(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: IssueConfigValidation + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_validate_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_validate_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_validate_issue_config_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Returns the validation information for a issue config # 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_validate_issue_config_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: IssueConfigValidation + 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_validate_issue_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_validate_issue_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_validate_issue_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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issue_config/validate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IssueConfigValidation', # 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TopicResponse] + 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TopicResponse] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'page', '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 topic_search" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'q' is set + if self.api_client.client_side_validation and ('q' not in params or + params['q'] is None): # noqa: E501 + 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 + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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='list[TopicResponse]', # 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 update_repo_secret(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value 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.update_repo_secret(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption 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.update_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + else: + (data) = self.update_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + return data + + def update_repo_secret_with_http_info(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value 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.update_repo_secret_with_http_info(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'secretname', '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 update_repo_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `update_repo_secret`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `update_repo_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `update_repo_secret`") # 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 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/secrets/{secretname}', '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 update_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Update a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption 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.update_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.update_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def update_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Update a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: name of the owner (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename', '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 update_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `update_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `update_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `update_repo_variable`") # 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 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', '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_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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_check_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_put_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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) + + 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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in params or + params['user'] is None): # noqa: E501 + 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', 'TOTPHeader', '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/gitea/api/settings_api.py b/gitea/api/settings_api.py new file mode 100644 index 0000000..57c8101 --- /dev/null +++ b/gitea/api/settings_api.py @@ -0,0 +1,390 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.api_client import ApiClient + + +class SettingsApi(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_general_api_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings for api # 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_general_api_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAPISettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_api_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_api_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_api_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings for api # 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_general_api_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAPISettings + 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_general_api_settings" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/api', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralAPISettings', # 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_general_attachment_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings for 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.get_general_attachment_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAttachmentSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_attachment_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_attachment_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_attachment_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings for 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.get_general_attachment_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAttachmentSettings + 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_general_attachment_settings" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/attachment', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralAttachmentSettings', # 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_general_repository_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings 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.get_general_repository_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralRepoSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_repository_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_repository_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_repository_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings 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.get_general_repository_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralRepoSettings + 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_general_repository_settings" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/repository', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralRepoSettings', # 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_general_ui_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings for ui # 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_general_ui_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralUISettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_ui_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_ui_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_ui_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings for ui # 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_general_ui_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralUISettings + 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_general_ui_settings" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/ui', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralUISettings', # 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/gitea/api/user_api.py b/gitea/api/user_api.py new file mode 100644 index 0000000..0c5d25b --- /dev/null +++ b/gitea/api/user_api.py @@ -0,0 +1,6916 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.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', 'TOTPHeader', '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_user_variable(self, variablename, **kwargs): # noqa: E501 + """Create a user-level variable # 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_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param CreateVariableOption 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.create_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.create_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def create_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Create a user-level variable # 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_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename', '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_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `create_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', '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 delete_user_secret(self, secretname, **kwargs): # noqa: E501 + """Delete a secret in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_secret(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (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.delete_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + return data + + def delete_user_secret_with_http_info(self, secretname, **kwargs): # noqa: E501 + """Delete a secret in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_secret_with_http_info(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['secretname'] # 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 delete_user_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `delete_user_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/secrets/{secretname}', '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 delete_user_variable(self, variablename, **kwargs): # noqa: E501 + """Delete a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (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.delete_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def delete_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Delete a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename'] # 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 delete_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `delete_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', '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 get_user_settings(self, **kwargs): # noqa: E501 + """Get user settings # 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_user_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[UserSettings] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get user settings # 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_user_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[UserSettings] + 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_user_settings" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UserSettings]', # 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_user_variable(self, variablename, **kwargs): # noqa: E501 + """Get a user-level variable which is created by current doer # 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_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.get_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def get_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Get a user-level variable which is created by current doer # 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_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename'] # 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_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `get_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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_user_variables_list(self, **kwargs): # noqa: E501 + """Get the user-level list of variables which is created by current doer # 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_user_variables_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_variables_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_variables_list_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_variables_list_with_http_info(self, **kwargs): # noqa: E501 + """Get the user-level list of variables which is created by current doer # 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_user_variables_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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 get_user_variables_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ActionVariable]', # 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_verification_token(self, **kwargs): # noqa: E501 + """Get a Token to verify # 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_verification_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_verification_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_verification_token_with_http_info(**kwargs) # noqa: E501 + return data + + def get_verification_token_with_http_info(self, **kwargs): # noqa: E501 + """Get a Token to verify # 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_verification_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + 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_verification_token" % 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( + ['text/plain']) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_key_token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=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 update_user_secret(self, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_secret(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption 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.update_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + else: + (data) = self.update_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + return data + + def update_user_secret_with_http_info(self, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_secret_with_http_info(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['secretname', '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 update_user_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `update_user_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/secrets/{secretname}', '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 update_user_settings(self, **kwargs): # noqa: E501 + """Update user settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UserSettingsOptions body: + :return: list[UserSettings] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_user_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.update_user_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def update_user_settings_with_http_info(self, **kwargs): # noqa: E501 + """Update user settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UserSettingsOptions body: + :return: list[UserSettings] + 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 update_user_settings" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/settings', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UserSettings]', # 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 update_user_variable(self, variablename, **kwargs): # noqa: E501 + """Update a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param UpdateVariableOption 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.update_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.update_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def update_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Update a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename', '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 update_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `update_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', '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_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', 'TOTPHeader', '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_block_user(self, username, **kwargs): # noqa: E501 + """Block 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_block_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: user to block (required) + :param str note: optional note for the block + :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_block_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_block_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_block_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Block 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_block_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: user to block (required) + :param str note: optional note for the block + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'note'] # 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_block_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_block_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'note' in params: + query_params.append(('note', params['note'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks/{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_check_following(self, username, target, **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(username, target, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of following user (required) + :param str target: 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(username, target, **kwargs) # noqa: E501 + else: + (data) = self.user_check_following_with_http_info(username, target, **kwargs) # noqa: E501 + return data + + def user_check_following_with_http_info(self, username, target, **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(username, target, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of following user (required) + :param str target: username of followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'target'] # 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 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_check_following`") # noqa: E501 + # verify the required parameter 'target' is set + if self.api_client.client_side_validation and ('target' not in params or + params['target'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `target` when calling `user_check_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + if 'target' in params: + path_params['target'] = params['target'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/following/{target}', '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_check_user_block(self, username, **kwargs): # noqa: E501 + """Check if a user is blocked 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_check_user_block(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: user to check (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_user_block_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_check_user_block_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_check_user_block_with_http_info(self, username, **kwargs): # noqa: E501 + """Check if a user is blocked 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_check_user_block_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: user to check (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_check_user_block" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_check_user_block`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks/{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_create_hook(self, 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.user_create_hook(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + 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_hook_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.user_create_hook_with_http_info(body, **kwargs) # noqa: E501 + return data + + def user_create_hook_with_http_info(self, 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.user_create_hook_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + 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_create_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `user_create_hook`") # 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( + ['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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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_o_auth2_application(self, body, **kwargs): # noqa: E501 + """creates a new OAuth2 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.user_create_o_auth2_application(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + 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_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.user_create_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 + return data + + def user_create_o_auth2_application_with_http_info(self, body, **kwargs): # noqa: E501 + """creates a new OAuth2 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.user_create_o_auth2_application_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + 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_create_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `user_create_o_auth2_application`") # 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( + ['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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # 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 CreateAccessTokenOption body: + :return: AccessToken + 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 CreateAccessTokenOption body: + :return: AccessToken + 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 user_create_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 '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', 'TOTPHeader', '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='AccessToken', # 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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_check_starring`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_star`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_current_list_followers" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_current_list_following" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_current_list_gpg_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['fingerprint', 'page', '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_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 + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 # 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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 # 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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_current_list_repos" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_current_list_starred" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_current_list_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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', 'TOTPHeader', '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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_put_star`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + 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', 'TOTPHeader', '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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit', 'since', 'before'] # 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 = [] + 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 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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', 'TOTPHeader', '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 str token: token to be deleted, identified by ID and if not available by name (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 str token: token to be deleted, identified by ID and if not available by name (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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_delete_access_token`") # noqa: E501 + # verify the required parameter 'token' is set + if self.api_client.client_side_validation and ('token' not in params or + params['token'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_avatar(self, **kwargs): # noqa: E501 + """Delete Avatar # 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_avatar(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_avatar_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_delete_avatar_with_http_info(**kwargs) # noqa: E501 + return data + + def user_delete_avatar_with_http_info(self, **kwargs): # noqa: E501 + """Delete Avatar # 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_avatar_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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_delete_avatar" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/avatar', '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', 'TOTPHeader', '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_delete_hook(self, 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.user_delete_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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.user_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_delete_hook_with_http_info(self, 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.user_delete_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook 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_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_delete_hook`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/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 user_delete_o_auth2_application(self, id, **kwargs): # noqa: E501 + """delete an OAuth2 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.user_delete_o_auth2_application(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: 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_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_delete_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 + """delete an OAuth2 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.user_delete_o_auth2_application_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: token to be deleted (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_delete_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_delete_o_auth2_application`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{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_edit_hook(self, 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.user_edit_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_edit_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_edit_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_edit_hook_with_http_info(self, 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.user_edit_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + 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 user_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_edit_hook`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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', 'TOTPHeader', '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_hook(self, 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.user_get_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + 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_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_get_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_get_hook_with_http_info(self, 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.user_get_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + 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_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_get_hook`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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_o_auth2_application(self, id, **kwargs): # noqa: E501 + """get an OAuth2 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.user_get_o_auth2_application(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: Application ID to be found (required) + :return: OAuth2Application + 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_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_get_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_get_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 + """get an OAuth2 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.user_get_o_auth2_application_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: Application ID to be found (required) + :return: OAuth2Application + 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_get_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_get_o_auth2_application`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # 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_oauth2_application(self, **kwargs): # noqa: E501 + """List the authenticated user's oauth2 applications # 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_oauth2_application(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[OAuth2Application] + 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_oauth2_application_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_oauth2_application_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_oauth2_application_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's oauth2 applications # 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_oauth2_application_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[OAuth2Application] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_get_oauth2_application" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OAuth2Application]', # 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_runner_registration_token(self, **kwargs): # noqa: E501 + """Get an user's actions runner registration 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_get_runner_registration_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_runner_registration_token_with_http_info(self, **kwargs): # noqa: E501 + """Get an user's actions runner registration 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_get_runner_registration_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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_runner_registration_token" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/runners/registration-token', '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_get_stop_watches(self, **kwargs): # noqa: E501 + """Get list of all existing stopwatches # 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_stop_watches(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[StopWatch] + 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_stop_watches_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_stop_watches_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_stop_watches_with_http_info(self, **kwargs): # noqa: E501 + """Get list of all existing stopwatches # 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_stop_watches_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[StopWatch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_get_stop_watches" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/stopwatches', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StopWatch]', # 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[AccessToken] + 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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[AccessToken] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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_get_tokens" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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='list[AccessToken]', # 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_activity_feeds(self, username, **kwargs): # noqa: E501 + """List a user's activity feeds # 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_activity_feeds(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param bool only_performed_by: if true, only show actions performed by the requested user + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + 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_activity_feeds_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_activity_feeds_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_activity_feeds_with_http_info(self, username, **kwargs): # noqa: E501 + """List a user's activity feeds # 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_activity_feeds_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param bool only_performed_by: if true, only show actions performed by the requested user + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'only_performed_by', '_date', 'page', '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_list_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_activity_feeds`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'only_performed_by' in params: + query_params.append(('only-performed-by', params['only_performed_by'])) # noqa: E501 + if '_date' in params: + query_params.append(('date', params['_date'])) # 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 + + 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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_blocks(self, **kwargs): # noqa: E501 + """List users blocked 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_list_blocks(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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_blocks_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_blocks_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_blocks_with_http_info(self, **kwargs): # noqa: E501 + """List users blocked 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_list_blocks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_list_blocks" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks', '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_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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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_list_followers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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_list_following" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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_list_gpg_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_hooks(self, **kwargs): # noqa: E501 + """List the authenticated user'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.user_list_hooks(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + 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_hooks_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_hooks_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_hooks_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user'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.user_list_hooks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Hook]', # 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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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 + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'fingerprint', 'page', '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_list_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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_list_repos" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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_list_starred" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', '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_list_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + 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 = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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_list_teams(self, **kwargs): # noqa: E501 + """List all the teams a user belongs 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_list_teams(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :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.user_list_teams_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_teams_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_teams_with_http_info(self, **kwargs): # noqa: E501 + """List all the teams a user belongs 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_list_teams_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', '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_list_teams" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/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 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 page: page number of results to return (1-based) + :param int limit: page size of results + :return: InlineResponse2001 + 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 page: page number of results to return (1-based) + :param int limit: page size of results + :return: InlineResponse2001 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'uid', 'page', '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 'page' in params: + query_params.append(('page', params['page'])) # 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', 'TOTPHeader', '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='InlineResponse2001', # 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_unblock_user(self, username, **kwargs): # noqa: E501 + """Unblock 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_unblock_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: user to unblock (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_unblock_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_unblock_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_unblock_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Unblock 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_unblock_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: user to unblock (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_unblock_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_unblock_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', '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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks/{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_update_avatar(self, **kwargs): # noqa: E501 + """Update Avatar # 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_update_avatar(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UpdateUserAvatarOption 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_update_avatar_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_update_avatar_with_http_info(**kwargs) # noqa: E501 + return data + + def user_update_avatar_with_http_info(self, **kwargs): # noqa: E501 + """Update Avatar # 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_update_avatar_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UpdateUserAvatarOption 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_update_avatar" % 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/avatar', '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_update_o_auth2_application(self, id, body, **kwargs): # noqa: E501 + """update an OAuth2 Application, this includes regenerating the client secret # 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_update_o_auth2_application(id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: application to be updated (required) + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 + else: + (data) = self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 + return data + + def user_update_o_auth2_application_with_http_info(self, id, body, **kwargs): # noqa: E501 + """update an OAuth2 Application, this includes regenerating the client secret # 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_update_o_auth2_application_with_http_info(id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: application to be updated (required) + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + 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 user_update_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_update_o_auth2_application`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `user_update_o_auth2_application`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # 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_verify_gpg_key(self, **kwargs): # noqa: E501 + """Verify 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_verify_gpg_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_verify_gpg_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_verify_gpg_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_verify_gpg_key_with_http_info(self, **kwargs): # noqa: E501 + """Verify 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_verify_gpg_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: 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_verify_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 + # 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', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_key_verify', '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) diff --git a/gitea/api_client.py b/gitea/api_client.py new file mode 100644 index 0000000..3795707 --- /dev/null +++ b/gitea/api_client.py @@ -0,0 +1,639 @@ +# coding: utf-8 +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 gitea.configuration import Configuration +import gitea.models +from gitea 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' + self.client_side_validation = configuration.client_side_validation + + 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(gitea.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, "w") 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/gitea/configuration.py b/gitea/configuration.py new file mode 100644 index 0000000..6ba67f3 --- /dev/null +++ b/gitea/configuration.py @@ -0,0 +1,300 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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 = "https://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 = {} + # function to refresh API key if expired + self.refresh_api_key_hook = None + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("gitea") + 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 = '' + + # Disable client side validation + self.client_side_validation = True + + @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.refresh_api_key_hook: + self.refresh_api_key_hook(self) + + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + token = "" + if self.username or self.password: + token = urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + return token + + 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') + }, + 'TOTPHeader': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'X-GITEA-OTP', + 'value': self.get_api_key_with_prefix('X-GITEA-OTP') + }, + '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.23.1\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/gitea/models/__init__.py b/gitea/models/__init__.py new file mode 100644 index 0000000..1aabc3d --- /dev/null +++ b/gitea/models/__init__.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +# flake8: noqa +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from gitea.models.api_error import APIError +from gitea.models.access_token import AccessToken +from gitea.models.action_task import ActionTask +from gitea.models.action_task_response import ActionTaskResponse +from gitea.models.action_variable import ActionVariable +from gitea.models.activity import Activity +from gitea.models.activity_pub import ActivityPub +from gitea.models.add_collaborator_option import AddCollaboratorOption +from gitea.models.add_time_option import AddTimeOption +from gitea.models.annotated_tag import AnnotatedTag +from gitea.models.annotated_tag_object import AnnotatedTagObject +from gitea.models.attachment import Attachment +from gitea.models.badge import Badge +from gitea.models.branch import Branch +from gitea.models.branch_protection import BranchProtection +from gitea.models.change_file_operation import ChangeFileOperation +from gitea.models.change_files_options import ChangeFilesOptions +from gitea.models.changed_file import ChangedFile +from gitea.models.combined_status import CombinedStatus +from gitea.models.comment import Comment +from gitea.models.commit import Commit +from gitea.models.commit_affected_files import CommitAffectedFiles +from gitea.models.commit_date_options import CommitDateOptions +from gitea.models.commit_meta import CommitMeta +from gitea.models.commit_stats import CommitStats +from gitea.models.commit_status import CommitStatus +from gitea.models.commit_status_state import CommitStatusState +from gitea.models.commit_user import CommitUser +from gitea.models.compare import Compare +from gitea.models.contents_response import ContentsResponse +from gitea.models.create_access_token_option import CreateAccessTokenOption +from gitea.models.create_branch_protection_option import CreateBranchProtectionOption +from gitea.models.create_branch_repo_option import CreateBranchRepoOption +from gitea.models.create_email_option import CreateEmailOption +from gitea.models.create_file_options import CreateFileOptions +from gitea.models.create_fork_option import CreateForkOption +from gitea.models.create_gpg_key_option import CreateGPGKeyOption +from gitea.models.create_hook_option import CreateHookOption +from gitea.models.create_hook_option_config import CreateHookOptionConfig +from gitea.models.create_issue_comment_option import CreateIssueCommentOption +from gitea.models.create_issue_option import CreateIssueOption +from gitea.models.create_key_option import CreateKeyOption +from gitea.models.create_label_option import CreateLabelOption +from gitea.models.create_milestone_option import CreateMilestoneOption +from gitea.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions +from gitea.models.create_or_update_secret_option import CreateOrUpdateSecretOption +from gitea.models.create_org_option import CreateOrgOption +from gitea.models.create_pull_request_option import CreatePullRequestOption +from gitea.models.create_pull_review_comment import CreatePullReviewComment +from gitea.models.create_pull_review_options import CreatePullReviewOptions +from gitea.models.create_push_mirror_option import CreatePushMirrorOption +from gitea.models.create_release_option import CreateReleaseOption +from gitea.models.create_repo_option import CreateRepoOption +from gitea.models.create_status_option import CreateStatusOption +from gitea.models.create_tag_option import CreateTagOption +from gitea.models.create_tag_protection_option import CreateTagProtectionOption +from gitea.models.create_team_option import CreateTeamOption +from gitea.models.create_user_option import CreateUserOption +from gitea.models.create_variable_option import CreateVariableOption +from gitea.models.create_wiki_page_options import CreateWikiPageOptions +from gitea.models.cron import Cron +from gitea.models.delete_email_option import DeleteEmailOption +from gitea.models.delete_file_options import DeleteFileOptions +from gitea.models.deploy_key import DeployKey +from gitea.models.dismiss_pull_review_options import DismissPullReviewOptions +from gitea.models.edit_attachment_options import EditAttachmentOptions +from gitea.models.edit_branch_protection_option import EditBranchProtectionOption +from gitea.models.edit_deadline_option import EditDeadlineOption +from gitea.models.edit_git_hook_option import EditGitHookOption +from gitea.models.edit_hook_option import EditHookOption +from gitea.models.edit_issue_comment_option import EditIssueCommentOption +from gitea.models.edit_issue_option import EditIssueOption +from gitea.models.edit_label_option import EditLabelOption +from gitea.models.edit_milestone_option import EditMilestoneOption +from gitea.models.edit_org_option import EditOrgOption +from gitea.models.edit_pull_request_option import EditPullRequestOption +from gitea.models.edit_reaction_option import EditReactionOption +from gitea.models.edit_release_option import EditReleaseOption +from gitea.models.edit_repo_option import EditRepoOption +from gitea.models.edit_tag_protection_option import EditTagProtectionOption +from gitea.models.edit_team_option import EditTeamOption +from gitea.models.edit_user_option import EditUserOption +from gitea.models.email import Email +from gitea.models.external_tracker import ExternalTracker +from gitea.models.external_wiki import ExternalWiki +from gitea.models.file_commit_response import FileCommitResponse +from gitea.models.file_delete_response import FileDeleteResponse +from gitea.models.file_links_response import FileLinksResponse +from gitea.models.file_response import FileResponse +from gitea.models.files_response import FilesResponse +from gitea.models.gpg_key import GPGKey +from gitea.models.gpg_key_email import GPGKeyEmail +from gitea.models.general_api_settings import GeneralAPISettings +from gitea.models.general_attachment_settings import GeneralAttachmentSettings +from gitea.models.general_repo_settings import GeneralRepoSettings +from gitea.models.general_ui_settings import GeneralUISettings +from gitea.models.generate_repo_option import GenerateRepoOption +from gitea.models.git_blob_response import GitBlobResponse +from gitea.models.git_entry import GitEntry +from gitea.models.git_hook import GitHook +from gitea.models.git_object import GitObject +from gitea.models.git_tree_response import GitTreeResponse +from gitea.models.gitignore_template_info import GitignoreTemplateInfo +from gitea.models.hook import Hook +from gitea.models.identity import Identity +from gitea.models.inline_response200 import InlineResponse200 +from gitea.models.inline_response2001 import InlineResponse2001 +from gitea.models.internal_tracker import InternalTracker +from gitea.models.issue import Issue +from gitea.models.issue_config import IssueConfig +from gitea.models.issue_config_contact_link import IssueConfigContactLink +from gitea.models.issue_config_validation import IssueConfigValidation +from gitea.models.issue_deadline import IssueDeadline +from gitea.models.issue_form_field import IssueFormField +from gitea.models.issue_form_field_type import IssueFormFieldType +from gitea.models.issue_form_field_visible import IssueFormFieldVisible +from gitea.models.issue_labels_option import IssueLabelsOption +from gitea.models.issue_meta import IssueMeta +from gitea.models.issue_template import IssueTemplate +from gitea.models.issue_template_string_slice import IssueTemplateStringSlice +from gitea.models.label import Label +from gitea.models.label_template import LabelTemplate +from gitea.models.license_template_info import LicenseTemplateInfo +from gitea.models.licenses_template_list_entry import LicensesTemplateListEntry +from gitea.models.markdown_option import MarkdownOption +from gitea.models.markup_option import MarkupOption +from gitea.models.merge_pull_request_option import MergePullRequestOption +from gitea.models.merge_upstream_request import MergeUpstreamRequest +from gitea.models.merge_upstream_response import MergeUpstreamResponse +from gitea.models.migrate_repo_options import MigrateRepoOptions +from gitea.models.milestone import Milestone +from gitea.models.new_issue_pins_allowed import NewIssuePinsAllowed +from gitea.models.node_info import NodeInfo +from gitea.models.node_info_services import NodeInfoServices +from gitea.models.node_info_software import NodeInfoSoftware +from gitea.models.node_info_usage import NodeInfoUsage +from gitea.models.node_info_usage_users import NodeInfoUsageUsers +from gitea.models.note import Note +from gitea.models.notification_count import NotificationCount +from gitea.models.notification_subject import NotificationSubject +from gitea.models.notification_thread import NotificationThread +from gitea.models.notify_subject_type import NotifySubjectType +from gitea.models.o_auth2_application import OAuth2Application +from gitea.models.organization import Organization +from gitea.models.organization_permissions import OrganizationPermissions +from gitea.models.pr_branch_info import PRBranchInfo +from gitea.models.package import Package +from gitea.models.package_file import PackageFile +from gitea.models.payload_commit import PayloadCommit +from gitea.models.payload_commit_verification import PayloadCommitVerification +from gitea.models.payload_user import PayloadUser +from gitea.models.permission import Permission +from gitea.models.public_key import PublicKey +from gitea.models.pull_request import PullRequest +from gitea.models.pull_request_meta import PullRequestMeta +from gitea.models.pull_review import PullReview +from gitea.models.pull_review_comment import PullReviewComment +from gitea.models.pull_review_request_options import PullReviewRequestOptions +from gitea.models.push_mirror import PushMirror +from gitea.models.reaction import Reaction +from gitea.models.reference import Reference +from gitea.models.release import Release +from gitea.models.rename_user_option import RenameUserOption +from gitea.models.repo_collaborator_permission import RepoCollaboratorPermission +from gitea.models.repo_commit import RepoCommit +from gitea.models.repo_topic_options import RepoTopicOptions +from gitea.models.repo_transfer import RepoTransfer +from gitea.models.repository import Repository +from gitea.models.repository_meta import RepositoryMeta +from gitea.models.review_state_type import ReviewStateType +from gitea.models.search_results import SearchResults +from gitea.models.secret import Secret +from gitea.models.server_version import ServerVersion +from gitea.models.state_type import StateType +from gitea.models.stop_watch import StopWatch +from gitea.models.submit_pull_review_options import SubmitPullReviewOptions +from gitea.models.tag import Tag +from gitea.models.tag_protection import TagProtection +from gitea.models.team import Team +from gitea.models.time_stamp import TimeStamp +from gitea.models.timeline_comment import TimelineComment +from gitea.models.topic_name import TopicName +from gitea.models.topic_response import TopicResponse +from gitea.models.tracked_time import TrackedTime +from gitea.models.transfer_repo_option import TransferRepoOption +from gitea.models.update_branch_protection_priories import UpdateBranchProtectionPriories +from gitea.models.update_branch_repo_option import UpdateBranchRepoOption +from gitea.models.update_file_options import UpdateFileOptions +from gitea.models.update_repo_avatar_option import UpdateRepoAvatarOption +from gitea.models.update_user_avatar_option import UpdateUserAvatarOption +from gitea.models.update_variable_option import UpdateVariableOption +from gitea.models.user import User +from gitea.models.user_badge_option import UserBadgeOption +from gitea.models.user_heatmap_data import UserHeatmapData +from gitea.models.user_settings import UserSettings +from gitea.models.user_settings_options import UserSettingsOptions +from gitea.models.watch_info import WatchInfo +from gitea.models.wiki_commit import WikiCommit +from gitea.models.wiki_commit_list import WikiCommitList +from gitea.models.wiki_page import WikiPage +from gitea.models.wiki_page_meta_data import WikiPageMetaData diff --git a/gitea/models/access_token.py b/gitea/models/access_token.py new file mode 100644 index 0000000..a6785f8 --- /dev/null +++ b/gitea/models/access_token.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'id': 'int', + 'name': 'str', + 'scopes': 'list[str]', + 'sha1': 'str', + 'token_last_eight': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'scopes': 'scopes', + 'sha1': 'sha1', + 'token_last_eight': 'token_last_eight' + } + + def __init__(self, id=None, name=None, scopes=None, sha1=None, token_last_eight=None, _configuration=None): # noqa: E501 + """AccessToken - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._name = None + self._scopes = None + self._sha1 = None + self._token_last_eight = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if scopes is not None: + self.scopes = scopes + if sha1 is not None: + self.sha1 = sha1 + if token_last_eight is not None: + self.token_last_eight = token_last_eight + + @property + def id(self): + """Gets the id of this AccessToken. # noqa: E501 + + + :return: The id of this AccessToken. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AccessToken. + + + :param id: The id of this AccessToken. # noqa: E501 + :type: int + """ + + self._id = id + + @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 + """ + + self._name = name + + @property + def scopes(self): + """Gets the scopes of this AccessToken. # noqa: E501 + + + :return: The scopes of this AccessToken. # noqa: E501 + :rtype: list[str] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """Sets the scopes of this AccessToken. + + + :param scopes: The scopes of this AccessToken. # noqa: E501 + :type: list[str] + """ + + self._scopes = scopes + + @property + def sha1(self): + """Gets the sha1 of this AccessToken. # noqa: E501 + + + :return: The sha1 of this AccessToken. # noqa: E501 + :rtype: str + """ + return self._sha1 + + @sha1.setter + def sha1(self, sha1): + """Sets the sha1 of this AccessToken. + + + :param sha1: The sha1 of this AccessToken. # noqa: E501 + :type: str + """ + + self._sha1 = sha1 + + @property + def token_last_eight(self): + """Gets the token_last_eight of this AccessToken. # noqa: E501 + + + :return: The token_last_eight of this AccessToken. # noqa: E501 + :rtype: str + """ + return self._token_last_eight + + @token_last_eight.setter + def token_last_eight(self, token_last_eight): + """Sets the token_last_eight of this AccessToken. + + + :param token_last_eight: The token_last_eight of this AccessToken. # noqa: E501 + :type: str + """ + + self._token_last_eight = token_last_eight + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccessToken): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/action_task.py b/gitea/models/action_task.py new file mode 100644 index 0000000..0254287 --- /dev/null +++ b/gitea/models/action_task.py @@ -0,0 +1,435 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ActionTask(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', + 'display_title': 'str', + 'event': 'str', + 'head_branch': 'str', + 'head_sha': 'str', + 'id': 'int', + 'name': 'str', + 'run_number': 'int', + 'run_started_at': 'datetime', + 'status': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'workflow_id': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'display_title': 'display_title', + 'event': 'event', + 'head_branch': 'head_branch', + 'head_sha': 'head_sha', + 'id': 'id', + 'name': 'name', + 'run_number': 'run_number', + 'run_started_at': 'run_started_at', + 'status': 'status', + 'updated_at': 'updated_at', + 'url': 'url', + 'workflow_id': 'workflow_id' + } + + def __init__(self, created_at=None, display_title=None, event=None, head_branch=None, head_sha=None, id=None, name=None, run_number=None, run_started_at=None, status=None, updated_at=None, url=None, workflow_id=None, _configuration=None): # noqa: E501 + """ActionTask - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._display_title = None + self._event = None + self._head_branch = None + self._head_sha = None + self._id = None + self._name = None + self._run_number = None + self._run_started_at = None + self._status = None + self._updated_at = None + self._url = None + self._workflow_id = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if display_title is not None: + self.display_title = display_title + if event is not None: + self.event = event + if head_branch is not None: + self.head_branch = head_branch + if head_sha is not None: + self.head_sha = head_sha + if id is not None: + self.id = id + if name is not None: + self.name = name + if run_number is not None: + self.run_number = run_number + if run_started_at is not None: + self.run_started_at = run_started_at + if status is not None: + self.status = status + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if workflow_id is not None: + self.workflow_id = workflow_id + + @property + def created_at(self): + """Gets the created_at of this ActionTask. # noqa: E501 + + + :return: The created_at of this ActionTask. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ActionTask. + + + :param created_at: The created_at of this ActionTask. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def display_title(self): + """Gets the display_title of this ActionTask. # noqa: E501 + + + :return: The display_title of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._display_title + + @display_title.setter + def display_title(self, display_title): + """Sets the display_title of this ActionTask. + + + :param display_title: The display_title of this ActionTask. # noqa: E501 + :type: str + """ + + self._display_title = display_title + + @property + def event(self): + """Gets the event of this ActionTask. # noqa: E501 + + + :return: The event of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this ActionTask. + + + :param event: The event of this ActionTask. # noqa: E501 + :type: str + """ + + self._event = event + + @property + def head_branch(self): + """Gets the head_branch of this ActionTask. # noqa: E501 + + + :return: The head_branch of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._head_branch + + @head_branch.setter + def head_branch(self, head_branch): + """Sets the head_branch of this ActionTask. + + + :param head_branch: The head_branch of this ActionTask. # noqa: E501 + :type: str + """ + + self._head_branch = head_branch + + @property + def head_sha(self): + """Gets the head_sha of this ActionTask. # noqa: E501 + + + :return: The head_sha of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._head_sha + + @head_sha.setter + def head_sha(self, head_sha): + """Sets the head_sha of this ActionTask. + + + :param head_sha: The head_sha of this ActionTask. # noqa: E501 + :type: str + """ + + self._head_sha = head_sha + + @property + def id(self): + """Gets the id of this ActionTask. # noqa: E501 + + + :return: The id of this ActionTask. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionTask. + + + :param id: The id of this ActionTask. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ActionTask. # noqa: E501 + + + :return: The name of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionTask. + + + :param name: The name of this ActionTask. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def run_number(self): + """Gets the run_number of this ActionTask. # noqa: E501 + + + :return: The run_number of this ActionTask. # noqa: E501 + :rtype: int + """ + return self._run_number + + @run_number.setter + def run_number(self, run_number): + """Sets the run_number of this ActionTask. + + + :param run_number: The run_number of this ActionTask. # noqa: E501 + :type: int + """ + + self._run_number = run_number + + @property + def run_started_at(self): + """Gets the run_started_at of this ActionTask. # noqa: E501 + + + :return: The run_started_at of this ActionTask. # noqa: E501 + :rtype: datetime + """ + return self._run_started_at + + @run_started_at.setter + def run_started_at(self, run_started_at): + """Sets the run_started_at of this ActionTask. + + + :param run_started_at: The run_started_at of this ActionTask. # noqa: E501 + :type: datetime + """ + + self._run_started_at = run_started_at + + @property + def status(self): + """Gets the status of this ActionTask. # noqa: E501 + + + :return: The status of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ActionTask. + + + :param status: The status of this ActionTask. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def updated_at(self): + """Gets the updated_at of this ActionTask. # noqa: E501 + + + :return: The updated_at of this ActionTask. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ActionTask. + + + :param updated_at: The updated_at of this ActionTask. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this ActionTask. # noqa: E501 + + + :return: The url of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ActionTask. + + + :param url: The url of this ActionTask. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def workflow_id(self): + """Gets the workflow_id of this ActionTask. # noqa: E501 + + + :return: The workflow_id of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._workflow_id + + @workflow_id.setter + def workflow_id(self, workflow_id): + """Sets the workflow_id of this ActionTask. + + + :param workflow_id: The workflow_id of this ActionTask. # noqa: E501 + :type: str + """ + + self._workflow_id = workflow_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(ActionTask, 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, ActionTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/action_task_response.py b/gitea/models/action_task_response.py new file mode 100644 index 0000000..4e87533 --- /dev/null +++ b/gitea/models/action_task_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ActionTaskResponse(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 = { + 'total_count': 'int', + 'workflow_runs': 'list[ActionTask]' + } + + attribute_map = { + 'total_count': 'total_count', + 'workflow_runs': 'workflow_runs' + } + + def __init__(self, total_count=None, workflow_runs=None, _configuration=None): # noqa: E501 + """ActionTaskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._total_count = None + self._workflow_runs = None + self.discriminator = None + + if total_count is not None: + self.total_count = total_count + if workflow_runs is not None: + self.workflow_runs = workflow_runs + + @property + def total_count(self): + """Gets the total_count of this ActionTaskResponse. # noqa: E501 + + + :return: The total_count of this ActionTaskResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ActionTaskResponse. + + + :param total_count: The total_count of this ActionTaskResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def workflow_runs(self): + """Gets the workflow_runs of this ActionTaskResponse. # noqa: E501 + + + :return: The workflow_runs of this ActionTaskResponse. # noqa: E501 + :rtype: list[ActionTask] + """ + return self._workflow_runs + + @workflow_runs.setter + def workflow_runs(self, workflow_runs): + """Sets the workflow_runs of this ActionTaskResponse. + + + :param workflow_runs: The workflow_runs of this ActionTaskResponse. # noqa: E501 + :type: list[ActionTask] + """ + + self._workflow_runs = workflow_runs + + 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(ActionTaskResponse, 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, ActionTaskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionTaskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/action_variable.py b/gitea/models/action_variable.py new file mode 100644 index 0000000..b0a5766 --- /dev/null +++ b/gitea/models/action_variable.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ActionVariable(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': 'str', + 'name': 'str', + 'owner_id': 'int', + 'repo_id': 'int' + } + + attribute_map = { + 'data': 'data', + 'name': 'name', + 'owner_id': 'owner_id', + 'repo_id': 'repo_id' + } + + def __init__(self, data=None, name=None, owner_id=None, repo_id=None, _configuration=None): # noqa: E501 + """ActionVariable - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self._name = None + self._owner_id = None + self._repo_id = None + self.discriminator = None + + if data is not None: + self.data = data + if name is not None: + self.name = name + if owner_id is not None: + self.owner_id = owner_id + if repo_id is not None: + self.repo_id = repo_id + + @property + def data(self): + """Gets the data of this ActionVariable. # noqa: E501 + + the value of the variable # noqa: E501 + + :return: The data of this ActionVariable. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ActionVariable. + + the value of the variable # noqa: E501 + + :param data: The data of this ActionVariable. # noqa: E501 + :type: str + """ + + self._data = data + + @property + def name(self): + """Gets the name of this ActionVariable. # noqa: E501 + + the name of the variable # noqa: E501 + + :return: The name of this ActionVariable. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionVariable. + + the name of the variable # noqa: E501 + + :param name: The name of this ActionVariable. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner_id(self): + """Gets the owner_id of this ActionVariable. # noqa: E501 + + the owner to which the variable belongs # noqa: E501 + + :return: The owner_id of this ActionVariable. # noqa: E501 + :rtype: int + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this ActionVariable. + + the owner to which the variable belongs # noqa: E501 + + :param owner_id: The owner_id of this ActionVariable. # noqa: E501 + :type: int + """ + + self._owner_id = owner_id + + @property + def repo_id(self): + """Gets the repo_id of this ActionVariable. # noqa: E501 + + the repository to which the variable belongs # noqa: E501 + + :return: The repo_id of this ActionVariable. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this ActionVariable. + + the repository to which the variable belongs # noqa: E501 + + :param repo_id: The repo_id of this ActionVariable. # noqa: E501 + :type: int + """ + + self._repo_id = repo_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(ActionVariable, 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, ActionVariable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionVariable): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/activity.py b/gitea/models/activity.py new file mode 100644 index 0000000..53a4f0f --- /dev/null +++ b/gitea/models/activity.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Activity(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 = { + 'act_user': 'User', + 'act_user_id': 'int', + 'comment': 'Comment', + 'comment_id': 'int', + 'content': 'str', + 'created': 'datetime', + 'id': 'int', + 'is_private': 'bool', + 'op_type': 'str', + 'ref_name': 'str', + 'repo': 'Repository', + 'repo_id': 'int', + 'user_id': 'int' + } + + attribute_map = { + 'act_user': 'act_user', + 'act_user_id': 'act_user_id', + 'comment': 'comment', + 'comment_id': 'comment_id', + 'content': 'content', + 'created': 'created', + 'id': 'id', + 'is_private': 'is_private', + 'op_type': 'op_type', + 'ref_name': 'ref_name', + 'repo': 'repo', + 'repo_id': 'repo_id', + 'user_id': 'user_id' + } + + def __init__(self, act_user=None, act_user_id=None, comment=None, comment_id=None, content=None, created=None, id=None, is_private=None, op_type=None, ref_name=None, repo=None, repo_id=None, user_id=None, _configuration=None): # noqa: E501 + """Activity - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._act_user = None + self._act_user_id = None + self._comment = None + self._comment_id = None + self._content = None + self._created = None + self._id = None + self._is_private = None + self._op_type = None + self._ref_name = None + self._repo = None + self._repo_id = None + self._user_id = None + self.discriminator = None + + if act_user is not None: + self.act_user = act_user + if act_user_id is not None: + self.act_user_id = act_user_id + if comment is not None: + self.comment = comment + if comment_id is not None: + self.comment_id = comment_id + if content is not None: + self.content = content + if created is not None: + self.created = created + if id is not None: + self.id = id + if is_private is not None: + self.is_private = is_private + if op_type is not None: + self.op_type = op_type + if ref_name is not None: + self.ref_name = ref_name + if repo is not None: + self.repo = repo + if repo_id is not None: + self.repo_id = repo_id + if user_id is not None: + self.user_id = user_id + + @property + def act_user(self): + """Gets the act_user of this Activity. # noqa: E501 + + + :return: The act_user of this Activity. # noqa: E501 + :rtype: User + """ + return self._act_user + + @act_user.setter + def act_user(self, act_user): + """Sets the act_user of this Activity. + + + :param act_user: The act_user of this Activity. # noqa: E501 + :type: User + """ + + self._act_user = act_user + + @property + def act_user_id(self): + """Gets the act_user_id of this Activity. # noqa: E501 + + + :return: The act_user_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._act_user_id + + @act_user_id.setter + def act_user_id(self, act_user_id): + """Sets the act_user_id of this Activity. + + + :param act_user_id: The act_user_id of this Activity. # noqa: E501 + :type: int + """ + + self._act_user_id = act_user_id + + @property + def comment(self): + """Gets the comment of this Activity. # noqa: E501 + + + :return: The comment of this Activity. # noqa: E501 + :rtype: Comment + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this Activity. + + + :param comment: The comment of this Activity. # noqa: E501 + :type: Comment + """ + + self._comment = comment + + @property + def comment_id(self): + """Gets the comment_id of this Activity. # noqa: E501 + + + :return: The comment_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._comment_id + + @comment_id.setter + def comment_id(self, comment_id): + """Sets the comment_id of this Activity. + + + :param comment_id: The comment_id of this Activity. # noqa: E501 + :type: int + """ + + self._comment_id = comment_id + + @property + def content(self): + """Gets the content of this Activity. # noqa: E501 + + + :return: The content of this Activity. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this Activity. + + + :param content: The content of this Activity. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def created(self): + """Gets the created of this Activity. # noqa: E501 + + + :return: The created of this Activity. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Activity. + + + :param created: The created of this Activity. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this Activity. # noqa: E501 + + + :return: The id of this Activity. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Activity. + + + :param id: The id of this Activity. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def is_private(self): + """Gets the is_private of this Activity. # noqa: E501 + + + :return: The is_private of this Activity. # noqa: E501 + :rtype: bool + """ + return self._is_private + + @is_private.setter + def is_private(self, is_private): + """Sets the is_private of this Activity. + + + :param is_private: The is_private of this Activity. # noqa: E501 + :type: bool + """ + + self._is_private = is_private + + @property + def op_type(self): + """Gets the op_type of this Activity. # noqa: E501 + + the type of action # noqa: E501 + + :return: The op_type of this Activity. # noqa: E501 + :rtype: str + """ + return self._op_type + + @op_type.setter + def op_type(self, op_type): + """Sets the op_type of this Activity. + + the type of action # noqa: E501 + + :param op_type: The op_type of this Activity. # noqa: E501 + :type: str + """ + allowed_values = ["create_repo", "rename_repo", "star_repo", "watch_repo", "commit_repo", "create_issue", "create_pull_request", "transfer_repo", "push_tag", "comment_issue", "merge_pull_request", "close_issue", "reopen_issue", "close_pull_request", "reopen_pull_request", "delete_tag", "delete_branch", "mirror_sync_push", "mirror_sync_create", "mirror_sync_delete", "approve_pull_request", "reject_pull_request", "comment_pull", "publish_release", "pull_review_dismissed", "pull_request_ready_for_review", "auto_merge_pull_request"] # noqa: E501 + if (self._configuration.client_side_validation and + op_type not in allowed_values): + raise ValueError( + "Invalid value for `op_type` ({0}), must be one of {1}" # noqa: E501 + .format(op_type, allowed_values) + ) + + self._op_type = op_type + + @property + def ref_name(self): + """Gets the ref_name of this Activity. # noqa: E501 + + + :return: The ref_name of this Activity. # noqa: E501 + :rtype: str + """ + return self._ref_name + + @ref_name.setter + def ref_name(self, ref_name): + """Sets the ref_name of this Activity. + + + :param ref_name: The ref_name of this Activity. # noqa: E501 + :type: str + """ + + self._ref_name = ref_name + + @property + def repo(self): + """Gets the repo of this Activity. # noqa: E501 + + + :return: The repo of this Activity. # noqa: E501 + :rtype: Repository + """ + return self._repo + + @repo.setter + def repo(self, repo): + """Sets the repo of this Activity. + + + :param repo: The repo of this Activity. # noqa: E501 + :type: Repository + """ + + self._repo = repo + + @property + def repo_id(self): + """Gets the repo_id of this Activity. # noqa: E501 + + + :return: The repo_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this Activity. + + + :param repo_id: The repo_id of this Activity. # noqa: E501 + :type: int + """ + + self._repo_id = repo_id + + @property + def user_id(self): + """Gets the user_id of this Activity. # noqa: E501 + + + :return: The user_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Activity. + + + :param user_id: The user_id of this Activity. # 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(Activity, 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, Activity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Activity): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/activity_pub.py b/gitea/models/activity_pub.py new file mode 100644 index 0000000..b8c33a4 --- /dev/null +++ b/gitea/models/activity_pub.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ActivityPub(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' + } + + attribute_map = { + 'context': '@context' + } + + def __init__(self, context=None, _configuration=None): # noqa: E501 + """ActivityPub - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._context = None + self.discriminator = None + + if context is not None: + self.context = context + + @property + def context(self): + """Gets the context of this ActivityPub. # noqa: E501 + + + :return: The context of this ActivityPub. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this ActivityPub. + + + :param context: The context of this ActivityPub. # noqa: E501 + :type: str + """ + + self._context = context + + 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(ActivityPub, 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, ActivityPub): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActivityPub): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/add_collaborator_option.py b/gitea/models/add_collaborator_option.py new file mode 100644 index 0000000..ed8d65c --- /dev/null +++ b/gitea/models/add_collaborator_option.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """AddCollaboratorOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if (self._configuration.client_side_validation and + 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 + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddCollaboratorOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/add_time_option.py b/gitea/models/add_time_option.py new file mode 100644 index 0000000..885583f --- /dev/null +++ b/gitea/models/add_time_option.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'created': 'datetime', + 'time': 'int', + 'user_name': 'str' + } + + attribute_map = { + 'created': 'created', + 'time': 'time', + 'user_name': 'user_name' + } + + def __init__(self, created=None, time=None, user_name=None, _configuration=None): # noqa: E501 + """AddTimeOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._time = None + self._user_name = None + self.discriminator = None + + if created is not None: + self.created = created + self.time = time + if user_name is not None: + self.user_name = user_name + + @property + def created(self): + """Gets the created of this AddTimeOption. # noqa: E501 + + + :return: The created of this AddTimeOption. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this AddTimeOption. + + + :param created: The created of this AddTimeOption. # noqa: E501 + :type: datetime + """ + + self._created = created + + @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 self._configuration.client_side_validation and time is None: + raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 + + self._time = time + + @property + def user_name(self): + """Gets the user_name of this AddTimeOption. # noqa: E501 + + User who spent the time (optional) # noqa: E501 + + :return: The user_name of this AddTimeOption. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this AddTimeOption. + + User who spent the time (optional) # noqa: E501 + + :param user_name: The user_name of this AddTimeOption. # noqa: E501 + :type: str + """ + + self._user_name = user_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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddTimeOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/annotated_tag.py b/gitea/models/annotated_tag.py new file mode 100644 index 0000000..c3ef96b --- /dev/null +++ b/gitea/models/annotated_tag.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class AnnotatedTag(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 = { + 'message': 'str', + 'object': 'AnnotatedTagObject', + 'sha': 'str', + 'tag': 'str', + 'tagger': 'CommitUser', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'message': 'message', + 'object': 'object', + 'sha': 'sha', + 'tag': 'tag', + 'tagger': 'tagger', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, message=None, object=None, sha=None, tag=None, tagger=None, url=None, verification=None, _configuration=None): # noqa: E501 + """AnnotatedTag - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._object = None + self._sha = None + self._tag = None + self._tagger = None + self._url = None + self._verification = None + self.discriminator = None + + if message is not None: + self.message = message + if object is not None: + self.object = object + if sha is not None: + self.sha = sha + if tag is not None: + self.tag = tag + if tagger is not None: + self.tagger = tagger + if url is not None: + self.url = url + if verification is not None: + self.verification = verification + + @property + def message(self): + """Gets the message of this AnnotatedTag. # noqa: E501 + + + :return: The message of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AnnotatedTag. + + + :param message: The message of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def object(self): + """Gets the object of this AnnotatedTag. # noqa: E501 + + + :return: The object of this AnnotatedTag. # noqa: E501 + :rtype: AnnotatedTagObject + """ + return self._object + + @object.setter + def object(self, object): + """Sets the object of this AnnotatedTag. + + + :param object: The object of this AnnotatedTag. # noqa: E501 + :type: AnnotatedTagObject + """ + + self._object = object + + @property + def sha(self): + """Gets the sha of this AnnotatedTag. # noqa: E501 + + + :return: The sha of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this AnnotatedTag. + + + :param sha: The sha of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def tag(self): + """Gets the tag of this AnnotatedTag. # noqa: E501 + + + :return: The tag of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this AnnotatedTag. + + + :param tag: The tag of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._tag = tag + + @property + def tagger(self): + """Gets the tagger of this AnnotatedTag. # noqa: E501 + + + :return: The tagger of this AnnotatedTag. # noqa: E501 + :rtype: CommitUser + """ + return self._tagger + + @tagger.setter + def tagger(self, tagger): + """Sets the tagger of this AnnotatedTag. + + + :param tagger: The tagger of this AnnotatedTag. # noqa: E501 + :type: CommitUser + """ + + self._tagger = tagger + + @property + def url(self): + """Gets the url of this AnnotatedTag. # noqa: E501 + + + :return: The url of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this AnnotatedTag. + + + :param url: The url of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this AnnotatedTag. # noqa: E501 + + + :return: The verification of this AnnotatedTag. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this AnnotatedTag. + + + :param verification: The verification of this AnnotatedTag. # 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(AnnotatedTag, 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, AnnotatedTag): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AnnotatedTag): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/annotated_tag_object.py b/gitea/models/annotated_tag_object.py new file mode 100644 index 0000000..a500713 --- /dev/null +++ b/gitea/models/annotated_tag_object.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class AnnotatedTagObject(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, _configuration=None): # noqa: E501 + """AnnotatedTagObject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 AnnotatedTagObject. # noqa: E501 + + + :return: The sha of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this AnnotatedTagObject. + + + :param sha: The sha of this AnnotatedTagObject. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def type(self): + """Gets the type of this AnnotatedTagObject. # noqa: E501 + + + :return: The type of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AnnotatedTagObject. + + + :param type: The type of this AnnotatedTagObject. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this AnnotatedTagObject. # noqa: E501 + + + :return: The url of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this AnnotatedTagObject. + + + :param url: The url of this AnnotatedTagObject. # 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(AnnotatedTagObject, 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, AnnotatedTagObject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AnnotatedTagObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/api_error.py b/gitea/models/api_error.py new file mode 100644 index 0000000..4938dbb --- /dev/null +++ b/gitea/models/api_error.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class APIError(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 = { + 'message': 'str', + 'url': 'str' + } + + attribute_map = { + 'message': 'message', + 'url': 'url' + } + + def __init__(self, message=None, url=None, _configuration=None): # noqa: E501 + """APIError - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._url = None + self.discriminator = None + + if message is not None: + self.message = message + if url is not None: + self.url = url + + @property + def message(self): + """Gets the message of this APIError. # noqa: E501 + + + :return: The message of this APIError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this APIError. + + + :param message: The message of this APIError. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def url(self): + """Gets the url of this APIError. # noqa: E501 + + + :return: The url of this APIError. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this APIError. + + + :param url: The url of this APIError. # 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(APIError, 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, APIError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, APIError): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/attachment.py b/gitea/models/attachment.py new file mode 100644 index 0000000..cde62fd --- /dev/null +++ b/gitea/models/attachment.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """Attachment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Attachment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/badge.py b/gitea/models/badge.py new file mode 100644 index 0000000..6e147ad --- /dev/null +++ b/gitea/models/badge.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Badge(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', + 'image_url': 'str', + 'slug': 'str' + } + + attribute_map = { + 'description': 'description', + 'id': 'id', + 'image_url': 'image_url', + 'slug': 'slug' + } + + def __init__(self, description=None, id=None, image_url=None, slug=None, _configuration=None): # noqa: E501 + """Badge - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._id = None + self._image_url = None + self._slug = None + self.discriminator = None + + if description is not None: + self.description = description + if id is not None: + self.id = id + if image_url is not None: + self.image_url = image_url + if slug is not None: + self.slug = slug + + @property + def description(self): + """Gets the description of this Badge. # noqa: E501 + + + :return: The description of this Badge. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Badge. + + + :param description: The description of this Badge. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Badge. # noqa: E501 + + + :return: The id of this Badge. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Badge. + + + :param id: The id of this Badge. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def image_url(self): + """Gets the image_url of this Badge. # noqa: E501 + + + :return: The image_url of this Badge. # noqa: E501 + :rtype: str + """ + return self._image_url + + @image_url.setter + def image_url(self, image_url): + """Sets the image_url of this Badge. + + + :param image_url: The image_url of this Badge. # noqa: E501 + :type: str + """ + + self._image_url = image_url + + @property + def slug(self): + """Gets the slug of this Badge. # noqa: E501 + + + :return: The slug of this Badge. # noqa: E501 + :rtype: str + """ + return self._slug + + @slug.setter + def slug(self, slug): + """Sets the slug of this Badge. + + + :param slug: The slug of this Badge. # noqa: E501 + :type: str + """ + + self._slug = slug + + 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(Badge, 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, Badge): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Badge): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/branch.py b/gitea/models/branch.py new file mode 100644 index 0000000..3d5e281 --- /dev/null +++ b/gitea/models/branch.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'effective_branch_protection_name': 'str', + 'enable_status_check': 'bool', + 'name': 'str', + 'protected': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]', + 'user_can_merge': 'bool', + 'user_can_push': 'bool' + } + + attribute_map = { + 'commit': 'commit', + 'effective_branch_protection_name': 'effective_branch_protection_name', + 'enable_status_check': 'enable_status_check', + 'name': 'name', + 'protected': 'protected', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts', + 'user_can_merge': 'user_can_merge', + 'user_can_push': 'user_can_push' + } + + def __init__(self, commit=None, effective_branch_protection_name=None, enable_status_check=None, name=None, protected=None, required_approvals=None, status_check_contexts=None, user_can_merge=None, user_can_push=None, _configuration=None): # noqa: E501 + """Branch - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._effective_branch_protection_name = None + self._enable_status_check = None + self._name = None + self._protected = None + self._required_approvals = None + self._status_check_contexts = None + self._user_can_merge = None + self._user_can_push = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if effective_branch_protection_name is not None: + self.effective_branch_protection_name = effective_branch_protection_name + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if name is not None: + self.name = name + if protected is not None: + self.protected = protected + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if user_can_merge is not None: + self.user_can_merge = user_can_merge + if user_can_push is not None: + self.user_can_push = user_can_push + + @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 effective_branch_protection_name(self): + """Gets the effective_branch_protection_name of this Branch. # noqa: E501 + + + :return: The effective_branch_protection_name of this Branch. # noqa: E501 + :rtype: str + """ + return self._effective_branch_protection_name + + @effective_branch_protection_name.setter + def effective_branch_protection_name(self, effective_branch_protection_name): + """Sets the effective_branch_protection_name of this Branch. + + + :param effective_branch_protection_name: The effective_branch_protection_name of this Branch. # noqa: E501 + :type: str + """ + + self._effective_branch_protection_name = effective_branch_protection_name + + @property + def enable_status_check(self): + """Gets the enable_status_check of this Branch. # noqa: E501 + + + :return: The enable_status_check of this Branch. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this Branch. + + + :param enable_status_check: The enable_status_check of this Branch. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @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 + + @property + def protected(self): + """Gets the protected of this Branch. # noqa: E501 + + + :return: The protected of this Branch. # noqa: E501 + :rtype: bool + """ + return self._protected + + @protected.setter + def protected(self, protected): + """Sets the protected of this Branch. + + + :param protected: The protected of this Branch. # noqa: E501 + :type: bool + """ + + self._protected = protected + + @property + def required_approvals(self): + """Gets the required_approvals of this Branch. # noqa: E501 + + + :return: The required_approvals of this Branch. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this Branch. + + + :param required_approvals: The required_approvals of this Branch. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this Branch. # noqa: E501 + + + :return: The status_check_contexts of this Branch. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this Branch. + + + :param status_check_contexts: The status_check_contexts of this Branch. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def user_can_merge(self): + """Gets the user_can_merge of this Branch. # noqa: E501 + + + :return: The user_can_merge of this Branch. # noqa: E501 + :rtype: bool + """ + return self._user_can_merge + + @user_can_merge.setter + def user_can_merge(self, user_can_merge): + """Sets the user_can_merge of this Branch. + + + :param user_can_merge: The user_can_merge of this Branch. # noqa: E501 + :type: bool + """ + + self._user_can_merge = user_can_merge + + @property + def user_can_push(self): + """Gets the user_can_push of this Branch. # noqa: E501 + + + :return: The user_can_push of this Branch. # noqa: E501 + :rtype: bool + """ + return self._user_can_push + + @user_can_push.setter + def user_can_push(self, user_can_push): + """Sets the user_can_push of this Branch. + + + :param user_can_push: The user_can_push of this Branch. # noqa: E501 + :type: bool + """ + + self._user_can_push = user_can_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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Branch): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/branch_protection.py b/gitea/models/branch_protection.py new file mode 100644 index 0000000..e412aca --- /dev/null +++ b/gitea/models/branch_protection.py @@ -0,0 +1,957 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class BranchProtection(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 = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_admin_merge_override': 'bool', + 'block_on_official_review_requests': 'bool', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'branch_name': 'str', + 'created_at': 'datetime', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_force_push': 'bool', + 'enable_force_push_allowlist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'force_push_allowlist_deploy_keys': 'bool', + 'force_push_allowlist_teams': 'list[str]', + 'force_push_allowlist_usernames': 'list[str]', + 'ignore_stale_approvals': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'priority': 'int', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'rule_name': 'str', + 'status_check_contexts': 'list[str]', + 'unprotected_file_patterns': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_admin_merge_override': 'block_admin_merge_override', + 'block_on_official_review_requests': 'block_on_official_review_requests', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'branch_name': 'branch_name', + 'created_at': 'created_at', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_force_push': 'enable_force_push', + 'enable_force_push_allowlist': 'enable_force_push_allowlist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'force_push_allowlist_deploy_keys': 'force_push_allowlist_deploy_keys', + 'force_push_allowlist_teams': 'force_push_allowlist_teams', + 'force_push_allowlist_usernames': 'force_push_allowlist_usernames', + 'ignore_stale_approvals': 'ignore_stale_approvals', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'priority': 'priority', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'rule_name': 'rule_name', + 'status_check_contexts': 'status_check_contexts', + 'unprotected_file_patterns': 'unprotected_file_patterns', + 'updated_at': 'updated_at' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_admin_merge_override=None, block_on_official_review_requests=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, branch_name=None, created_at=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_force_push=None, enable_force_push_allowlist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, force_push_allowlist_deploy_keys=None, force_push_allowlist_teams=None, force_push_allowlist_usernames=None, ignore_stale_approvals=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, priority=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, rule_name=None, status_check_contexts=None, unprotected_file_patterns=None, updated_at=None, _configuration=None): # noqa: E501 + """BranchProtection - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_admin_merge_override = None + self._block_on_official_review_requests = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._branch_name = None + self._created_at = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_force_push = None + self._enable_force_push_allowlist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._force_push_allowlist_deploy_keys = None + self._force_push_allowlist_teams = None + self._force_push_allowlist_usernames = None + self._ignore_stale_approvals = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._priority = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._rule_name = None + self._status_check_contexts = None + self._unprotected_file_patterns = None + self._updated_at = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_admin_merge_override is not None: + self.block_admin_merge_override = block_admin_merge_override + if block_on_official_review_requests is not None: + self.block_on_official_review_requests = block_on_official_review_requests + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if branch_name is not None: + self.branch_name = branch_name + if created_at is not None: + self.created_at = created_at + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_force_push is not None: + self.enable_force_push = enable_force_push + if enable_force_push_allowlist is not None: + self.enable_force_push_allowlist = enable_force_push_allowlist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if force_push_allowlist_deploy_keys is not None: + self.force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + if force_push_allowlist_teams is not None: + self.force_push_allowlist_teams = force_push_allowlist_teams + if force_push_allowlist_usernames is not None: + self.force_push_allowlist_usernames = force_push_allowlist_usernames + if ignore_stale_approvals is not None: + self.ignore_stale_approvals = ignore_stale_approvals + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if priority is not None: + self.priority = priority + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if rule_name is not None: + self.rule_name = rule_name + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if unprotected_file_patterns is not None: + self.unprotected_file_patterns = unprotected_file_patterns + if updated_at is not None: + self.updated_at = updated_at + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The approvals_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this BranchProtection. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this BranchProtection. # noqa: E501 + + + :return: The approvals_whitelist_username of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this BranchProtection. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_admin_merge_override(self): + """Gets the block_admin_merge_override of this BranchProtection. # noqa: E501 + + + :return: The block_admin_merge_override of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_admin_merge_override + + @block_admin_merge_override.setter + def block_admin_merge_override(self, block_admin_merge_override): + """Sets the block_admin_merge_override of this BranchProtection. + + + :param block_admin_merge_override: The block_admin_merge_override of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_admin_merge_override = block_admin_merge_override + + @property + def block_on_official_review_requests(self): + """Gets the block_on_official_review_requests of this BranchProtection. # noqa: E501 + + + :return: The block_on_official_review_requests of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_official_review_requests + + @block_on_official_review_requests.setter + def block_on_official_review_requests(self, block_on_official_review_requests): + """Sets the block_on_official_review_requests of this BranchProtection. + + + :param block_on_official_review_requests: The block_on_official_review_requests of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_official_review_requests = block_on_official_review_requests + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this BranchProtection. # noqa: E501 + + + :return: The block_on_outdated_branch of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this BranchProtection. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this BranchProtection. # noqa: E501 + + + :return: The block_on_rejected_reviews of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this BranchProtection. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def branch_name(self): + """Gets the branch_name of this BranchProtection. # noqa: E501 + + Deprecated: true # noqa: E501 + + :return: The branch_name of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._branch_name + + @branch_name.setter + def branch_name(self, branch_name): + """Sets the branch_name of this BranchProtection. + + Deprecated: true # noqa: E501 + + :param branch_name: The branch_name of this BranchProtection. # noqa: E501 + :type: str + """ + + self._branch_name = branch_name + + @property + def created_at(self): + """Gets the created_at of this BranchProtection. # noqa: E501 + + + :return: The created_at of this BranchProtection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this BranchProtection. + + + :param created_at: The created_at of this BranchProtection. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this BranchProtection. # noqa: E501 + + + :return: The dismiss_stale_approvals of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this BranchProtection. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_approvals_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this BranchProtection. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_force_push(self): + """Gets the enable_force_push of this BranchProtection. # noqa: E501 + + + :return: The enable_force_push of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push + + @enable_force_push.setter + def enable_force_push(self, enable_force_push): + """Sets the enable_force_push of this BranchProtection. + + + :param enable_force_push: The enable_force_push of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_force_push = enable_force_push + + @property + def enable_force_push_allowlist(self): + """Gets the enable_force_push_allowlist of this BranchProtection. # noqa: E501 + + + :return: The enable_force_push_allowlist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push_allowlist + + @enable_force_push_allowlist.setter + def enable_force_push_allowlist(self, enable_force_push_allowlist): + """Sets the enable_force_push_allowlist of this BranchProtection. + + + :param enable_force_push_allowlist: The enable_force_push_allowlist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_force_push_allowlist = enable_force_push_allowlist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_merge_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this BranchProtection. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this BranchProtection. # noqa: E501 + + + :return: The enable_push of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this BranchProtection. + + + :param enable_push: The enable_push of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_push_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this BranchProtection. + + + :param enable_push_whitelist: The enable_push_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this BranchProtection. # noqa: E501 + + + :return: The enable_status_check of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this BranchProtection. + + + :param enable_status_check: The enable_status_check of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def force_push_allowlist_deploy_keys(self): + """Gets the force_push_allowlist_deploy_keys of this BranchProtection. # noqa: E501 + + + :return: The force_push_allowlist_deploy_keys of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._force_push_allowlist_deploy_keys + + @force_push_allowlist_deploy_keys.setter + def force_push_allowlist_deploy_keys(self, force_push_allowlist_deploy_keys): + """Sets the force_push_allowlist_deploy_keys of this BranchProtection. + + + :param force_push_allowlist_deploy_keys: The force_push_allowlist_deploy_keys of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + + @property + def force_push_allowlist_teams(self): + """Gets the force_push_allowlist_teams of this BranchProtection. # noqa: E501 + + + :return: The force_push_allowlist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_teams + + @force_push_allowlist_teams.setter + def force_push_allowlist_teams(self, force_push_allowlist_teams): + """Sets the force_push_allowlist_teams of this BranchProtection. + + + :param force_push_allowlist_teams: The force_push_allowlist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_teams = force_push_allowlist_teams + + @property + def force_push_allowlist_usernames(self): + """Gets the force_push_allowlist_usernames of this BranchProtection. # noqa: E501 + + + :return: The force_push_allowlist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_usernames + + @force_push_allowlist_usernames.setter + def force_push_allowlist_usernames(self, force_push_allowlist_usernames): + """Sets the force_push_allowlist_usernames of this BranchProtection. + + + :param force_push_allowlist_usernames: The force_push_allowlist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_usernames = force_push_allowlist_usernames + + @property + def ignore_stale_approvals(self): + """Gets the ignore_stale_approvals of this BranchProtection. # noqa: E501 + + + :return: The ignore_stale_approvals of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._ignore_stale_approvals + + @ignore_stale_approvals.setter + def ignore_stale_approvals(self, ignore_stale_approvals): + """Sets the ignore_stale_approvals of this BranchProtection. + + + :param ignore_stale_approvals: The ignore_stale_approvals of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._ignore_stale_approvals = ignore_stale_approvals + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The merge_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this BranchProtection. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this BranchProtection. # noqa: E501 + + + :return: The merge_whitelist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this BranchProtection. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def priority(self): + """Gets the priority of this BranchProtection. # noqa: E501 + + + :return: The priority of this BranchProtection. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this BranchProtection. + + + :param priority: The priority of this BranchProtection. # noqa: E501 + :type: int + """ + + self._priority = priority + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this BranchProtection. # noqa: E501 + + + :return: The protected_file_patterns of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this BranchProtection. + + + :param protected_file_patterns: The protected_file_patterns of this BranchProtection. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this BranchProtection. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this BranchProtection. + + + :param push_whitelist_teams: The push_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this BranchProtection. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this BranchProtection. # noqa: E501 + + + :return: The require_signed_commits of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this BranchProtection. + + + :param require_signed_commits: The require_signed_commits of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this BranchProtection. # noqa: E501 + + + :return: The required_approvals of this BranchProtection. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this BranchProtection. + + + :param required_approvals: The required_approvals of this BranchProtection. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def rule_name(self): + """Gets the rule_name of this BranchProtection. # noqa: E501 + + + :return: The rule_name of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this BranchProtection. + + + :param rule_name: The rule_name of this BranchProtection. # noqa: E501 + :type: str + """ + + self._rule_name = rule_name + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this BranchProtection. # noqa: E501 + + + :return: The status_check_contexts of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this BranchProtection. + + + :param status_check_contexts: The status_check_contexts of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def unprotected_file_patterns(self): + """Gets the unprotected_file_patterns of this BranchProtection. # noqa: E501 + + + :return: The unprotected_file_patterns of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._unprotected_file_patterns + + @unprotected_file_patterns.setter + def unprotected_file_patterns(self, unprotected_file_patterns): + """Sets the unprotected_file_patterns of this BranchProtection. + + + :param unprotected_file_patterns: The unprotected_file_patterns of this BranchProtection. # noqa: E501 + :type: str + """ + + self._unprotected_file_patterns = unprotected_file_patterns + + @property + def updated_at(self): + """Gets the updated_at of this BranchProtection. # noqa: E501 + + + :return: The updated_at of this BranchProtection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this BranchProtection. + + + :param updated_at: The updated_at of this BranchProtection. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_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(BranchProtection, 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, BranchProtection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BranchProtection): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/change_file_operation.py b/gitea/models/change_file_operation.py new file mode 100644 index 0000000..b3578ab --- /dev/null +++ b/gitea/models/change_file_operation.py @@ -0,0 +1,246 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ChangeFileOperation(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 = { + 'content': 'str', + 'from_path': 'str', + 'operation': 'str', + 'path': 'str', + 'sha': 'str' + } + + attribute_map = { + 'content': 'content', + 'from_path': 'from_path', + 'operation': 'operation', + 'path': 'path', + 'sha': 'sha' + } + + def __init__(self, content=None, from_path=None, operation=None, path=None, sha=None, _configuration=None): # noqa: E501 + """ChangeFileOperation - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._from_path = None + self._operation = None + self._path = None + self._sha = None + self.discriminator = None + + if content is not None: + self.content = content + if from_path is not None: + self.from_path = from_path + self.operation = operation + self.path = path + if sha is not None: + self.sha = sha + + @property + def content(self): + """Gets the content of this ChangeFileOperation. # noqa: E501 + + new or updated file content, must be base64 encoded # noqa: E501 + + :return: The content of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ChangeFileOperation. + + new or updated file content, must be base64 encoded # noqa: E501 + + :param content: The content of this ChangeFileOperation. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def from_path(self): + """Gets the from_path of this ChangeFileOperation. # noqa: E501 + + old path of the file to move # noqa: E501 + + :return: The from_path of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._from_path + + @from_path.setter + def from_path(self, from_path): + """Sets the from_path of this ChangeFileOperation. + + old path of the file to move # noqa: E501 + + :param from_path: The from_path of this ChangeFileOperation. # noqa: E501 + :type: str + """ + + self._from_path = from_path + + @property + def operation(self): + """Gets the operation of this ChangeFileOperation. # noqa: E501 + + indicates what to do with the file # noqa: E501 + + :return: The operation of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._operation + + @operation.setter + def operation(self, operation): + """Sets the operation of this ChangeFileOperation. + + indicates what to do with the file # noqa: E501 + + :param operation: The operation of this ChangeFileOperation. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and operation is None: + raise ValueError("Invalid value for `operation`, must not be `None`") # noqa: E501 + allowed_values = ["create", "update", "delete"] # noqa: E501 + if (self._configuration.client_side_validation and + operation not in allowed_values): + raise ValueError( + "Invalid value for `operation` ({0}), must be one of {1}" # noqa: E501 + .format(operation, allowed_values) + ) + + self._operation = operation + + @property + def path(self): + """Gets the path of this ChangeFileOperation. # noqa: E501 + + path to the existing or new file # noqa: E501 + + :return: The path of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ChangeFileOperation. + + path to the existing or new file # noqa: E501 + + :param path: The path of this ChangeFileOperation. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and path is None: + raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501 + + self._path = path + + @property + def sha(self): + """Gets the sha of this ChangeFileOperation. # noqa: E501 + + sha is the SHA for the file that already exists, required for update or delete # noqa: E501 + + :return: The sha of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this ChangeFileOperation. + + sha is the SHA for the file that already exists, required for update or delete # noqa: E501 + + :param sha: The sha of this ChangeFileOperation. # 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(ChangeFileOperation, 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, ChangeFileOperation): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChangeFileOperation): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/change_files_options.py b/gitea/models/change_files_options.py new file mode 100644 index 0000000..f5d4447 --- /dev/null +++ b/gitea/models/change_files_options.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ChangeFilesOptions(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': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'dates': 'CommitDateOptions', + 'files': 'list[ChangeFileOperation]', + 'message': 'str', + 'new_branch': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'dates': 'dates', + 'files': 'files', + 'message': 'message', + 'new_branch': 'new_branch', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, dates=None, files=None, message=None, new_branch=None, signoff=None, _configuration=None): # noqa: E501 + """ChangeFilesOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._dates = None + self._files = None + self._message = None + self._new_branch = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + if dates is not None: + self.dates = dates + self.files = files + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this ChangeFilesOptions. # noqa: E501 + + + :return: The author of this ChangeFilesOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this ChangeFilesOptions. + + + :param author: The author of this ChangeFilesOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this ChangeFilesOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this ChangeFilesOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this ChangeFilesOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this ChangeFilesOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this ChangeFilesOptions. # noqa: E501 + + + :return: The committer of this ChangeFilesOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this ChangeFilesOptions. + + + :param committer: The committer of this ChangeFilesOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def dates(self): + """Gets the dates of this ChangeFilesOptions. # noqa: E501 + + + :return: The dates of this ChangeFilesOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this ChangeFilesOptions. + + + :param dates: The dates of this ChangeFilesOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def files(self): + """Gets the files of this ChangeFilesOptions. # noqa: E501 + + list of file operations # noqa: E501 + + :return: The files of this ChangeFilesOptions. # noqa: E501 + :rtype: list[ChangeFileOperation] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this ChangeFilesOptions. + + list of file operations # noqa: E501 + + :param files: The files of this ChangeFilesOptions. # noqa: E501 + :type: list[ChangeFileOperation] + """ + if self._configuration.client_side_validation and files is None: + raise ValueError("Invalid value for `files`, must not be `None`") # noqa: E501 + + self._files = files + + @property + def message(self): + """Gets the message of this ChangeFilesOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this ChangeFilesOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ChangeFilesOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this ChangeFilesOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this ChangeFilesOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this ChangeFilesOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this ChangeFilesOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this ChangeFilesOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def signoff(self): + """Gets the signoff of this ChangeFilesOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this ChangeFilesOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this ChangeFilesOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this ChangeFilesOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(ChangeFilesOptions, 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, ChangeFilesOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChangeFilesOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/changed_file.py b/gitea/models/changed_file.py new file mode 100644 index 0000000..7b6c4c0 --- /dev/null +++ b/gitea/models/changed_file.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ChangedFile(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 = { + 'additions': 'int', + 'changes': 'int', + 'contents_url': 'str', + 'deletions': 'int', + 'filename': 'str', + 'html_url': 'str', + 'previous_filename': 'str', + 'raw_url': 'str', + 'status': 'str' + } + + attribute_map = { + 'additions': 'additions', + 'changes': 'changes', + 'contents_url': 'contents_url', + 'deletions': 'deletions', + 'filename': 'filename', + 'html_url': 'html_url', + 'previous_filename': 'previous_filename', + 'raw_url': 'raw_url', + 'status': 'status' + } + + def __init__(self, additions=None, changes=None, contents_url=None, deletions=None, filename=None, html_url=None, previous_filename=None, raw_url=None, status=None, _configuration=None): # noqa: E501 + """ChangedFile - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._additions = None + self._changes = None + self._contents_url = None + self._deletions = None + self._filename = None + self._html_url = None + self._previous_filename = None + self._raw_url = None + self._status = None + self.discriminator = None + + if additions is not None: + self.additions = additions + if changes is not None: + self.changes = changes + if contents_url is not None: + self.contents_url = contents_url + if deletions is not None: + self.deletions = deletions + if filename is not None: + self.filename = filename + if html_url is not None: + self.html_url = html_url + if previous_filename is not None: + self.previous_filename = previous_filename + if raw_url is not None: + self.raw_url = raw_url + if status is not None: + self.status = status + + @property + def additions(self): + """Gets the additions of this ChangedFile. # noqa: E501 + + + :return: The additions of this ChangedFile. # noqa: E501 + :rtype: int + """ + return self._additions + + @additions.setter + def additions(self, additions): + """Sets the additions of this ChangedFile. + + + :param additions: The additions of this ChangedFile. # noqa: E501 + :type: int + """ + + self._additions = additions + + @property + def changes(self): + """Gets the changes of this ChangedFile. # noqa: E501 + + + :return: The changes of this ChangedFile. # noqa: E501 + :rtype: int + """ + return self._changes + + @changes.setter + def changes(self, changes): + """Sets the changes of this ChangedFile. + + + :param changes: The changes of this ChangedFile. # noqa: E501 + :type: int + """ + + self._changes = changes + + @property + def contents_url(self): + """Gets the contents_url of this ChangedFile. # noqa: E501 + + + :return: The contents_url of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._contents_url + + @contents_url.setter + def contents_url(self, contents_url): + """Sets the contents_url of this ChangedFile. + + + :param contents_url: The contents_url of this ChangedFile. # noqa: E501 + :type: str + """ + + self._contents_url = contents_url + + @property + def deletions(self): + """Gets the deletions of this ChangedFile. # noqa: E501 + + + :return: The deletions of this ChangedFile. # noqa: E501 + :rtype: int + """ + return self._deletions + + @deletions.setter + def deletions(self, deletions): + """Sets the deletions of this ChangedFile. + + + :param deletions: The deletions of this ChangedFile. # noqa: E501 + :type: int + """ + + self._deletions = deletions + + @property + def filename(self): + """Gets the filename of this ChangedFile. # noqa: E501 + + + :return: The filename of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this ChangedFile. + + + :param filename: The filename of this ChangedFile. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def html_url(self): + """Gets the html_url of this ChangedFile. # noqa: E501 + + + :return: The html_url of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ChangedFile. + + + :param html_url: The html_url of this ChangedFile. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def previous_filename(self): + """Gets the previous_filename of this ChangedFile. # noqa: E501 + + + :return: The previous_filename of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._previous_filename + + @previous_filename.setter + def previous_filename(self, previous_filename): + """Sets the previous_filename of this ChangedFile. + + + :param previous_filename: The previous_filename of this ChangedFile. # noqa: E501 + :type: str + """ + + self._previous_filename = previous_filename + + @property + def raw_url(self): + """Gets the raw_url of this ChangedFile. # noqa: E501 + + + :return: The raw_url of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._raw_url + + @raw_url.setter + def raw_url(self, raw_url): + """Sets the raw_url of this ChangedFile. + + + :param raw_url: The raw_url of this ChangedFile. # noqa: E501 + :type: str + """ + + self._raw_url = raw_url + + @property + def status(self): + """Gets the status of this ChangedFile. # noqa: E501 + + + :return: The status of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ChangedFile. + + + :param status: The status of this ChangedFile. # noqa: E501 + :type: str + """ + + self._status = status + + 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(ChangedFile, 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, ChangedFile): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChangedFile): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/combined_status.py b/gitea/models/combined_status.py new file mode 100644 index 0000000..67e1752 --- /dev/null +++ b/gitea/models/combined_status.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CombinedStatus(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_url': 'str', + 'repository': 'Repository', + 'sha': 'str', + 'state': 'CommitStatusState', + 'statuses': 'list[CommitStatus]', + 'total_count': 'int', + 'url': 'str' + } + + attribute_map = { + 'commit_url': 'commit_url', + 'repository': 'repository', + 'sha': 'sha', + 'state': 'state', + 'statuses': 'statuses', + 'total_count': 'total_count', + 'url': 'url' + } + + def __init__(self, commit_url=None, repository=None, sha=None, state=None, statuses=None, total_count=None, url=None, _configuration=None): # noqa: E501 + """CombinedStatus - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit_url = None + self._repository = None + self._sha = None + self._state = None + self._statuses = None + self._total_count = None + self._url = None + self.discriminator = None + + if commit_url is not None: + self.commit_url = commit_url + if repository is not None: + self.repository = repository + if sha is not None: + self.sha = sha + if state is not None: + self.state = state + if statuses is not None: + self.statuses = statuses + if total_count is not None: + self.total_count = total_count + if url is not None: + self.url = url + + @property + def commit_url(self): + """Gets the commit_url of this CombinedStatus. # noqa: E501 + + + :return: The commit_url of this CombinedStatus. # noqa: E501 + :rtype: str + """ + return self._commit_url + + @commit_url.setter + def commit_url(self, commit_url): + """Sets the commit_url of this CombinedStatus. + + + :param commit_url: The commit_url of this CombinedStatus. # noqa: E501 + :type: str + """ + + self._commit_url = commit_url + + @property + def repository(self): + """Gets the repository of this CombinedStatus. # noqa: E501 + + + :return: The repository of this CombinedStatus. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this CombinedStatus. + + + :param repository: The repository of this CombinedStatus. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def sha(self): + """Gets the sha of this CombinedStatus. # noqa: E501 + + + :return: The sha of this CombinedStatus. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this CombinedStatus. + + + :param sha: The sha of this CombinedStatus. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def state(self): + """Gets the state of this CombinedStatus. # noqa: E501 + + + :return: The state of this CombinedStatus. # noqa: E501 + :rtype: CommitStatusState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CombinedStatus. + + + :param state: The state of this CombinedStatus. # noqa: E501 + :type: CommitStatusState + """ + + self._state = state + + @property + def statuses(self): + """Gets the statuses of this CombinedStatus. # noqa: E501 + + + :return: The statuses of this CombinedStatus. # noqa: E501 + :rtype: list[CommitStatus] + """ + return self._statuses + + @statuses.setter + def statuses(self, statuses): + """Sets the statuses of this CombinedStatus. + + + :param statuses: The statuses of this CombinedStatus. # noqa: E501 + :type: list[CommitStatus] + """ + + self._statuses = statuses + + @property + def total_count(self): + """Gets the total_count of this CombinedStatus. # noqa: E501 + + + :return: The total_count of this CombinedStatus. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this CombinedStatus. + + + :param total_count: The total_count of this CombinedStatus. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def url(self): + """Gets the url of this CombinedStatus. # noqa: E501 + + + :return: The url of this CombinedStatus. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CombinedStatus. + + + :param url: The url of this CombinedStatus. # 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(CombinedStatus, 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, CombinedStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CombinedStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/comment.py b/gitea/models/comment.py new file mode 100644 index 0000000..7876348 --- /dev/null +++ b/gitea/models/comment.py @@ -0,0 +1,383 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'assets': 'list[Attachment]', + 'body': 'str', + 'created_at': 'datetime', + 'html_url': 'str', + 'id': 'int', + 'issue_url': 'str', + 'original_author': 'str', + 'original_author_id': 'int', + 'pull_request_url': 'str', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'assets': 'assets', + 'body': 'body', + 'created_at': 'created_at', + 'html_url': 'html_url', + 'id': 'id', + 'issue_url': 'issue_url', + 'original_author': 'original_author', + 'original_author_id': 'original_author_id', + 'pull_request_url': 'pull_request_url', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, assets=None, body=None, created_at=None, html_url=None, id=None, issue_url=None, original_author=None, original_author_id=None, pull_request_url=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """Comment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assets = None + self._body = None + self._created_at = None + self._html_url = None + self._id = None + self._issue_url = None + self._original_author = None + self._original_author_id = None + self._pull_request_url = None + self._updated_at = None + self._user = None + self.discriminator = None + + if assets is not None: + self.assets = assets + 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 original_author is not None: + self.original_author = original_author + if original_author_id is not None: + self.original_author_id = original_author_id + 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 assets(self): + """Gets the assets of this Comment. # noqa: E501 + + + :return: The assets of this Comment. # noqa: E501 + :rtype: list[Attachment] + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this Comment. + + + :param assets: The assets of this Comment. # noqa: E501 + :type: list[Attachment] + """ + + self._assets = assets + + @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 original_author(self): + """Gets the original_author of this Comment. # noqa: E501 + + + :return: The original_author of this Comment. # noqa: E501 + :rtype: str + """ + return self._original_author + + @original_author.setter + def original_author(self, original_author): + """Sets the original_author of this Comment. + + + :param original_author: The original_author of this Comment. # noqa: E501 + :type: str + """ + + self._original_author = original_author + + @property + def original_author_id(self): + """Gets the original_author_id of this Comment. # noqa: E501 + + + :return: The original_author_id of this Comment. # noqa: E501 + :rtype: int + """ + return self._original_author_id + + @original_author_id.setter + def original_author_id(self, original_author_id): + """Sets the original_author_id of this Comment. + + + :param original_author_id: The original_author_id of this Comment. # noqa: E501 + :type: int + """ + + self._original_author_id = original_author_id + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Comment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit.py b/gitea/models/commit.py new file mode 100644 index 0000000..31358bb --- /dev/null +++ b/gitea/models/commit.py @@ -0,0 +1,357 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Commit(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': 'User', + 'commit': 'RepoCommit', + 'committer': 'User', + 'created': 'datetime', + 'files': 'list[CommitAffectedFiles]', + 'html_url': 'str', + 'parents': 'list[CommitMeta]', + 'sha': 'str', + 'stats': 'CommitStats', + 'url': 'str' + } + + attribute_map = { + 'author': 'author', + 'commit': 'commit', + 'committer': 'committer', + 'created': 'created', + 'files': 'files', + 'html_url': 'html_url', + 'parents': 'parents', + 'sha': 'sha', + 'stats': 'stats', + 'url': 'url' + } + + def __init__(self, author=None, commit=None, committer=None, created=None, files=None, html_url=None, parents=None, sha=None, stats=None, url=None, _configuration=None): # noqa: E501 + """Commit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._commit = None + self._committer = None + self._created = None + self._files = None + self._html_url = None + self._parents = None + self._sha = None + self._stats = None + self._url = None + self.discriminator = None + + if author is not None: + self.author = author + if commit is not None: + self.commit = commit + if committer is not None: + self.committer = committer + if created is not None: + self.created = created + if files is not None: + self.files = files + if html_url is not None: + self.html_url = html_url + if parents is not None: + self.parents = parents + if sha is not None: + self.sha = sha + if stats is not None: + self.stats = stats + if url is not None: + self.url = url + + @property + def author(self): + """Gets the author of this Commit. # noqa: E501 + + + :return: The author of this Commit. # noqa: E501 + :rtype: User + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this Commit. + + + :param author: The author of this Commit. # noqa: E501 + :type: User + """ + + self._author = author + + @property + def commit(self): + """Gets the commit of this Commit. # noqa: E501 + + + :return: The commit of this Commit. # noqa: E501 + :rtype: RepoCommit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Commit. + + + :param commit: The commit of this Commit. # noqa: E501 + :type: RepoCommit + """ + + self._commit = commit + + @property + def committer(self): + """Gets the committer of this Commit. # noqa: E501 + + + :return: The committer of this Commit. # noqa: E501 + :rtype: User + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this Commit. + + + :param committer: The committer of this Commit. # noqa: E501 + :type: User + """ + + self._committer = committer + + @property + def created(self): + """Gets the created of this Commit. # noqa: E501 + + + :return: The created of this Commit. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Commit. + + + :param created: The created of this Commit. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def files(self): + """Gets the files of this Commit. # noqa: E501 + + + :return: The files of this Commit. # noqa: E501 + :rtype: list[CommitAffectedFiles] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this Commit. + + + :param files: The files of this Commit. # noqa: E501 + :type: list[CommitAffectedFiles] + """ + + self._files = files + + @property + def html_url(self): + """Gets the html_url of this Commit. # noqa: E501 + + + :return: The html_url of this Commit. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Commit. + + + :param html_url: The html_url of this Commit. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def parents(self): + """Gets the parents of this Commit. # noqa: E501 + + + :return: The parents of this Commit. # noqa: E501 + :rtype: list[CommitMeta] + """ + return self._parents + + @parents.setter + def parents(self, parents): + """Sets the parents of this Commit. + + + :param parents: The parents of this Commit. # noqa: E501 + :type: list[CommitMeta] + """ + + self._parents = parents + + @property + def sha(self): + """Gets the sha of this Commit. # noqa: E501 + + + :return: The sha of this Commit. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this Commit. + + + :param sha: The sha of this Commit. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def stats(self): + """Gets the stats of this Commit. # noqa: E501 + + + :return: The stats of this Commit. # noqa: E501 + :rtype: CommitStats + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this Commit. + + + :param stats: The stats of this Commit. # noqa: E501 + :type: CommitStats + """ + + self._stats = stats + + @property + def url(self): + """Gets the url of this Commit. # noqa: E501 + + + :return: The url of this Commit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Commit. + + + :param url: The url of this Commit. # 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(Commit, 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, Commit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Commit): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit_affected_files.py b/gitea/models/commit_affected_files.py new file mode 100644 index 0000000..3fb704f --- /dev/null +++ b/gitea/models/commit_affected_files.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CommitAffectedFiles(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 = { + 'filename': 'str', + 'status': 'str' + } + + attribute_map = { + 'filename': 'filename', + 'status': 'status' + } + + def __init__(self, filename=None, status=None, _configuration=None): # noqa: E501 + """CommitAffectedFiles - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._filename = None + self._status = None + self.discriminator = None + + if filename is not None: + self.filename = filename + if status is not None: + self.status = status + + @property + def filename(self): + """Gets the filename of this CommitAffectedFiles. # noqa: E501 + + + :return: The filename of this CommitAffectedFiles. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this CommitAffectedFiles. + + + :param filename: The filename of this CommitAffectedFiles. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def status(self): + """Gets the status of this CommitAffectedFiles. # noqa: E501 + + + :return: The status of this CommitAffectedFiles. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CommitAffectedFiles. + + + :param status: The status of this CommitAffectedFiles. # noqa: E501 + :type: str + """ + + self._status = status + + 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(CommitAffectedFiles, 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, CommitAffectedFiles): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitAffectedFiles): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit_date_options.py b/gitea/models/commit_date_options.py new file mode 100644 index 0000000..53f87c2 --- /dev/null +++ b/gitea/models/commit_date_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CommitDateOptions(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': 'datetime', + 'committer': 'datetime' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer' + } + + def __init__(self, author=None, committer=None, _configuration=None): # noqa: E501 + """CommitDateOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._committer = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + + @property + def author(self): + """Gets the author of this CommitDateOptions. # noqa: E501 + + + :return: The author of this CommitDateOptions. # noqa: E501 + :rtype: datetime + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this CommitDateOptions. + + + :param author: The author of this CommitDateOptions. # noqa: E501 + :type: datetime + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this CommitDateOptions. # noqa: E501 + + + :return: The committer of this CommitDateOptions. # noqa: E501 + :rtype: datetime + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this CommitDateOptions. + + + :param committer: The committer of this CommitDateOptions. # noqa: E501 + :type: datetime + """ + + self._committer = committer + + 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(CommitDateOptions, 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, CommitDateOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitDateOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit_meta.py b/gitea/models/commit_meta.py new file mode 100644 index 0000000..f625a59 --- /dev/null +++ b/gitea/models/commit_meta.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CommitMeta(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', + 'sha': 'str', + 'url': 'str' + } + + attribute_map = { + 'created': 'created', + 'sha': 'sha', + 'url': 'url' + } + + def __init__(self, created=None, sha=None, url=None, _configuration=None): # noqa: E501 + """CommitMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._sha = None + self._url = None + self.discriminator = None + + if created is not None: + self.created = created + if sha is not None: + self.sha = sha + if url is not None: + self.url = url + + @property + def created(self): + """Gets the created of this CommitMeta. # noqa: E501 + + + :return: The created of this CommitMeta. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this CommitMeta. + + + :param created: The created of this CommitMeta. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def sha(self): + """Gets the sha of this CommitMeta. # noqa: E501 + + + :return: The sha of this CommitMeta. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this CommitMeta. + + + :param sha: The sha of this CommitMeta. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def url(self): + """Gets the url of this CommitMeta. # noqa: E501 + + + :return: The url of this CommitMeta. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CommitMeta. + + + :param url: The url of this CommitMeta. # 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(CommitMeta, 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, CommitMeta): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit_stats.py b/gitea/models/commit_stats.py new file mode 100644 index 0000000..041d49e --- /dev/null +++ b/gitea/models/commit_stats.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CommitStats(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 = { + 'additions': 'int', + 'deletions': 'int', + 'total': 'int' + } + + attribute_map = { + 'additions': 'additions', + 'deletions': 'deletions', + 'total': 'total' + } + + def __init__(self, additions=None, deletions=None, total=None, _configuration=None): # noqa: E501 + """CommitStats - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._additions = None + self._deletions = None + self._total = None + self.discriminator = None + + if additions is not None: + self.additions = additions + if deletions is not None: + self.deletions = deletions + if total is not None: + self.total = total + + @property + def additions(self): + """Gets the additions of this CommitStats. # noqa: E501 + + + :return: The additions of this CommitStats. # noqa: E501 + :rtype: int + """ + return self._additions + + @additions.setter + def additions(self, additions): + """Sets the additions of this CommitStats. + + + :param additions: The additions of this CommitStats. # noqa: E501 + :type: int + """ + + self._additions = additions + + @property + def deletions(self): + """Gets the deletions of this CommitStats. # noqa: E501 + + + :return: The deletions of this CommitStats. # noqa: E501 + :rtype: int + """ + return self._deletions + + @deletions.setter + def deletions(self, deletions): + """Sets the deletions of this CommitStats. + + + :param deletions: The deletions of this CommitStats. # noqa: E501 + :type: int + """ + + self._deletions = deletions + + @property + def total(self): + """Gets the total of this CommitStats. # noqa: E501 + + + :return: The total of this CommitStats. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this CommitStats. + + + :param total: The total of this CommitStats. # noqa: E501 + :type: int + """ + + self._total = total + + 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(CommitStats, 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, CommitStats): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitStats): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit_status.py b/gitea/models/commit_status.py new file mode 100644 index 0000000..2676d57 --- /dev/null +++ b/gitea/models/commit_status.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CommitStatus(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': 'CommitStatusState', + '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, _configuration=None): # noqa: E501 + """CommitStatus - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 CommitStatus. # noqa: E501 + + + :return: The context of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this CommitStatus. + + + :param context: The context of this CommitStatus. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def created_at(self): + """Gets the created_at of this CommitStatus. # noqa: E501 + + + :return: The created_at of this CommitStatus. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this CommitStatus. + + + :param created_at: The created_at of this CommitStatus. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def creator(self): + """Gets the creator of this CommitStatus. # noqa: E501 + + + :return: The creator of this CommitStatus. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this CommitStatus. + + + :param creator: The creator of this CommitStatus. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def description(self): + """Gets the description of this CommitStatus. # noqa: E501 + + + :return: The description of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CommitStatus. + + + :param description: The description of this CommitStatus. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this CommitStatus. # noqa: E501 + + + :return: The id of this CommitStatus. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CommitStatus. + + + :param id: The id of this CommitStatus. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def status(self): + """Gets the status of this CommitStatus. # noqa: E501 + + + :return: The status of this CommitStatus. # noqa: E501 + :rtype: CommitStatusState + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CommitStatus. + + + :param status: The status of this CommitStatus. # noqa: E501 + :type: CommitStatusState + """ + + self._status = status + + @property + def target_url(self): + """Gets the target_url of this CommitStatus. # noqa: E501 + + + :return: The target_url of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._target_url + + @target_url.setter + def target_url(self, target_url): + """Sets the target_url of this CommitStatus. + + + :param target_url: The target_url of this CommitStatus. # noqa: E501 + :type: str + """ + + self._target_url = target_url + + @property + def updated_at(self): + """Gets the updated_at of this CommitStatus. # noqa: E501 + + + :return: The updated_at of this CommitStatus. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this CommitStatus. + + + :param updated_at: The updated_at of this CommitStatus. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this CommitStatus. # noqa: E501 + + + :return: The url of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CommitStatus. + + + :param url: The url of this CommitStatus. # 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(CommitStatus, 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, CommitStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit_status_state.py b/gitea/models/commit_status_state.py new file mode 100644 index 0000000..7fde3eb --- /dev/null +++ b/gitea/models/commit_status_state.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CommitStatusState(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, _configuration=None): # noqa: E501 + """CommitStatusState - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(CommitStatusState, 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, CommitStatusState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitStatusState): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/commit_user.py b/gitea/models/commit_user.py new file mode 100644 index 0000000..9351d62 --- /dev/null +++ b/gitea/models/commit_user.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CommitUser(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 = { + '_date': 'str', + 'email': 'str', + 'name': 'str' + } + + attribute_map = { + '_date': 'date', + 'email': 'email', + 'name': 'name' + } + + def __init__(self, _date=None, email=None, name=None, _configuration=None): # noqa: E501 + """CommitUser - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self.__date = None + self._email = None + self._name = None + self.discriminator = None + + if _date is not None: + self._date = _date + if email is not None: + self.email = email + if name is not None: + self.name = name + + @property + def _date(self): + """Gets the _date of this CommitUser. # noqa: E501 + + + :return: The _date of this CommitUser. # noqa: E501 + :rtype: str + """ + return self.__date + + @_date.setter + def _date(self, _date): + """Sets the _date of this CommitUser. + + + :param _date: The _date of this CommitUser. # noqa: E501 + :type: str + """ + + self.__date = _date + + @property + def email(self): + """Gets the email of this CommitUser. # noqa: E501 + + + :return: The email of this CommitUser. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CommitUser. + + + :param email: The email of this CommitUser. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this CommitUser. # noqa: E501 + + + :return: The name of this CommitUser. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CommitUser. + + + :param name: The name of this CommitUser. # 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(CommitUser, 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, CommitUser): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/compare.py b/gitea/models/compare.py new file mode 100644 index 0000000..2d9c610 --- /dev/null +++ b/gitea/models/compare.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Compare(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 = { + 'commits': 'list[Commit]', + 'total_commits': 'int' + } + + attribute_map = { + 'commits': 'commits', + 'total_commits': 'total_commits' + } + + def __init__(self, commits=None, total_commits=None, _configuration=None): # noqa: E501 + """Compare - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commits = None + self._total_commits = None + self.discriminator = None + + if commits is not None: + self.commits = commits + if total_commits is not None: + self.total_commits = total_commits + + @property + def commits(self): + """Gets the commits of this Compare. # noqa: E501 + + + :return: The commits of this Compare. # noqa: E501 + :rtype: list[Commit] + """ + return self._commits + + @commits.setter + def commits(self, commits): + """Sets the commits of this Compare. + + + :param commits: The commits of this Compare. # noqa: E501 + :type: list[Commit] + """ + + self._commits = commits + + @property + def total_commits(self): + """Gets the total_commits of this Compare. # noqa: E501 + + + :return: The total_commits of this Compare. # noqa: E501 + :rtype: int + """ + return self._total_commits + + @total_commits.setter + def total_commits(self, total_commits): + """Sets the total_commits of this Compare. + + + :param total_commits: The total_commits of this Compare. # noqa: E501 + :type: int + """ + + self._total_commits = total_commits + + 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(Compare, 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, Compare): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Compare): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/contents_response.py b/gitea/models/contents_response.py new file mode 100644 index 0000000..7c16690 --- /dev/null +++ b/gitea/models/contents_response.py @@ -0,0 +1,497 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ContentsResponse(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 = { + 'links': 'FileLinksResponse', + 'content': 'str', + 'download_url': 'str', + 'encoding': 'str', + 'git_url': 'str', + 'html_url': 'str', + 'last_commit_sha': 'str', + 'name': 'str', + 'path': 'str', + 'sha': 'str', + 'size': 'int', + 'submodule_git_url': 'str', + 'target': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'links': '_links', + 'content': 'content', + 'download_url': 'download_url', + 'encoding': 'encoding', + 'git_url': 'git_url', + 'html_url': 'html_url', + 'last_commit_sha': 'last_commit_sha', + 'name': 'name', + 'path': 'path', + 'sha': 'sha', + 'size': 'size', + 'submodule_git_url': 'submodule_git_url', + 'target': 'target', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, links=None, content=None, download_url=None, encoding=None, git_url=None, html_url=None, last_commit_sha=None, name=None, path=None, sha=None, size=None, submodule_git_url=None, target=None, type=None, url=None, _configuration=None): # noqa: E501 + """ContentsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._links = None + self._content = None + self._download_url = None + self._encoding = None + self._git_url = None + self._html_url = None + self._last_commit_sha = None + self._name = None + self._path = None + self._sha = None + self._size = None + self._submodule_git_url = None + self._target = None + self._type = None + self._url = None + self.discriminator = None + + if links is not None: + self.links = links + if content is not None: + self.content = content + if download_url is not None: + self.download_url = download_url + if encoding is not None: + self.encoding = encoding + if git_url is not None: + self.git_url = git_url + if html_url is not None: + self.html_url = html_url + if last_commit_sha is not None: + self.last_commit_sha = last_commit_sha + if name is not None: + self.name = name + 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 submodule_git_url is not None: + self.submodule_git_url = submodule_git_url + if target is not None: + self.target = target + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def links(self): + """Gets the links of this ContentsResponse. # noqa: E501 + + + :return: The links of this ContentsResponse. # noqa: E501 + :rtype: FileLinksResponse + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this ContentsResponse. + + + :param links: The links of this ContentsResponse. # noqa: E501 + :type: FileLinksResponse + """ + + self._links = links + + @property + def content(self): + """Gets the content of this ContentsResponse. # noqa: E501 + + `content` is populated when `type` is `file`, otherwise null # noqa: E501 + + :return: The content of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ContentsResponse. + + `content` is populated when `type` is `file`, otherwise null # noqa: E501 + + :param content: The content of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def download_url(self): + """Gets the download_url of this ContentsResponse. # noqa: E501 + + + :return: The download_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._download_url + + @download_url.setter + def download_url(self, download_url): + """Sets the download_url of this ContentsResponse. + + + :param download_url: The download_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._download_url = download_url + + @property + def encoding(self): + """Gets the encoding of this ContentsResponse. # noqa: E501 + + `encoding` is populated when `type` is `file`, otherwise null # noqa: E501 + + :return: The encoding of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._encoding + + @encoding.setter + def encoding(self, encoding): + """Sets the encoding of this ContentsResponse. + + `encoding` is populated when `type` is `file`, otherwise null # noqa: E501 + + :param encoding: The encoding of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._encoding = encoding + + @property + def git_url(self): + """Gets the git_url of this ContentsResponse. # noqa: E501 + + + :return: The git_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this ContentsResponse. + + + :param git_url: The git_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._git_url = git_url + + @property + def html_url(self): + """Gets the html_url of this ContentsResponse. # noqa: E501 + + + :return: The html_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ContentsResponse. + + + :param html_url: The html_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def last_commit_sha(self): + """Gets the last_commit_sha of this ContentsResponse. # noqa: E501 + + + :return: The last_commit_sha of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._last_commit_sha + + @last_commit_sha.setter + def last_commit_sha(self, last_commit_sha): + """Sets the last_commit_sha of this ContentsResponse. + + + :param last_commit_sha: The last_commit_sha of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._last_commit_sha = last_commit_sha + + @property + def name(self): + """Gets the name of this ContentsResponse. # noqa: E501 + + + :return: The name of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ContentsResponse. + + + :param name: The name of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def path(self): + """Gets the path of this ContentsResponse. # noqa: E501 + + + :return: The path of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ContentsResponse. + + + :param path: The path of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def sha(self): + """Gets the sha of this ContentsResponse. # noqa: E501 + + + :return: The sha of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this ContentsResponse. + + + :param sha: The sha of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this ContentsResponse. # noqa: E501 + + + :return: The size of this ContentsResponse. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ContentsResponse. + + + :param size: The size of this ContentsResponse. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def submodule_git_url(self): + """Gets the submodule_git_url of this ContentsResponse. # noqa: E501 + + `submodule_git_url` is populated when `type` is `submodule`, otherwise null # noqa: E501 + + :return: The submodule_git_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._submodule_git_url + + @submodule_git_url.setter + def submodule_git_url(self, submodule_git_url): + """Sets the submodule_git_url of this ContentsResponse. + + `submodule_git_url` is populated when `type` is `submodule`, otherwise null # noqa: E501 + + :param submodule_git_url: The submodule_git_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._submodule_git_url = submodule_git_url + + @property + def target(self): + """Gets the target of this ContentsResponse. # noqa: E501 + + `target` is populated when `type` is `symlink`, otherwise null # noqa: E501 + + :return: The target of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this ContentsResponse. + + `target` is populated when `type` is `symlink`, otherwise null # noqa: E501 + + :param target: The target of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._target = target + + @property + def type(self): + """Gets the type of this ContentsResponse. # noqa: E501 + + `type` will be `file`, `dir`, `symlink`, or `submodule` # noqa: E501 + + :return: The type of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ContentsResponse. + + `type` will be `file`, `dir`, `symlink`, or `submodule` # noqa: E501 + + :param type: The type of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this ContentsResponse. # noqa: E501 + + + :return: The url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ContentsResponse. + + + :param url: The url of this ContentsResponse. # 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(ContentsResponse, 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, ContentsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContentsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_access_token_option.py b/gitea/models/create_access_token_option.py new file mode 100644 index 0000000..463b2bb --- /dev/null +++ b/gitea/models/create_access_token_option.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateAccessTokenOption(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', + 'scopes': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'scopes': 'scopes' + } + + def __init__(self, name=None, scopes=None, _configuration=None): # noqa: E501 + """CreateAccessTokenOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._scopes = None + self.discriminator = None + + self.name = name + if scopes is not None: + self.scopes = scopes + + @property + def name(self): + """Gets the name of this CreateAccessTokenOption. # noqa: E501 + + + :return: The name of this CreateAccessTokenOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateAccessTokenOption. + + + :param name: The name of this CreateAccessTokenOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def scopes(self): + """Gets the scopes of this CreateAccessTokenOption. # noqa: E501 + + + :return: The scopes of this CreateAccessTokenOption. # noqa: E501 + :rtype: list[str] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """Sets the scopes of this CreateAccessTokenOption. + + + :param scopes: The scopes of this CreateAccessTokenOption. # noqa: E501 + :type: list[str] + """ + + self._scopes = scopes + + 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(CreateAccessTokenOption, 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, CreateAccessTokenOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateAccessTokenOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_branch_protection_option.py b/gitea/models/create_branch_protection_option.py new file mode 100644 index 0000000..7daa51a --- /dev/null +++ b/gitea/models/create_branch_protection_option.py @@ -0,0 +1,905 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateBranchProtectionOption(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 = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_admin_merge_override': 'bool', + 'block_on_official_review_requests': 'bool', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'branch_name': 'str', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_force_push': 'bool', + 'enable_force_push_allowlist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'force_push_allowlist_deploy_keys': 'bool', + 'force_push_allowlist_teams': 'list[str]', + 'force_push_allowlist_usernames': 'list[str]', + 'ignore_stale_approvals': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'priority': 'int', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'rule_name': 'str', + 'status_check_contexts': 'list[str]', + 'unprotected_file_patterns': 'str' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_admin_merge_override': 'block_admin_merge_override', + 'block_on_official_review_requests': 'block_on_official_review_requests', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'branch_name': 'branch_name', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_force_push': 'enable_force_push', + 'enable_force_push_allowlist': 'enable_force_push_allowlist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'force_push_allowlist_deploy_keys': 'force_push_allowlist_deploy_keys', + 'force_push_allowlist_teams': 'force_push_allowlist_teams', + 'force_push_allowlist_usernames': 'force_push_allowlist_usernames', + 'ignore_stale_approvals': 'ignore_stale_approvals', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'priority': 'priority', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'rule_name': 'rule_name', + 'status_check_contexts': 'status_check_contexts', + 'unprotected_file_patterns': 'unprotected_file_patterns' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_admin_merge_override=None, block_on_official_review_requests=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, branch_name=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_force_push=None, enable_force_push_allowlist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, force_push_allowlist_deploy_keys=None, force_push_allowlist_teams=None, force_push_allowlist_usernames=None, ignore_stale_approvals=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, priority=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, rule_name=None, status_check_contexts=None, unprotected_file_patterns=None, _configuration=None): # noqa: E501 + """CreateBranchProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_admin_merge_override = None + self._block_on_official_review_requests = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._branch_name = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_force_push = None + self._enable_force_push_allowlist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._force_push_allowlist_deploy_keys = None + self._force_push_allowlist_teams = None + self._force_push_allowlist_usernames = None + self._ignore_stale_approvals = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._priority = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._rule_name = None + self._status_check_contexts = None + self._unprotected_file_patterns = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_admin_merge_override is not None: + self.block_admin_merge_override = block_admin_merge_override + if block_on_official_review_requests is not None: + self.block_on_official_review_requests = block_on_official_review_requests + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if branch_name is not None: + self.branch_name = branch_name + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_force_push is not None: + self.enable_force_push = enable_force_push + if enable_force_push_allowlist is not None: + self.enable_force_push_allowlist = enable_force_push_allowlist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if force_push_allowlist_deploy_keys is not None: + self.force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + if force_push_allowlist_teams is not None: + self.force_push_allowlist_teams = force_push_allowlist_teams + if force_push_allowlist_usernames is not None: + self.force_push_allowlist_usernames = force_push_allowlist_usernames + if ignore_stale_approvals is not None: + self.ignore_stale_approvals = ignore_stale_approvals + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if priority is not None: + self.priority = priority + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if rule_name is not None: + self.rule_name = rule_name + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if unprotected_file_patterns is not None: + self.unprotected_file_patterns = unprotected_file_patterns + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this CreateBranchProtectionOption. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this CreateBranchProtectionOption. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_admin_merge_override(self): + """Gets the block_admin_merge_override of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_admin_merge_override of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_admin_merge_override + + @block_admin_merge_override.setter + def block_admin_merge_override(self, block_admin_merge_override): + """Sets the block_admin_merge_override of this CreateBranchProtectionOption. + + + :param block_admin_merge_override: The block_admin_merge_override of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_admin_merge_override = block_admin_merge_override + + @property + def block_on_official_review_requests(self): + """Gets the block_on_official_review_requests of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_official_review_requests of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_official_review_requests + + @block_on_official_review_requests.setter + def block_on_official_review_requests(self, block_on_official_review_requests): + """Sets the block_on_official_review_requests of this CreateBranchProtectionOption. + + + :param block_on_official_review_requests: The block_on_official_review_requests of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_official_review_requests = block_on_official_review_requests + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this CreateBranchProtectionOption. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this CreateBranchProtectionOption. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def branch_name(self): + """Gets the branch_name of this CreateBranchProtectionOption. # noqa: E501 + + Deprecated: true # noqa: E501 + + :return: The branch_name of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._branch_name + + @branch_name.setter + def branch_name(self, branch_name): + """Sets the branch_name of this CreateBranchProtectionOption. + + Deprecated: true # noqa: E501 + + :param branch_name: The branch_name of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._branch_name = branch_name + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this CreateBranchProtectionOption. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this CreateBranchProtectionOption. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_force_push(self): + """Gets the enable_force_push of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push + + @enable_force_push.setter + def enable_force_push(self, enable_force_push): + """Sets the enable_force_push of this CreateBranchProtectionOption. + + + :param enable_force_push: The enable_force_push of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push = enable_force_push + + @property + def enable_force_push_allowlist(self): + """Gets the enable_force_push_allowlist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push_allowlist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push_allowlist + + @enable_force_push_allowlist.setter + def enable_force_push_allowlist(self, enable_force_push_allowlist): + """Sets the enable_force_push_allowlist of this CreateBranchProtectionOption. + + + :param enable_force_push_allowlist: The enable_force_push_allowlist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push_allowlist = enable_force_push_allowlist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this CreateBranchProtectionOption. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_push of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this CreateBranchProtectionOption. + + + :param enable_push: The enable_push of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this CreateBranchProtectionOption. + + + :param enable_push_whitelist: The enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this CreateBranchProtectionOption. + + + :param enable_status_check: The enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def force_push_allowlist_deploy_keys(self): + """Gets the force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._force_push_allowlist_deploy_keys + + @force_push_allowlist_deploy_keys.setter + def force_push_allowlist_deploy_keys(self, force_push_allowlist_deploy_keys): + """Sets the force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. + + + :param force_push_allowlist_deploy_keys: The force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + + @property + def force_push_allowlist_teams(self): + """Gets the force_push_allowlist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_teams + + @force_push_allowlist_teams.setter + def force_push_allowlist_teams(self, force_push_allowlist_teams): + """Sets the force_push_allowlist_teams of this CreateBranchProtectionOption. + + + :param force_push_allowlist_teams: The force_push_allowlist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_teams = force_push_allowlist_teams + + @property + def force_push_allowlist_usernames(self): + """Gets the force_push_allowlist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_usernames + + @force_push_allowlist_usernames.setter + def force_push_allowlist_usernames(self, force_push_allowlist_usernames): + """Sets the force_push_allowlist_usernames of this CreateBranchProtectionOption. + + + :param force_push_allowlist_usernames: The force_push_allowlist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_usernames = force_push_allowlist_usernames + + @property + def ignore_stale_approvals(self): + """Gets the ignore_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The ignore_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._ignore_stale_approvals + + @ignore_stale_approvals.setter + def ignore_stale_approvals(self, ignore_stale_approvals): + """Sets the ignore_stale_approvals of this CreateBranchProtectionOption. + + + :param ignore_stale_approvals: The ignore_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._ignore_stale_approvals = ignore_stale_approvals + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this CreateBranchProtectionOption. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this CreateBranchProtectionOption. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def priority(self): + """Gets the priority of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The priority of this CreateBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this CreateBranchProtectionOption. + + + :param priority: The priority of this CreateBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._priority = priority + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this CreateBranchProtectionOption. + + + :param protected_file_patterns: The protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this CreateBranchProtectionOption. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this CreateBranchProtectionOption. + + + :param push_whitelist_teams: The push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this CreateBranchProtectionOption. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this CreateBranchProtectionOption. + + + :param require_signed_commits: The require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The required_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this CreateBranchProtectionOption. + + + :param required_approvals: The required_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def rule_name(self): + """Gets the rule_name of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The rule_name of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this CreateBranchProtectionOption. + + + :param rule_name: The rule_name of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._rule_name = rule_name + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this CreateBranchProtectionOption. + + + :param status_check_contexts: The status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def unprotected_file_patterns(self): + """Gets the unprotected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The unprotected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._unprotected_file_patterns + + @unprotected_file_patterns.setter + def unprotected_file_patterns(self, unprotected_file_patterns): + """Sets the unprotected_file_patterns of this CreateBranchProtectionOption. + + + :param unprotected_file_patterns: The unprotected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._unprotected_file_patterns = unprotected_file_patterns + + 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(CreateBranchProtectionOption, 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, CreateBranchProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateBranchProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_branch_repo_option.py b/gitea/models/create_branch_repo_option.py new file mode 100644 index 0000000..68df136 --- /dev/null +++ b/gitea/models/create_branch_repo_option.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateBranchRepoOption(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 = { + 'new_branch_name': 'str', + 'old_branch_name': 'str', + 'old_ref_name': 'str' + } + + attribute_map = { + 'new_branch_name': 'new_branch_name', + 'old_branch_name': 'old_branch_name', + 'old_ref_name': 'old_ref_name' + } + + def __init__(self, new_branch_name=None, old_branch_name=None, old_ref_name=None, _configuration=None): # noqa: E501 + """CreateBranchRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new_branch_name = None + self._old_branch_name = None + self._old_ref_name = None + self.discriminator = None + + self.new_branch_name = new_branch_name + if old_branch_name is not None: + self.old_branch_name = old_branch_name + if old_ref_name is not None: + self.old_ref_name = old_ref_name + + @property + def new_branch_name(self): + """Gets the new_branch_name of this CreateBranchRepoOption. # noqa: E501 + + Name of the branch to create # noqa: E501 + + :return: The new_branch_name of this CreateBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._new_branch_name + + @new_branch_name.setter + def new_branch_name(self, new_branch_name): + """Sets the new_branch_name of this CreateBranchRepoOption. + + Name of the branch to create # noqa: E501 + + :param new_branch_name: The new_branch_name of this CreateBranchRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and new_branch_name is None: + raise ValueError("Invalid value for `new_branch_name`, must not be `None`") # noqa: E501 + + self._new_branch_name = new_branch_name + + @property + def old_branch_name(self): + """Gets the old_branch_name of this CreateBranchRepoOption. # noqa: E501 + + Deprecated: true Name of the old branch to create from # noqa: E501 + + :return: The old_branch_name of this CreateBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._old_branch_name + + @old_branch_name.setter + def old_branch_name(self, old_branch_name): + """Sets the old_branch_name of this CreateBranchRepoOption. + + Deprecated: true Name of the old branch to create from # noqa: E501 + + :param old_branch_name: The old_branch_name of this CreateBranchRepoOption. # noqa: E501 + :type: str + """ + + self._old_branch_name = old_branch_name + + @property + def old_ref_name(self): + """Gets the old_ref_name of this CreateBranchRepoOption. # noqa: E501 + + Name of the old branch/tag/commit to create from # noqa: E501 + + :return: The old_ref_name of this CreateBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._old_ref_name + + @old_ref_name.setter + def old_ref_name(self, old_ref_name): + """Sets the old_ref_name of this CreateBranchRepoOption. + + Name of the old branch/tag/commit to create from # noqa: E501 + + :param old_ref_name: The old_ref_name of this CreateBranchRepoOption. # noqa: E501 + :type: str + """ + + self._old_ref_name = old_ref_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(CreateBranchRepoOption, 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, CreateBranchRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateBranchRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_email_option.py b/gitea/models/create_email_option.py new file mode 100644 index 0000000..6f5f6d9 --- /dev/null +++ b/gitea/models/create_email_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """CreateEmailOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateEmailOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_file_options.py b/gitea/models/create_file_options.py new file mode 100644 index 0000000..a4be2b8 --- /dev/null +++ b/gitea/models/create_file_options.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateFileOptions(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': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'content': 'str', + 'dates': 'CommitDateOptions', + 'message': 'str', + 'new_branch': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'content': 'content', + 'dates': 'dates', + 'message': 'message', + 'new_branch': 'new_branch', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, content=None, dates=None, message=None, new_branch=None, signoff=None, _configuration=None): # noqa: E501 + """CreateFileOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._content = None + self._dates = None + self._message = None + self._new_branch = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + self.content = content + if dates is not None: + self.dates = dates + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this CreateFileOptions. # noqa: E501 + + + :return: The author of this CreateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this CreateFileOptions. + + + :param author: The author of this CreateFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this CreateFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this CreateFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this CreateFileOptions. # noqa: E501 + + + :return: The committer of this CreateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this CreateFileOptions. + + + :param committer: The committer of this CreateFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def content(self): + """Gets the content of this CreateFileOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this CreateFileOptions. + + content must be base64 encoded # noqa: E501 + + :param content: The content of this CreateFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and content is None: + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def dates(self): + """Gets the dates of this CreateFileOptions. # noqa: E501 + + + :return: The dates of this CreateFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this CreateFileOptions. + + + :param dates: The dates of this CreateFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def message(self): + """Gets the message of this CreateFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this CreateFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this CreateFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def signoff(self): + """Gets the signoff of this CreateFileOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this CreateFileOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this CreateFileOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this CreateFileOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(CreateFileOptions, 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, CreateFileOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateFileOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_fork_option.py b/gitea/models/create_fork_option.py new file mode 100644 index 0000000..bf2ba41 --- /dev/null +++ b/gitea/models/create_fork_option.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'name': 'str', + 'organization': 'str' + } + + attribute_map = { + 'name': 'name', + 'organization': 'organization' + } + + def __init__(self, name=None, organization=None, _configuration=None): # noqa: E501 + """CreateForkOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._organization = None + self.discriminator = None + + if name is not None: + self.name = name + if organization is not None: + self.organization = organization + + @property + def name(self): + """Gets the name of this CreateForkOption. # noqa: E501 + + name of the forked repository # noqa: E501 + + :return: The name of this CreateForkOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateForkOption. + + name of the forked repository # noqa: E501 + + :param name: The name of this CreateForkOption. # noqa: E501 + :type: str + """ + + self._name = name + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateForkOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_gpg_key_option.py b/gitea/models/create_gpg_key_option.py new file mode 100644 index 0000000..80b460d --- /dev/null +++ b/gitea/models/create_gpg_key_option.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'armored_signature': 'str' + } + + attribute_map = { + 'armored_public_key': 'armored_public_key', + 'armored_signature': 'armored_signature' + } + + def __init__(self, armored_public_key=None, armored_signature=None, _configuration=None): # noqa: E501 + """CreateGPGKeyOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._armored_public_key = None + self._armored_signature = None + self.discriminator = None + + self.armored_public_key = armored_public_key + if armored_signature is not None: + self.armored_signature = armored_signature + + @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 self._configuration.client_side_validation and 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 + + @property + def armored_signature(self): + """Gets the armored_signature of this CreateGPGKeyOption. # noqa: E501 + + + :return: The armored_signature of this CreateGPGKeyOption. # noqa: E501 + :rtype: str + """ + return self._armored_signature + + @armored_signature.setter + def armored_signature(self, armored_signature): + """Sets the armored_signature of this CreateGPGKeyOption. + + + :param armored_signature: The armored_signature of this CreateGPGKeyOption. # noqa: E501 + :type: str + """ + + self._armored_signature = armored_signature + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateGPGKeyOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_hook_option.py b/gitea/models/create_hook_option.py new file mode 100644 index 0000000..81da654 --- /dev/null +++ b/gitea/models/create_hook_option.py @@ -0,0 +1,262 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'authorization_header': 'str', + 'branch_filter': 'str', + 'config': 'CreateHookOptionConfig', + 'events': 'list[str]', + 'type': 'str' + } + + attribute_map = { + 'active': 'active', + 'authorization_header': 'authorization_header', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'events': 'events', + 'type': 'type' + } + + def __init__(self, active=False, authorization_header=None, branch_filter=None, config=None, events=None, type=None, _configuration=None): # noqa: E501 + """CreateHookOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._authorization_header = None + self._branch_filter = None + self._config = None + self._events = None + self._type = None + self.discriminator = None + + if active is not None: + self.active = active + if authorization_header is not None: + self.authorization_header = authorization_header + if branch_filter is not None: + self.branch_filter = branch_filter + 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 authorization_header(self): + """Gets the authorization_header of this CreateHookOption. # noqa: E501 + + + :return: The authorization_header of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._authorization_header + + @authorization_header.setter + def authorization_header(self, authorization_header): + """Sets the authorization_header of this CreateHookOption. + + + :param authorization_header: The authorization_header of this CreateHookOption. # noqa: E501 + :type: str + """ + + self._authorization_header = authorization_header + + @property + def branch_filter(self): + """Gets the branch_filter of this CreateHookOption. # noqa: E501 + + + :return: The branch_filter of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this CreateHookOption. + + + :param branch_filter: The branch_filter of this CreateHookOption. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @property + def config(self): + """Gets the config of this CreateHookOption. # noqa: E501 + + + :return: The config of this CreateHookOption. # noqa: E501 + :rtype: CreateHookOptionConfig + """ + 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: CreateHookOptionConfig + """ + if self._configuration.client_side_validation and 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 self._configuration.client_side_validation and type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["dingtalk", "discord", "gitea", "gogs", "msteams", "slack", "telegram", "feishu", "wechatwork", "packagist"] # noqa: E501 + if (self._configuration.client_side_validation and + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateHookOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_hook_option_config.py b/gitea/models/create_hook_option_config.py new file mode 100644 index 0000000..32b599e --- /dev/null +++ b/gitea/models/create_hook_option_config.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateHookOptionConfig(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, _configuration=None): # noqa: E501 + """CreateHookOptionConfig - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(CreateHookOptionConfig, 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, CreateHookOptionConfig): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateHookOptionConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_issue_comment_option.py b/gitea/models/create_issue_comment_option.py new file mode 100644 index 0000000..443b309 --- /dev/null +++ b/gitea/models/create_issue_comment_option.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """CreateIssueCommentOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 self._configuration.client_side_validation and 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateIssueCommentOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_issue_option.py b/gitea/models/create_issue_option.py new file mode 100644 index 0000000..984c5ea --- /dev/null +++ b/gitea/models/create_issue_option.py @@ -0,0 +1,338 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'ref': 'str', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed': 'closed', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'ref': 'ref', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, body=None, closed=None, due_date=None, labels=None, milestone=None, ref=None, title=None, _configuration=None): # noqa: E501 + """CreateIssueOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assignee = None + self._assignees = None + self._body = None + self._closed = None + self._due_date = None + self._labels = None + self._milestone = None + self._ref = 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 + if ref is not None: + self.ref = ref + self.title = title + + @property + def assignee(self): + """Gets the assignee of this CreateIssueOption. # noqa: E501 + + deprecated # 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. + + deprecated # 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 ref(self): + """Gets the ref of this CreateIssueOption. # noqa: E501 + + + :return: The ref of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this CreateIssueOption. + + + :param ref: The ref of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._ref = ref + + @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 self._configuration.client_side_validation and 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateIssueOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_key_option.py b/gitea/models/create_key_option.py new file mode 100644 index 0000000..9cc3674 --- /dev/null +++ b/gitea/models/create_key_option.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """CreateKeyOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 self._configuration.client_side_validation and 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 self._configuration.client_side_validation and 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateKeyOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_label_option.py b/gitea/models/create_label_option.py new file mode 100644 index 0000000..cf83de8 --- /dev/null +++ b/gitea/models/create_label_option.py @@ -0,0 +1,229 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'description': 'str', + 'exclusive': 'bool', + 'is_archived': 'bool', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'is_archived': 'is_archived', + 'name': 'name' + } + + def __init__(self, color=None, description=None, exclusive=None, is_archived=None, name=None, _configuration=None): # noqa: E501 + """CreateLabelOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._is_archived = None + self._name = None + self.discriminator = None + + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if is_archived is not None: + self.is_archived = is_archived + 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 self._configuration.client_side_validation and color is None: + raise ValueError("Invalid value for `color`, must not be `None`") # noqa: E501 + + self._color = color + + @property + def description(self): + """Gets the description of this CreateLabelOption. # noqa: E501 + + + :return: The description of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateLabelOption. + + + :param description: The description of this CreateLabelOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this CreateLabelOption. # noqa: E501 + + + :return: The exclusive of this CreateLabelOption. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this CreateLabelOption. + + + :param exclusive: The exclusive of this CreateLabelOption. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @property + def is_archived(self): + """Gets the is_archived of this CreateLabelOption. # noqa: E501 + + + :return: The is_archived of this CreateLabelOption. # noqa: E501 + :rtype: bool + """ + return self._is_archived + + @is_archived.setter + def is_archived(self, is_archived): + """Sets the is_archived of this CreateLabelOption. + + + :param is_archived: The is_archived of this CreateLabelOption. # noqa: E501 + :type: bool + """ + + self._is_archived = is_archived + + @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 self._configuration.client_side_validation and 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateLabelOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_milestone_option.py b/gitea/models/create_milestone_option.py new file mode 100644 index 0000000..2c1db62 --- /dev/null +++ b/gitea/models/create_milestone_option.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + '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, _configuration=None): # noqa: E501 + """CreateMilestoneOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 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 state(self): + """Gets the state of this CreateMilestoneOption. # noqa: E501 + + + :return: The state of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CreateMilestoneOption. + + + :param state: The state of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + allowed_values = ["open", "closed"] # noqa: E501 + if (self._configuration.client_side_validation and + state not in allowed_values): + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) + + self._state = state + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateMilestoneOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_o_auth2_application_options.py b/gitea/models/create_o_auth2_application_options.py new file mode 100644 index 0000000..f01b0ad --- /dev/null +++ b/gitea/models/create_o_auth2_application_options.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateOAuth2ApplicationOptions(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 = { + 'confidential_client': 'bool', + 'name': 'str', + 'redirect_uris': 'list[str]', + 'skip_secondary_authorization': 'bool' + } + + attribute_map = { + 'confidential_client': 'confidential_client', + 'name': 'name', + 'redirect_uris': 'redirect_uris', + 'skip_secondary_authorization': 'skip_secondary_authorization' + } + + def __init__(self, confidential_client=None, name=None, redirect_uris=None, skip_secondary_authorization=None, _configuration=None): # noqa: E501 + """CreateOAuth2ApplicationOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._confidential_client = None + self._name = None + self._redirect_uris = None + self._skip_secondary_authorization = None + self.discriminator = None + + if confidential_client is not None: + self.confidential_client = confidential_client + if name is not None: + self.name = name + if redirect_uris is not None: + self.redirect_uris = redirect_uris + if skip_secondary_authorization is not None: + self.skip_secondary_authorization = skip_secondary_authorization + + @property + def confidential_client(self): + """Gets the confidential_client of this CreateOAuth2ApplicationOptions. # noqa: E501 + + + :return: The confidential_client of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: bool + """ + return self._confidential_client + + @confidential_client.setter + def confidential_client(self, confidential_client): + """Sets the confidential_client of this CreateOAuth2ApplicationOptions. + + + :param confidential_client: The confidential_client of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: bool + """ + + self._confidential_client = confidential_client + + @property + def name(self): + """Gets the name of this CreateOAuth2ApplicationOptions. # noqa: E501 + + + :return: The name of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateOAuth2ApplicationOptions. + + + :param name: The name of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def redirect_uris(self): + """Gets the redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + + + :return: The redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: list[str] + """ + return self._redirect_uris + + @redirect_uris.setter + def redirect_uris(self, redirect_uris): + """Sets the redirect_uris of this CreateOAuth2ApplicationOptions. + + + :param redirect_uris: The redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: list[str] + """ + + self._redirect_uris = redirect_uris + + @property + def skip_secondary_authorization(self): + """Gets the skip_secondary_authorization of this CreateOAuth2ApplicationOptions. # noqa: E501 + + + :return: The skip_secondary_authorization of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: bool + """ + return self._skip_secondary_authorization + + @skip_secondary_authorization.setter + def skip_secondary_authorization(self, skip_secondary_authorization): + """Sets the skip_secondary_authorization of this CreateOAuth2ApplicationOptions. + + + :param skip_secondary_authorization: The skip_secondary_authorization of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: bool + """ + + self._skip_secondary_authorization = skip_secondary_authorization + + 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(CreateOAuth2ApplicationOptions, 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, CreateOAuth2ApplicationOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateOAuth2ApplicationOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_or_update_secret_option.py b/gitea/models/create_or_update_secret_option.py new file mode 100644 index 0000000..3688362 --- /dev/null +++ b/gitea/models/create_or_update_secret_option.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateOrUpdateSecretOption(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': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, _configuration=None): # noqa: E501 + """CreateOrUpdateSecretOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this CreateOrUpdateSecretOption. # noqa: E501 + + Data of the secret to update # noqa: E501 + + :return: The data of this CreateOrUpdateSecretOption. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CreateOrUpdateSecretOption. + + Data of the secret to update # noqa: E501 + + :param data: The data of this CreateOrUpdateSecretOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + 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(CreateOrUpdateSecretOption, 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, CreateOrUpdateSecretOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateOrUpdateSecretOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_org_option.py b/gitea/models/create_org_option.py new file mode 100644 index 0000000..1e6dcf6 --- /dev/null +++ b/gitea/models/create_org_option.py @@ -0,0 +1,315 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'repo_admin_change_team_access': 'bool', + 'username': 'str', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'username': 'username', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, description=None, email=None, full_name=None, location=None, repo_admin_change_team_access=None, username=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """CreateOrgOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._email = None + self._full_name = None + self._location = None + self._repo_admin_change_team_access = None + self._username = None + self._visibility = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + self.username = username + if visibility is not None: + self.visibility = visibility + 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 email(self): + """Gets the email of this CreateOrgOption. # noqa: E501 + + + :return: The email of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CreateOrgOption. + + + :param email: The email of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._email = email + + @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 repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + + + :return: The repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this CreateOrgOption. + + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @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 self._configuration.client_side_validation and username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this CreateOrgOption. # noqa: E501 + + possible values are `public` (default), `limited` or `private` # noqa: E501 + + :return: The visibility of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this CreateOrgOption. + + possible values are `public` (default), `limited` or `private` # noqa: E501 + + :param visibility: The visibility of this CreateOrgOption. # noqa: E501 + :type: str + """ + allowed_values = ["public", "limited", "private"] # noqa: E501 + if (self._configuration.client_side_validation and + visibility not in allowed_values): + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateOrgOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_pull_request_option.py b/gitea/models/create_pull_request_option.py new file mode 100644 index 0000000..14bf1e6 --- /dev/null +++ b/gitea/models/create_pull_request_option.py @@ -0,0 +1,383 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'reviewers': 'list[str]', + 'team_reviewers': 'list[str]', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'due_date': 'due_date', + 'head': 'head', + 'labels': 'labels', + 'milestone': 'milestone', + 'reviewers': 'reviewers', + 'team_reviewers': 'team_reviewers', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, base=None, body=None, due_date=None, head=None, labels=None, milestone=None, reviewers=None, team_reviewers=None, title=None, _configuration=None): # noqa: E501 + """CreatePullRequestOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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._reviewers = None + self._team_reviewers = 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 reviewers is not None: + self.reviewers = reviewers + if team_reviewers is not None: + self.team_reviewers = team_reviewers + 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 reviewers(self): + """Gets the reviewers of this CreatePullRequestOption. # noqa: E501 + + + :return: The reviewers of this CreatePullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._reviewers + + @reviewers.setter + def reviewers(self, reviewers): + """Sets the reviewers of this CreatePullRequestOption. + + + :param reviewers: The reviewers of this CreatePullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._reviewers = reviewers + + @property + def team_reviewers(self): + """Gets the team_reviewers of this CreatePullRequestOption. # noqa: E501 + + + :return: The team_reviewers of this CreatePullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._team_reviewers + + @team_reviewers.setter + def team_reviewers(self, team_reviewers): + """Sets the team_reviewers of this CreatePullRequestOption. + + + :param team_reviewers: The team_reviewers of this CreatePullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._team_reviewers = team_reviewers + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePullRequestOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_pull_review_comment.py b/gitea/models/create_pull_review_comment.py new file mode 100644 index 0000000..700d2c4 --- /dev/null +++ b/gitea/models/create_pull_review_comment.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreatePullReviewComment(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', + 'new_position': 'int', + 'old_position': 'int', + 'path': 'str' + } + + attribute_map = { + 'body': 'body', + 'new_position': 'new_position', + 'old_position': 'old_position', + 'path': 'path' + } + + def __init__(self, body=None, new_position=None, old_position=None, path=None, _configuration=None): # noqa: E501 + """CreatePullReviewComment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._new_position = None + self._old_position = None + self._path = None + self.discriminator = None + + if body is not None: + self.body = body + if new_position is not None: + self.new_position = new_position + if old_position is not None: + self.old_position = old_position + if path is not None: + self.path = path + + @property + def body(self): + """Gets the body of this CreatePullReviewComment. # noqa: E501 + + + :return: The body of this CreatePullReviewComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullReviewComment. + + + :param body: The body of this CreatePullReviewComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def new_position(self): + """Gets the new_position of this CreatePullReviewComment. # noqa: E501 + + if comment to new file line or 0 # noqa: E501 + + :return: The new_position of this CreatePullReviewComment. # noqa: E501 + :rtype: int + """ + return self._new_position + + @new_position.setter + def new_position(self, new_position): + """Sets the new_position of this CreatePullReviewComment. + + if comment to new file line or 0 # noqa: E501 + + :param new_position: The new_position of this CreatePullReviewComment. # noqa: E501 + :type: int + """ + + self._new_position = new_position + + @property + def old_position(self): + """Gets the old_position of this CreatePullReviewComment. # noqa: E501 + + if comment to old file line or 0 # noqa: E501 + + :return: The old_position of this CreatePullReviewComment. # noqa: E501 + :rtype: int + """ + return self._old_position + + @old_position.setter + def old_position(self, old_position): + """Sets the old_position of this CreatePullReviewComment. + + if comment to old file line or 0 # noqa: E501 + + :param old_position: The old_position of this CreatePullReviewComment. # noqa: E501 + :type: int + """ + + self._old_position = old_position + + @property + def path(self): + """Gets the path of this CreatePullReviewComment. # noqa: E501 + + the tree path # noqa: E501 + + :return: The path of this CreatePullReviewComment. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this CreatePullReviewComment. + + the tree path # noqa: E501 + + :param path: The path of this CreatePullReviewComment. # noqa: E501 + :type: str + """ + + self._path = path + + 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(CreatePullReviewComment, 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, CreatePullReviewComment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePullReviewComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_pull_review_options.py b/gitea/models/create_pull_review_options.py new file mode 100644 index 0000000..d0cff8e --- /dev/null +++ b/gitea/models/create_pull_review_options.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreatePullReviewOptions(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', + 'comments': 'list[CreatePullReviewComment]', + 'commit_id': 'str', + 'event': 'ReviewStateType' + } + + attribute_map = { + 'body': 'body', + 'comments': 'comments', + 'commit_id': 'commit_id', + 'event': 'event' + } + + def __init__(self, body=None, comments=None, commit_id=None, event=None, _configuration=None): # noqa: E501 + """CreatePullReviewOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._comments = None + self._commit_id = None + self._event = None + self.discriminator = None + + if body is not None: + self.body = body + if comments is not None: + self.comments = comments + if commit_id is not None: + self.commit_id = commit_id + if event is not None: + self.event = event + + @property + def body(self): + """Gets the body of this CreatePullReviewOptions. # noqa: E501 + + + :return: The body of this CreatePullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullReviewOptions. + + + :param body: The body of this CreatePullReviewOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def comments(self): + """Gets the comments of this CreatePullReviewOptions. # noqa: E501 + + + :return: The comments of this CreatePullReviewOptions. # noqa: E501 + :rtype: list[CreatePullReviewComment] + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this CreatePullReviewOptions. + + + :param comments: The comments of this CreatePullReviewOptions. # noqa: E501 + :type: list[CreatePullReviewComment] + """ + + self._comments = comments + + @property + def commit_id(self): + """Gets the commit_id of this CreatePullReviewOptions. # noqa: E501 + + + :return: The commit_id of this CreatePullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this CreatePullReviewOptions. + + + :param commit_id: The commit_id of this CreatePullReviewOptions. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def event(self): + """Gets the event of this CreatePullReviewOptions. # noqa: E501 + + + :return: The event of this CreatePullReviewOptions. # noqa: E501 + :rtype: ReviewStateType + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this CreatePullReviewOptions. + + + :param event: The event of this CreatePullReviewOptions. # noqa: E501 + :type: ReviewStateType + """ + + self._event = event + + 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(CreatePullReviewOptions, 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, CreatePullReviewOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePullReviewOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_push_mirror_option.py b/gitea/models/create_push_mirror_option.py new file mode 100644 index 0000000..f6bc436 --- /dev/null +++ b/gitea/models/create_push_mirror_option.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreatePushMirrorOption(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 = { + 'interval': 'str', + 'remote_address': 'str', + 'remote_password': 'str', + 'remote_username': 'str', + 'sync_on_commit': 'bool' + } + + attribute_map = { + 'interval': 'interval', + 'remote_address': 'remote_address', + 'remote_password': 'remote_password', + 'remote_username': 'remote_username', + 'sync_on_commit': 'sync_on_commit' + } + + def __init__(self, interval=None, remote_address=None, remote_password=None, remote_username=None, sync_on_commit=None, _configuration=None): # noqa: E501 + """CreatePushMirrorOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._interval = None + self._remote_address = None + self._remote_password = None + self._remote_username = None + self._sync_on_commit = None + self.discriminator = None + + if interval is not None: + self.interval = interval + if remote_address is not None: + self.remote_address = remote_address + if remote_password is not None: + self.remote_password = remote_password + if remote_username is not None: + self.remote_username = remote_username + if sync_on_commit is not None: + self.sync_on_commit = sync_on_commit + + @property + def interval(self): + """Gets the interval of this CreatePushMirrorOption. # noqa: E501 + + + :return: The interval of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._interval + + @interval.setter + def interval(self, interval): + """Sets the interval of this CreatePushMirrorOption. + + + :param interval: The interval of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._interval = interval + + @property + def remote_address(self): + """Gets the remote_address of this CreatePushMirrorOption. # noqa: E501 + + + :return: The remote_address of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._remote_address + + @remote_address.setter + def remote_address(self, remote_address): + """Sets the remote_address of this CreatePushMirrorOption. + + + :param remote_address: The remote_address of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._remote_address = remote_address + + @property + def remote_password(self): + """Gets the remote_password of this CreatePushMirrorOption. # noqa: E501 + + + :return: The remote_password of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._remote_password + + @remote_password.setter + def remote_password(self, remote_password): + """Sets the remote_password of this CreatePushMirrorOption. + + + :param remote_password: The remote_password of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._remote_password = remote_password + + @property + def remote_username(self): + """Gets the remote_username of this CreatePushMirrorOption. # noqa: E501 + + + :return: The remote_username of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._remote_username + + @remote_username.setter + def remote_username(self, remote_username): + """Sets the remote_username of this CreatePushMirrorOption. + + + :param remote_username: The remote_username of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._remote_username = remote_username + + @property + def sync_on_commit(self): + """Gets the sync_on_commit of this CreatePushMirrorOption. # noqa: E501 + + + :return: The sync_on_commit of this CreatePushMirrorOption. # noqa: E501 + :rtype: bool + """ + return self._sync_on_commit + + @sync_on_commit.setter + def sync_on_commit(self, sync_on_commit): + """Sets the sync_on_commit of this CreatePushMirrorOption. + + + :param sync_on_commit: The sync_on_commit of this CreatePushMirrorOption. # noqa: E501 + :type: bool + """ + + self._sync_on_commit = sync_on_commit + + 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(CreatePushMirrorOption, 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, CreatePushMirrorOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePushMirrorOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_release_option.py b/gitea/models/create_release_option.py new file mode 100644 index 0000000..0d916d8 --- /dev/null +++ b/gitea/models/create_release_option.py @@ -0,0 +1,254 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """CreateReleaseOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 self._configuration.client_side_validation and 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateReleaseOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_repo_option.py b/gitea/models/create_repo_option.py new file mode 100644 index 0000000..3216422 --- /dev/null +++ b/gitea/models/create_repo_option.py @@ -0,0 +1,448 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'default_branch': 'str', + 'description': 'str', + 'gitignores': 'str', + 'issue_labels': 'str', + 'license': 'str', + 'name': 'str', + 'object_format_name': 'str', + 'private': 'bool', + 'readme': 'str', + 'template': 'bool', + 'trust_model': 'str' + } + + attribute_map = { + 'auto_init': 'auto_init', + 'default_branch': 'default_branch', + 'description': 'description', + 'gitignores': 'gitignores', + 'issue_labels': 'issue_labels', + 'license': 'license', + 'name': 'name', + 'object_format_name': 'object_format_name', + 'private': 'private', + 'readme': 'readme', + 'template': 'template', + 'trust_model': 'trust_model' + } + + def __init__(self, auto_init=None, default_branch=None, description=None, gitignores=None, issue_labels=None, license=None, name=None, object_format_name=None, private=None, readme=None, template=None, trust_model=None, _configuration=None): # noqa: E501 + """CreateRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._auto_init = None + self._default_branch = None + self._description = None + self._gitignores = None + self._issue_labels = None + self._license = None + self._name = None + self._object_format_name = None + self._private = None + self._readme = None + self._template = None + self._trust_model = None + self.discriminator = None + + if auto_init is not None: + self.auto_init = auto_init + if default_branch is not None: + self.default_branch = default_branch + if description is not None: + self.description = description + if gitignores is not None: + self.gitignores = gitignores + if issue_labels is not None: + self.issue_labels = issue_labels + if license is not None: + self.license = license + self.name = name + if object_format_name is not None: + self.object_format_name = object_format_name + if private is not None: + self.private = private + if readme is not None: + self.readme = readme + if template is not None: + self.template = template + if trust_model is not None: + self.trust_model = trust_model + + @property + def auto_init(self): + """Gets the auto_init of this CreateRepoOption. # noqa: E501 + + Whether the repository should be auto-initialized? # 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-initialized? # noqa: E501 + + :param auto_init: The auto_init of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._auto_init = auto_init + + @property + def default_branch(self): + """Gets the default_branch of this CreateRepoOption. # noqa: E501 + + DefaultBranch of the repository (used when initializes and in template) # noqa: E501 + + :return: The default_branch of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this CreateRepoOption. + + DefaultBranch of the repository (used when initializes and in template) # noqa: E501 + + :param default_branch: The default_branch of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @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 issue_labels(self): + """Gets the issue_labels of this CreateRepoOption. # noqa: E501 + + Label-Set to use # noqa: E501 + + :return: The issue_labels of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._issue_labels + + @issue_labels.setter + def issue_labels(self, issue_labels): + """Sets the issue_labels of this CreateRepoOption. + + Label-Set to use # noqa: E501 + + :param issue_labels: The issue_labels of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._issue_labels = issue_labels + + @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 self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def object_format_name(self): + """Gets the object_format_name of this CreateRepoOption. # noqa: E501 + + ObjectFormatName of the underlying git repository # noqa: E501 + + :return: The object_format_name of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._object_format_name + + @object_format_name.setter + def object_format_name(self, object_format_name): + """Sets the object_format_name of this CreateRepoOption. + + ObjectFormatName of the underlying git repository # noqa: E501 + + :param object_format_name: The object_format_name of this CreateRepoOption. # noqa: E501 + :type: str + """ + allowed_values = ["sha1", "sha256"] # noqa: E501 + if (self._configuration.client_side_validation and + object_format_name not in allowed_values): + raise ValueError( + "Invalid value for `object_format_name` ({0}), must be one of {1}" # noqa: E501 + .format(object_format_name, allowed_values) + ) + + self._object_format_name = object_format_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 + + @property + def template(self): + """Gets the template of this CreateRepoOption. # noqa: E501 + + Whether the repository is template # noqa: E501 + + :return: The template of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this CreateRepoOption. + + Whether the repository is template # noqa: E501 + + :param template: The template of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._template = template + + @property + def trust_model(self): + """Gets the trust_model of this CreateRepoOption. # noqa: E501 + + TrustModel of the repository # noqa: E501 + + :return: The trust_model of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._trust_model + + @trust_model.setter + def trust_model(self, trust_model): + """Sets the trust_model of this CreateRepoOption. + + TrustModel of the repository # noqa: E501 + + :param trust_model: The trust_model of this CreateRepoOption. # noqa: E501 + :type: str + """ + allowed_values = ["default", "collaborator", "committer", "collaboratorcommitter"] # noqa: E501 + if (self._configuration.client_side_validation and + trust_model not in allowed_values): + raise ValueError( + "Invalid value for `trust_model` ({0}), must be one of {1}" # noqa: E501 + .format(trust_model, allowed_values) + ) + + self._trust_model = trust_model + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_status_option.py b/gitea/models/create_status_option.py new file mode 100644 index 0000000..96fc30b --- /dev/null +++ b/gitea/models/create_status_option.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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': 'CommitStatusState', + '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, _configuration=None): # noqa: E501 + """CreateStatusOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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: CommitStatusState + """ + 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: CommitStatusState + """ + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateStatusOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_tag_option.py b/gitea/models/create_tag_option.py new file mode 100644 index 0000000..4b283a3 --- /dev/null +++ b/gitea/models/create_tag_option.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateTagOption(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 = { + 'message': 'str', + 'tag_name': 'str', + 'target': 'str' + } + + attribute_map = { + 'message': 'message', + 'tag_name': 'tag_name', + 'target': 'target' + } + + def __init__(self, message=None, tag_name=None, target=None, _configuration=None): # noqa: E501 + """CreateTagOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._tag_name = None + self._target = None + self.discriminator = None + + if message is not None: + self.message = message + self.tag_name = tag_name + if target is not None: + self.target = target + + @property + def message(self): + """Gets the message of this CreateTagOption. # noqa: E501 + + + :return: The message of this CreateTagOption. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateTagOption. + + + :param message: The message of this CreateTagOption. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def tag_name(self): + """Gets the tag_name of this CreateTagOption. # noqa: E501 + + + :return: The tag_name of this CreateTagOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this CreateTagOption. + + + :param tag_name: The tag_name of this CreateTagOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and 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(self): + """Gets the target of this CreateTagOption. # noqa: E501 + + + :return: The target of this CreateTagOption. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this CreateTagOption. + + + :param target: The target of this CreateTagOption. # noqa: E501 + :type: str + """ + + self._target = target + + 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(CreateTagOption, 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, CreateTagOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTagOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_tag_protection_option.py b/gitea/models/create_tag_protection_option.py new file mode 100644 index 0000000..cda5aa0 --- /dev/null +++ b/gitea/models/create_tag_protection_option.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateTagProtectionOption(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_pattern': 'str', + 'whitelist_teams': 'list[str]', + 'whitelist_usernames': 'list[str]' + } + + attribute_map = { + 'name_pattern': 'name_pattern', + 'whitelist_teams': 'whitelist_teams', + 'whitelist_usernames': 'whitelist_usernames' + } + + def __init__(self, name_pattern=None, whitelist_teams=None, whitelist_usernames=None, _configuration=None): # noqa: E501 + """CreateTagProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name_pattern = None + self._whitelist_teams = None + self._whitelist_usernames = None + self.discriminator = None + + if name_pattern is not None: + self.name_pattern = name_pattern + if whitelist_teams is not None: + self.whitelist_teams = whitelist_teams + if whitelist_usernames is not None: + self.whitelist_usernames = whitelist_usernames + + @property + def name_pattern(self): + """Gets the name_pattern of this CreateTagProtectionOption. # noqa: E501 + + + :return: The name_pattern of this CreateTagProtectionOption. # noqa: E501 + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """Sets the name_pattern of this CreateTagProtectionOption. + + + :param name_pattern: The name_pattern of this CreateTagProtectionOption. # noqa: E501 + :type: str + """ + + self._name_pattern = name_pattern + + @property + def whitelist_teams(self): + """Gets the whitelist_teams of this CreateTagProtectionOption. # noqa: E501 + + + :return: The whitelist_teams of this CreateTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_teams + + @whitelist_teams.setter + def whitelist_teams(self, whitelist_teams): + """Sets the whitelist_teams of this CreateTagProtectionOption. + + + :param whitelist_teams: The whitelist_teams of this CreateTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_teams = whitelist_teams + + @property + def whitelist_usernames(self): + """Gets the whitelist_usernames of this CreateTagProtectionOption. # noqa: E501 + + + :return: The whitelist_usernames of this CreateTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_usernames + + @whitelist_usernames.setter + def whitelist_usernames(self, whitelist_usernames): + """Sets the whitelist_usernames of this CreateTagProtectionOption. + + + :param whitelist_usernames: The whitelist_usernames of this CreateTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_usernames = whitelist_usernames + + 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(CreateTagProtectionOption, 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, CreateTagProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTagProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_team_option.py b/gitea/models/create_team_option.py new file mode 100644 index 0000000..76e7a04 --- /dev/null +++ b/gitea/models/create_team_option.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'can_create_org_repo': 'bool', + 'description': 'str', + 'includes_all_repositories': 'bool', + 'name': 'str', + 'permission': 'str', + 'units': 'list[str]', + 'units_map': 'dict(str, str)' + } + + attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', + 'description': 'description', + 'includes_all_repositories': 'includes_all_repositories', + 'name': 'name', + 'permission': 'permission', + 'units': 'units', + 'units_map': 'units_map' + } + + def __init__(self, can_create_org_repo=None, description=None, includes_all_repositories=None, name=None, permission=None, units=None, units_map=None, _configuration=None): # noqa: E501 + """CreateTeamOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_org_repo = None + self._description = None + self._includes_all_repositories = None + self._name = None + self._permission = None + self._units = None + self._units_map = None + self.discriminator = None + + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo + if description is not None: + self.description = description + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories + self.name = name + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + if units_map is not None: + self.units_map = units_map + + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this CreateTeamOption. # noqa: E501 + + + :return: The can_create_org_repo of this CreateTeamOption. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this CreateTeamOption. + + + :param can_create_org_repo: The can_create_org_repo of this CreateTeamOption. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + + @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 includes_all_repositories(self): + """Gets the includes_all_repositories of this CreateTeamOption. # noqa: E501 + + + :return: The includes_all_repositories of this CreateTeamOption. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this CreateTeamOption. + + + :param includes_all_repositories: The includes_all_repositories of this CreateTeamOption. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + + @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 self._configuration.client_side_validation and 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 (self._configuration.client_side_validation and + 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 + + @property + def units_map(self): + """Gets the units_map of this CreateTeamOption. # noqa: E501 + + + :return: The units_map of this CreateTeamOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._units_map + + @units_map.setter + def units_map(self, units_map): + """Sets the units_map of this CreateTeamOption. + + + :param units_map: The units_map of this CreateTeamOption. # noqa: E501 + :type: dict(str, str) + """ + + self._units_map = units_map + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTeamOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_user_option.py b/gitea/models/create_user_option.py new file mode 100644 index 0000000..a8d5cfe --- /dev/null +++ b/gitea/models/create_user_option.py @@ -0,0 +1,387 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'created_at': 'datetime', + 'email': 'str', + 'full_name': 'str', + 'login_name': 'str', + 'must_change_password': 'bool', + 'password': 'str', + 'restricted': 'bool', + 'send_notify': 'bool', + 'source_id': 'int', + 'username': 'str', + 'visibility': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'email': 'email', + 'full_name': 'full_name', + 'login_name': 'login_name', + 'must_change_password': 'must_change_password', + 'password': 'password', + 'restricted': 'restricted', + 'send_notify': 'send_notify', + 'source_id': 'source_id', + 'username': 'username', + 'visibility': 'visibility' + } + + def __init__(self, created_at=None, email=None, full_name=None, login_name=None, must_change_password=None, password=None, restricted=None, send_notify=None, source_id=None, username=None, visibility=None, _configuration=None): # noqa: E501 + """CreateUserOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._email = None + self._full_name = None + self._login_name = None + self._must_change_password = None + self._password = None + self._restricted = None + self._send_notify = None + self._source_id = None + self._username = None + self._visibility = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + 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 + if must_change_password is not None: + self.must_change_password = must_change_password + if password is not None: + self.password = password + if restricted is not None: + self.restricted = restricted + 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 + if visibility is not None: + self.visibility = visibility + + @property + def created_at(self): + """Gets the created_at of this CreateUserOption. # noqa: E501 + + For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". # noqa: E501 + + :return: The created_at of this CreateUserOption. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this CreateUserOption. + + For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". # noqa: E501 + + :param created_at: The created_at of this CreateUserOption. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @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 self._configuration.client_side_validation and 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 must_change_password(self): + """Gets the must_change_password of this CreateUserOption. # noqa: E501 + + + :return: The must_change_password of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._must_change_password + + @must_change_password.setter + def must_change_password(self, must_change_password): + """Sets the must_change_password of this CreateUserOption. + + + :param must_change_password: The must_change_password of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._must_change_password = must_change_password + + @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 + """ + + self._password = password + + @property + def restricted(self): + """Gets the restricted of this CreateUserOption. # noqa: E501 + + + :return: The restricted of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._restricted + + @restricted.setter + def restricted(self, restricted): + """Sets the restricted of this CreateUserOption. + + + :param restricted: The restricted of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._restricted = restricted + + @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 self._configuration.client_side_validation and username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this CreateUserOption. # noqa: E501 + + + :return: The visibility of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this CreateUserOption. + + + :param visibility: The visibility of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateUserOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_variable_option.py b/gitea/models/create_variable_option.py new file mode 100644 index 0000000..77f01f8 --- /dev/null +++ b/gitea/models/create_variable_option.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateVariableOption(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 = { + 'value': 'str' + } + + attribute_map = { + 'value': 'value' + } + + def __init__(self, value=None, _configuration=None): # noqa: E501 + """CreateVariableOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._value = None + self.discriminator = None + + self.value = value + + @property + def value(self): + """Gets the value of this CreateVariableOption. # noqa: E501 + + Value of the variable to create # noqa: E501 + + :return: The value of this CreateVariableOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this CreateVariableOption. + + Value of the variable to create # noqa: E501 + + :param value: The value of this CreateVariableOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and value is None: + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + 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(CreateVariableOption, 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, CreateVariableOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateVariableOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/create_wiki_page_options.py b/gitea/models/create_wiki_page_options.py new file mode 100644 index 0000000..a2789ea --- /dev/null +++ b/gitea/models/create_wiki_page_options.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class CreateWikiPageOptions(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 = { + 'content_base64': 'str', + 'message': 'str', + 'title': 'str' + } + + attribute_map = { + 'content_base64': 'content_base64', + 'message': 'message', + 'title': 'title' + } + + def __init__(self, content_base64=None, message=None, title=None, _configuration=None): # noqa: E501 + """CreateWikiPageOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content_base64 = None + self._message = None + self._title = None + self.discriminator = None + + if content_base64 is not None: + self.content_base64 = content_base64 + if message is not None: + self.message = message + if title is not None: + self.title = title + + @property + def content_base64(self): + """Gets the content_base64 of this CreateWikiPageOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content_base64 of this CreateWikiPageOptions. # noqa: E501 + :rtype: str + """ + return self._content_base64 + + @content_base64.setter + def content_base64(self, content_base64): + """Sets the content_base64 of this CreateWikiPageOptions. + + content must be base64 encoded # noqa: E501 + + :param content_base64: The content_base64 of this CreateWikiPageOptions. # noqa: E501 + :type: str + """ + + self._content_base64 = content_base64 + + @property + def message(self): + """Gets the message of this CreateWikiPageOptions. # noqa: E501 + + optional commit message summarizing the change # noqa: E501 + + :return: The message of this CreateWikiPageOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateWikiPageOptions. + + optional commit message summarizing the change # noqa: E501 + + :param message: The message of this CreateWikiPageOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def title(self): + """Gets the title of this CreateWikiPageOptions. # noqa: E501 + + page title. leave empty to keep unchanged # noqa: E501 + + :return: The title of this CreateWikiPageOptions. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateWikiPageOptions. + + page title. leave empty to keep unchanged # noqa: E501 + + :param title: The title of this CreateWikiPageOptions. # 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(CreateWikiPageOptions, 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, CreateWikiPageOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateWikiPageOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/cron.py b/gitea/models/cron.py new file mode 100644 index 0000000..c35d7d2 --- /dev/null +++ b/gitea/models/cron.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Cron(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 = { + 'exec_times': 'int', + 'name': 'str', + 'next': 'datetime', + 'prev': 'datetime', + 'schedule': 'str' + } + + attribute_map = { + 'exec_times': 'exec_times', + 'name': 'name', + 'next': 'next', + 'prev': 'prev', + 'schedule': 'schedule' + } + + def __init__(self, exec_times=None, name=None, next=None, prev=None, schedule=None, _configuration=None): # noqa: E501 + """Cron - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._exec_times = None + self._name = None + self._next = None + self._prev = None + self._schedule = None + self.discriminator = None + + if exec_times is not None: + self.exec_times = exec_times + if name is not None: + self.name = name + if next is not None: + self.next = next + if prev is not None: + self.prev = prev + if schedule is not None: + self.schedule = schedule + + @property + def exec_times(self): + """Gets the exec_times of this Cron. # noqa: E501 + + + :return: The exec_times of this Cron. # noqa: E501 + :rtype: int + """ + return self._exec_times + + @exec_times.setter + def exec_times(self, exec_times): + """Sets the exec_times of this Cron. + + + :param exec_times: The exec_times of this Cron. # noqa: E501 + :type: int + """ + + self._exec_times = exec_times + + @property + def name(self): + """Gets the name of this Cron. # noqa: E501 + + + :return: The name of this Cron. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Cron. + + + :param name: The name of this Cron. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def next(self): + """Gets the next of this Cron. # noqa: E501 + + + :return: The next of this Cron. # noqa: E501 + :rtype: datetime + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this Cron. + + + :param next: The next of this Cron. # noqa: E501 + :type: datetime + """ + + self._next = next + + @property + def prev(self): + """Gets the prev of this Cron. # noqa: E501 + + + :return: The prev of this Cron. # noqa: E501 + :rtype: datetime + """ + return self._prev + + @prev.setter + def prev(self, prev): + """Sets the prev of this Cron. + + + :param prev: The prev of this Cron. # noqa: E501 + :type: datetime + """ + + self._prev = prev + + @property + def schedule(self): + """Gets the schedule of this Cron. # noqa: E501 + + + :return: The schedule of this Cron. # noqa: E501 + :rtype: str + """ + return self._schedule + + @schedule.setter + def schedule(self, schedule): + """Sets the schedule of this Cron. + + + :param schedule: The schedule of this Cron. # noqa: E501 + :type: str + """ + + self._schedule = schedule + + 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(Cron, 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, Cron): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Cron): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/delete_email_option.py b/gitea/models/delete_email_option.py new file mode 100644 index 0000000..c783c4f --- /dev/null +++ b/gitea/models/delete_email_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """DeleteEmailOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteEmailOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/delete_file_options.py b/gitea/models/delete_file_options.py new file mode 100644 index 0000000..f05f267 --- /dev/null +++ b/gitea/models/delete_file_options.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class DeleteFileOptions(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': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'dates': 'CommitDateOptions', + 'message': 'str', + 'new_branch': 'str', + 'sha': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'dates': 'dates', + 'message': 'message', + 'new_branch': 'new_branch', + 'sha': 'sha', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, dates=None, message=None, new_branch=None, sha=None, signoff=None, _configuration=None): # noqa: E501 + """DeleteFileOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._dates = None + self._message = None + self._new_branch = None + self._sha = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + if dates is not None: + self.dates = dates + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + self.sha = sha + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this DeleteFileOptions. # noqa: E501 + + + :return: The author of this DeleteFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this DeleteFileOptions. + + + :param author: The author of this DeleteFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this DeleteFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this DeleteFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this DeleteFileOptions. # noqa: E501 + + + :return: The committer of this DeleteFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this DeleteFileOptions. + + + :param committer: The committer of this DeleteFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def dates(self): + """Gets the dates of this DeleteFileOptions. # noqa: E501 + + + :return: The dates of this DeleteFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this DeleteFileOptions. + + + :param dates: The dates of this DeleteFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def message(self): + """Gets the message of this DeleteFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this DeleteFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this DeleteFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this DeleteFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def sha(self): + """Gets the sha of this DeleteFileOptions. # noqa: E501 + + sha is the SHA for the file that already exists # noqa: E501 + + :return: The sha of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this DeleteFileOptions. + + sha is the SHA for the file that already exists # noqa: E501 + + :param sha: The sha of this DeleteFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and sha is None: + raise ValueError("Invalid value for `sha`, must not be `None`") # noqa: E501 + + self._sha = sha + + @property + def signoff(self): + """Gets the signoff of this DeleteFileOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this DeleteFileOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this DeleteFileOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this DeleteFileOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(DeleteFileOptions, 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, DeleteFileOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteFileOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/deploy_key.py b/gitea/models/deploy_key.py new file mode 100644 index 0000000..1d91d30 --- /dev/null +++ b/gitea/models/deploy_key.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """DeployKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeployKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/dismiss_pull_review_options.py b/gitea/models/dismiss_pull_review_options.py new file mode 100644 index 0000000..88904d2 --- /dev/null +++ b/gitea/models/dismiss_pull_review_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class DismissPullReviewOptions(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 = { + 'message': 'str', + 'priors': 'bool' + } + + attribute_map = { + 'message': 'message', + 'priors': 'priors' + } + + def __init__(self, message=None, priors=None, _configuration=None): # noqa: E501 + """DismissPullReviewOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._priors = None + self.discriminator = None + + if message is not None: + self.message = message + if priors is not None: + self.priors = priors + + @property + def message(self): + """Gets the message of this DismissPullReviewOptions. # noqa: E501 + + + :return: The message of this DismissPullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this DismissPullReviewOptions. + + + :param message: The message of this DismissPullReviewOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def priors(self): + """Gets the priors of this DismissPullReviewOptions. # noqa: E501 + + + :return: The priors of this DismissPullReviewOptions. # noqa: E501 + :rtype: bool + """ + return self._priors + + @priors.setter + def priors(self, priors): + """Sets the priors of this DismissPullReviewOptions. + + + :param priors: The priors of this DismissPullReviewOptions. # noqa: E501 + :type: bool + """ + + self._priors = priors + + 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(DismissPullReviewOptions, 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, DismissPullReviewOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DismissPullReviewOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_attachment_options.py b/gitea/models/edit_attachment_options.py new file mode 100644 index 0000000..0f45b21 --- /dev/null +++ b/gitea/models/edit_attachment_options.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """EditAttachmentOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditAttachmentOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_branch_protection_option.py b/gitea/models/edit_branch_protection_option.py new file mode 100644 index 0000000..4dc2c97 --- /dev/null +++ b/gitea/models/edit_branch_protection_option.py @@ -0,0 +1,851 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class EditBranchProtectionOption(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 = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_admin_merge_override': 'bool', + 'block_on_official_review_requests': 'bool', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_force_push': 'bool', + 'enable_force_push_allowlist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'force_push_allowlist_deploy_keys': 'bool', + 'force_push_allowlist_teams': 'list[str]', + 'force_push_allowlist_usernames': 'list[str]', + 'ignore_stale_approvals': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'priority': 'int', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]', + 'unprotected_file_patterns': 'str' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_admin_merge_override': 'block_admin_merge_override', + 'block_on_official_review_requests': 'block_on_official_review_requests', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_force_push': 'enable_force_push', + 'enable_force_push_allowlist': 'enable_force_push_allowlist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'force_push_allowlist_deploy_keys': 'force_push_allowlist_deploy_keys', + 'force_push_allowlist_teams': 'force_push_allowlist_teams', + 'force_push_allowlist_usernames': 'force_push_allowlist_usernames', + 'ignore_stale_approvals': 'ignore_stale_approvals', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'priority': 'priority', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts', + 'unprotected_file_patterns': 'unprotected_file_patterns' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_admin_merge_override=None, block_on_official_review_requests=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_force_push=None, enable_force_push_allowlist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, force_push_allowlist_deploy_keys=None, force_push_allowlist_teams=None, force_push_allowlist_usernames=None, ignore_stale_approvals=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, priority=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, status_check_contexts=None, unprotected_file_patterns=None, _configuration=None): # noqa: E501 + """EditBranchProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_admin_merge_override = None + self._block_on_official_review_requests = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_force_push = None + self._enable_force_push_allowlist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._force_push_allowlist_deploy_keys = None + self._force_push_allowlist_teams = None + self._force_push_allowlist_usernames = None + self._ignore_stale_approvals = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._priority = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._status_check_contexts = None + self._unprotected_file_patterns = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_admin_merge_override is not None: + self.block_admin_merge_override = block_admin_merge_override + if block_on_official_review_requests is not None: + self.block_on_official_review_requests = block_on_official_review_requests + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_force_push is not None: + self.enable_force_push = enable_force_push + if enable_force_push_allowlist is not None: + self.enable_force_push_allowlist = enable_force_push_allowlist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if force_push_allowlist_deploy_keys is not None: + self.force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + if force_push_allowlist_teams is not None: + self.force_push_allowlist_teams = force_push_allowlist_teams + if force_push_allowlist_usernames is not None: + self.force_push_allowlist_usernames = force_push_allowlist_usernames + if ignore_stale_approvals is not None: + self.ignore_stale_approvals = ignore_stale_approvals + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if priority is not None: + self.priority = priority + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if unprotected_file_patterns is not None: + self.unprotected_file_patterns = unprotected_file_patterns + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this EditBranchProtectionOption. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this EditBranchProtectionOption. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_admin_merge_override(self): + """Gets the block_admin_merge_override of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_admin_merge_override of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_admin_merge_override + + @block_admin_merge_override.setter + def block_admin_merge_override(self, block_admin_merge_override): + """Sets the block_admin_merge_override of this EditBranchProtectionOption. + + + :param block_admin_merge_override: The block_admin_merge_override of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_admin_merge_override = block_admin_merge_override + + @property + def block_on_official_review_requests(self): + """Gets the block_on_official_review_requests of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_official_review_requests of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_official_review_requests + + @block_on_official_review_requests.setter + def block_on_official_review_requests(self, block_on_official_review_requests): + """Sets the block_on_official_review_requests of this EditBranchProtectionOption. + + + :param block_on_official_review_requests: The block_on_official_review_requests of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_official_review_requests = block_on_official_review_requests + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this EditBranchProtectionOption. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this EditBranchProtectionOption. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this EditBranchProtectionOption. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this EditBranchProtectionOption. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_force_push(self): + """Gets the enable_force_push of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push + + @enable_force_push.setter + def enable_force_push(self, enable_force_push): + """Sets the enable_force_push of this EditBranchProtectionOption. + + + :param enable_force_push: The enable_force_push of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push = enable_force_push + + @property + def enable_force_push_allowlist(self): + """Gets the enable_force_push_allowlist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push_allowlist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push_allowlist + + @enable_force_push_allowlist.setter + def enable_force_push_allowlist(self, enable_force_push_allowlist): + """Sets the enable_force_push_allowlist of this EditBranchProtectionOption. + + + :param enable_force_push_allowlist: The enable_force_push_allowlist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push_allowlist = enable_force_push_allowlist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this EditBranchProtectionOption. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_push of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this EditBranchProtectionOption. + + + :param enable_push: The enable_push of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this EditBranchProtectionOption. + + + :param enable_push_whitelist: The enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_status_check of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this EditBranchProtectionOption. + + + :param enable_status_check: The enable_status_check of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def force_push_allowlist_deploy_keys(self): + """Gets the force_push_allowlist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._force_push_allowlist_deploy_keys + + @force_push_allowlist_deploy_keys.setter + def force_push_allowlist_deploy_keys(self, force_push_allowlist_deploy_keys): + """Sets the force_push_allowlist_deploy_keys of this EditBranchProtectionOption. + + + :param force_push_allowlist_deploy_keys: The force_push_allowlist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + + @property + def force_push_allowlist_teams(self): + """Gets the force_push_allowlist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_teams + + @force_push_allowlist_teams.setter + def force_push_allowlist_teams(self, force_push_allowlist_teams): + """Sets the force_push_allowlist_teams of this EditBranchProtectionOption. + + + :param force_push_allowlist_teams: The force_push_allowlist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_teams = force_push_allowlist_teams + + @property + def force_push_allowlist_usernames(self): + """Gets the force_push_allowlist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_usernames + + @force_push_allowlist_usernames.setter + def force_push_allowlist_usernames(self, force_push_allowlist_usernames): + """Sets the force_push_allowlist_usernames of this EditBranchProtectionOption. + + + :param force_push_allowlist_usernames: The force_push_allowlist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_usernames = force_push_allowlist_usernames + + @property + def ignore_stale_approvals(self): + """Gets the ignore_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The ignore_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._ignore_stale_approvals + + @ignore_stale_approvals.setter + def ignore_stale_approvals(self, ignore_stale_approvals): + """Sets the ignore_stale_approvals of this EditBranchProtectionOption. + + + :param ignore_stale_approvals: The ignore_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._ignore_stale_approvals = ignore_stale_approvals + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this EditBranchProtectionOption. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this EditBranchProtectionOption. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def priority(self): + """Gets the priority of this EditBranchProtectionOption. # noqa: E501 + + + :return: The priority of this EditBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this EditBranchProtectionOption. + + + :param priority: The priority of this EditBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._priority = priority + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + + + :return: The protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this EditBranchProtectionOption. + + + :param protected_file_patterns: The protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this EditBranchProtectionOption. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this EditBranchProtectionOption. + + + :param push_whitelist_teams: The push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this EditBranchProtectionOption. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + + + :return: The require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this EditBranchProtectionOption. + + + :param require_signed_commits: The require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The required_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this EditBranchProtectionOption. + + + :param required_approvals: The required_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + + + :return: The status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this EditBranchProtectionOption. + + + :param status_check_contexts: The status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def unprotected_file_patterns(self): + """Gets the unprotected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + + + :return: The unprotected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._unprotected_file_patterns + + @unprotected_file_patterns.setter + def unprotected_file_patterns(self, unprotected_file_patterns): + """Sets the unprotected_file_patterns of this EditBranchProtectionOption. + + + :param unprotected_file_patterns: The unprotected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._unprotected_file_patterns = unprotected_file_patterns + + 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(EditBranchProtectionOption, 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, EditBranchProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditBranchProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_deadline_option.py b/gitea/models/edit_deadline_option.py new file mode 100644 index 0000000..751d748 --- /dev/null +++ b/gitea/models/edit_deadline_option.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """EditDeadlineOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 self._configuration.client_side_validation and 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditDeadlineOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_git_hook_option.py b/gitea/models/edit_git_hook_option.py new file mode 100644 index 0000000..f12c068 --- /dev/null +++ b/gitea/models/edit_git_hook_option.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class EditGitHookOption(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 = { + 'content': 'str' + } + + attribute_map = { + 'content': 'content' + } + + def __init__(self, content=None, _configuration=None): # noqa: E501 + """EditGitHookOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self.discriminator = None + + if content is not None: + self.content = content + + @property + def content(self): + """Gets the content of this EditGitHookOption. # noqa: E501 + + + :return: The content of this EditGitHookOption. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this EditGitHookOption. + + + :param content: The content of this EditGitHookOption. # noqa: E501 + :type: str + """ + + self._content = content + + 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(EditGitHookOption, 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, EditGitHookOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditGitHookOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_hook_option.py b/gitea/models/edit_hook_option.py new file mode 100644 index 0000000..0f0fc81 --- /dev/null +++ b/gitea/models/edit_hook_option.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'authorization_header': 'str', + 'branch_filter': 'str', + 'config': 'dict(str, str)', + 'events': 'list[str]' + } + + attribute_map = { + 'active': 'active', + 'authorization_header': 'authorization_header', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'events': 'events' + } + + def __init__(self, active=None, authorization_header=None, branch_filter=None, config=None, events=None, _configuration=None): # noqa: E501 + """EditHookOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._authorization_header = None + self._branch_filter = None + self._config = None + self._events = None + self.discriminator = None + + if active is not None: + self.active = active + if authorization_header is not None: + self.authorization_header = authorization_header + if branch_filter is not None: + self.branch_filter = branch_filter + 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 authorization_header(self): + """Gets the authorization_header of this EditHookOption. # noqa: E501 + + + :return: The authorization_header of this EditHookOption. # noqa: E501 + :rtype: str + """ + return self._authorization_header + + @authorization_header.setter + def authorization_header(self, authorization_header): + """Sets the authorization_header of this EditHookOption. + + + :param authorization_header: The authorization_header of this EditHookOption. # noqa: E501 + :type: str + """ + + self._authorization_header = authorization_header + + @property + def branch_filter(self): + """Gets the branch_filter of this EditHookOption. # noqa: E501 + + + :return: The branch_filter of this EditHookOption. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this EditHookOption. + + + :param branch_filter: The branch_filter of this EditHookOption. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditHookOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_issue_comment_option.py b/gitea/models/edit_issue_comment_option.py new file mode 100644 index 0000000..4545b40 --- /dev/null +++ b/gitea/models/edit_issue_comment_option.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """EditIssueCommentOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 self._configuration.client_side_validation and 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditIssueCommentOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_issue_option.py b/gitea/models/edit_issue_option.py new file mode 100644 index 0000000..f6f571f --- /dev/null +++ b/gitea/models/edit_issue_option.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'ref': 'str', + 'state': 'str', + 'title': 'str', + 'unset_due_date': 'bool' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'due_date': 'due_date', + 'milestone': 'milestone', + 'ref': 'ref', + 'state': 'state', + 'title': 'title', + 'unset_due_date': 'unset_due_date' + } + + def __init__(self, assignee=None, assignees=None, body=None, due_date=None, milestone=None, ref=None, state=None, title=None, unset_due_date=None, _configuration=None): # noqa: E501 + """EditIssueOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assignee = None + self._assignees = None + self._body = None + self._due_date = None + self._milestone = None + self._ref = None + self._state = None + self._title = None + self._unset_due_date = 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 ref is not None: + self.ref = ref + if state is not None: + self.state = state + if title is not None: + self.title = title + if unset_due_date is not None: + self.unset_due_date = unset_due_date + + @property + def assignee(self): + """Gets the assignee of this EditIssueOption. # noqa: E501 + + deprecated # 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. + + deprecated # noqa: E501 + + :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 ref(self): + """Gets the ref of this EditIssueOption. # noqa: E501 + + + :return: The ref of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this EditIssueOption. + + + :param ref: The ref of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._ref = ref + + @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 + + @property + def unset_due_date(self): + """Gets the unset_due_date of this EditIssueOption. # noqa: E501 + + + :return: The unset_due_date of this EditIssueOption. # noqa: E501 + :rtype: bool + """ + return self._unset_due_date + + @unset_due_date.setter + def unset_due_date(self, unset_due_date): + """Sets the unset_due_date of this EditIssueOption. + + + :param unset_due_date: The unset_due_date of this EditIssueOption. # noqa: E501 + :type: bool + """ + + self._unset_due_date = unset_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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditIssueOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_label_option.py b/gitea/models/edit_label_option.py new file mode 100644 index 0000000..9af9a15 --- /dev/null +++ b/gitea/models/edit_label_option.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'description': 'str', + 'exclusive': 'bool', + 'is_archived': 'bool', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'is_archived': 'is_archived', + 'name': 'name' + } + + def __init__(self, color=None, description=None, exclusive=None, is_archived=None, name=None, _configuration=None): # noqa: E501 + """EditLabelOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._is_archived = None + self._name = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if is_archived is not None: + self.is_archived = is_archived + 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 description(self): + """Gets the description of this EditLabelOption. # noqa: E501 + + + :return: The description of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditLabelOption. + + + :param description: The description of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this EditLabelOption. # noqa: E501 + + + :return: The exclusive of this EditLabelOption. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this EditLabelOption. + + + :param exclusive: The exclusive of this EditLabelOption. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @property + def is_archived(self): + """Gets the is_archived of this EditLabelOption. # noqa: E501 + + + :return: The is_archived of this EditLabelOption. # noqa: E501 + :rtype: bool + """ + return self._is_archived + + @is_archived.setter + def is_archived(self, is_archived): + """Sets the is_archived of this EditLabelOption. + + + :param is_archived: The is_archived of this EditLabelOption. # noqa: E501 + :type: bool + """ + + self._is_archived = is_archived + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditLabelOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_milestone_option.py b/gitea/models/edit_milestone_option.py new file mode 100644 index 0000000..faacb44 --- /dev/null +++ b/gitea/models/edit_milestone_option.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """EditMilestoneOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditMilestoneOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_org_option.py b/gitea/models/edit_org_option.py new file mode 100644 index 0000000..25b184f --- /dev/null +++ b/gitea/models/edit_org_option.py @@ -0,0 +1,288 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'repo_admin_change_team_access': 'bool', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, description=None, email=None, full_name=None, location=None, repo_admin_change_team_access=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """EditOrgOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._email = None + self._full_name = None + self._location = None + self._repo_admin_change_team_access = None + self._visibility = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + if visibility is not None: + self.visibility = visibility + 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 email(self): + """Gets the email of this EditOrgOption. # noqa: E501 + + + :return: The email of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this EditOrgOption. + + + :param email: The email of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._email = email + + @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 repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + + + :return: The repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this EditOrgOption. + + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def visibility(self): + """Gets the visibility of this EditOrgOption. # noqa: E501 + + possible values are `public`, `limited` or `private` # noqa: E501 + + :return: The visibility of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this EditOrgOption. + + possible values are `public`, `limited` or `private` # noqa: E501 + + :param visibility: The visibility of this EditOrgOption. # noqa: E501 + :type: str + """ + allowed_values = ["public", "limited", "private"] # noqa: E501 + if (self._configuration.client_side_validation and + visibility not in allowed_values): + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditOrgOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_pull_request_option.py b/gitea/models/edit_pull_request_option.py new file mode 100644 index 0000000..e5037cc --- /dev/null +++ b/gitea/models/edit_pull_request_option.py @@ -0,0 +1,383 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'allow_maintainer_edit': 'bool', + 'assignee': 'str', + 'assignees': 'list[str]', + 'base': 'str', + 'body': 'str', + 'due_date': 'datetime', + 'labels': 'list[int]', + 'milestone': 'int', + 'state': 'str', + 'title': 'str', + 'unset_due_date': 'bool' + } + + attribute_map = { + 'allow_maintainer_edit': 'allow_maintainer_edit', + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'state': 'state', + 'title': 'title', + 'unset_due_date': 'unset_due_date' + } + + def __init__(self, allow_maintainer_edit=None, assignee=None, assignees=None, base=None, body=None, due_date=None, labels=None, milestone=None, state=None, title=None, unset_due_date=None, _configuration=None): # noqa: E501 + """EditPullRequestOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_maintainer_edit = None + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._due_date = None + self._labels = None + self._milestone = None + self._state = None + self._title = None + self._unset_due_date = None + self.discriminator = None + + if allow_maintainer_edit is not None: + self.allow_maintainer_edit = allow_maintainer_edit + 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 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 + if unset_due_date is not None: + self.unset_due_date = unset_due_date + + @property + def allow_maintainer_edit(self): + """Gets the allow_maintainer_edit of this EditPullRequestOption. # noqa: E501 + + + :return: The allow_maintainer_edit of this EditPullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._allow_maintainer_edit + + @allow_maintainer_edit.setter + def allow_maintainer_edit(self, allow_maintainer_edit): + """Sets the allow_maintainer_edit of this EditPullRequestOption. + + + :param allow_maintainer_edit: The allow_maintainer_edit of this EditPullRequestOption. # noqa: E501 + :type: bool + """ + + self._allow_maintainer_edit = allow_maintainer_edit + + @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 base(self): + """Gets the base of this EditPullRequestOption. # noqa: E501 + + + :return: The base of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this EditPullRequestOption. + + + :param base: The base of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._base = base + + @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 + + @property + def unset_due_date(self): + """Gets the unset_due_date of this EditPullRequestOption. # noqa: E501 + + + :return: The unset_due_date of this EditPullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._unset_due_date + + @unset_due_date.setter + def unset_due_date(self, unset_due_date): + """Sets the unset_due_date of this EditPullRequestOption. + + + :param unset_due_date: The unset_due_date of this EditPullRequestOption. # noqa: E501 + :type: bool + """ + + self._unset_due_date = unset_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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditPullRequestOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_reaction_option.py b/gitea/models/edit_reaction_option.py new file mode 100644 index 0000000..f16a93c --- /dev/null +++ b/gitea/models/edit_reaction_option.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class EditReactionOption(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 = { + 'content': 'str' + } + + attribute_map = { + 'content': 'content' + } + + def __init__(self, content=None, _configuration=None): # noqa: E501 + """EditReactionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self.discriminator = None + + if content is not None: + self.content = content + + @property + def content(self): + """Gets the content of this EditReactionOption. # noqa: E501 + + + :return: The content of this EditReactionOption. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this EditReactionOption. + + + :param content: The content of this EditReactionOption. # noqa: E501 + :type: str + """ + + self._content = content + + 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(EditReactionOption, 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, EditReactionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditReactionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_release_option.py b/gitea/models/edit_release_option.py new file mode 100644 index 0000000..245eba7 --- /dev/null +++ b/gitea/models/edit_release_option.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """EditReleaseOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditReleaseOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_repo_option.py b/gitea/models/edit_repo_option.py new file mode 100644 index 0000000..210248d --- /dev/null +++ b/gitea/models/edit_repo_option.py @@ -0,0 +1,987 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class EditRepoOption(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 = { + 'allow_fast_forward_only_merge': 'bool', + 'allow_manual_merge': 'bool', + 'allow_merge_commits': 'bool', + 'allow_rebase': 'bool', + 'allow_rebase_explicit': 'bool', + 'allow_rebase_update': 'bool', + 'allow_squash_merge': 'bool', + 'archived': 'bool', + 'autodetect_manual_merge': 'bool', + 'default_allow_maintainer_edit': 'bool', + 'default_branch': 'str', + 'default_delete_branch_after_merge': 'bool', + 'default_merge_style': 'str', + 'description': 'str', + 'enable_prune': 'bool', + 'external_tracker': 'ExternalTracker', + 'external_wiki': 'ExternalWiki', + 'has_actions': 'bool', + 'has_issues': 'bool', + 'has_packages': 'bool', + 'has_projects': 'bool', + 'has_pull_requests': 'bool', + 'has_releases': 'bool', + 'has_wiki': 'bool', + 'ignore_whitespace_conflicts': 'bool', + 'internal_tracker': 'InternalTracker', + 'mirror_interval': 'str', + 'name': 'str', + 'private': 'bool', + 'projects_mode': 'str', + 'template': 'bool', + 'website': 'str' + } + + attribute_map = { + 'allow_fast_forward_only_merge': 'allow_fast_forward_only_merge', + 'allow_manual_merge': 'allow_manual_merge', + 'allow_merge_commits': 'allow_merge_commits', + 'allow_rebase': 'allow_rebase', + 'allow_rebase_explicit': 'allow_rebase_explicit', + 'allow_rebase_update': 'allow_rebase_update', + 'allow_squash_merge': 'allow_squash_merge', + 'archived': 'archived', + 'autodetect_manual_merge': 'autodetect_manual_merge', + 'default_allow_maintainer_edit': 'default_allow_maintainer_edit', + 'default_branch': 'default_branch', + 'default_delete_branch_after_merge': 'default_delete_branch_after_merge', + 'default_merge_style': 'default_merge_style', + 'description': 'description', + 'enable_prune': 'enable_prune', + 'external_tracker': 'external_tracker', + 'external_wiki': 'external_wiki', + 'has_actions': 'has_actions', + 'has_issues': 'has_issues', + 'has_packages': 'has_packages', + 'has_projects': 'has_projects', + 'has_pull_requests': 'has_pull_requests', + 'has_releases': 'has_releases', + 'has_wiki': 'has_wiki', + 'ignore_whitespace_conflicts': 'ignore_whitespace_conflicts', + 'internal_tracker': 'internal_tracker', + 'mirror_interval': 'mirror_interval', + 'name': 'name', + 'private': 'private', + 'projects_mode': 'projects_mode', + 'template': 'template', + 'website': 'website' + } + + def __init__(self, allow_fast_forward_only_merge=None, allow_manual_merge=None, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_rebase_update=None, allow_squash_merge=None, archived=None, autodetect_manual_merge=None, default_allow_maintainer_edit=None, default_branch=None, default_delete_branch_after_merge=None, default_merge_style=None, description=None, enable_prune=None, external_tracker=None, external_wiki=None, has_actions=None, has_issues=None, has_packages=None, has_projects=None, has_pull_requests=None, has_releases=None, has_wiki=None, ignore_whitespace_conflicts=None, internal_tracker=None, mirror_interval=None, name=None, private=None, projects_mode=None, template=None, website=None, _configuration=None): # noqa: E501 + """EditRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_fast_forward_only_merge = None + self._allow_manual_merge = None + self._allow_merge_commits = None + self._allow_rebase = None + self._allow_rebase_explicit = None + self._allow_rebase_update = None + self._allow_squash_merge = None + self._archived = None + self._autodetect_manual_merge = None + self._default_allow_maintainer_edit = None + self._default_branch = None + self._default_delete_branch_after_merge = None + self._default_merge_style = None + self._description = None + self._enable_prune = None + self._external_tracker = None + self._external_wiki = None + self._has_actions = None + self._has_issues = None + self._has_packages = None + self._has_projects = None + self._has_pull_requests = None + self._has_releases = None + self._has_wiki = None + self._ignore_whitespace_conflicts = None + self._internal_tracker = None + self._mirror_interval = None + self._name = None + self._private = None + self._projects_mode = None + self._template = None + self._website = None + self.discriminator = None + + if allow_fast_forward_only_merge is not None: + self.allow_fast_forward_only_merge = allow_fast_forward_only_merge + if allow_manual_merge is not None: + self.allow_manual_merge = allow_manual_merge + if allow_merge_commits is not None: + self.allow_merge_commits = allow_merge_commits + if allow_rebase is not None: + self.allow_rebase = allow_rebase + if allow_rebase_explicit is not None: + self.allow_rebase_explicit = allow_rebase_explicit + if allow_rebase_update is not None: + self.allow_rebase_update = allow_rebase_update + if allow_squash_merge is not None: + self.allow_squash_merge = allow_squash_merge + if archived is not None: + self.archived = archived + if autodetect_manual_merge is not None: + self.autodetect_manual_merge = autodetect_manual_merge + if default_allow_maintainer_edit is not None: + self.default_allow_maintainer_edit = default_allow_maintainer_edit + if default_branch is not None: + self.default_branch = default_branch + if default_delete_branch_after_merge is not None: + self.default_delete_branch_after_merge = default_delete_branch_after_merge + if default_merge_style is not None: + self.default_merge_style = default_merge_style + if description is not None: + self.description = description + if enable_prune is not None: + self.enable_prune = enable_prune + if external_tracker is not None: + self.external_tracker = external_tracker + if external_wiki is not None: + self.external_wiki = external_wiki + if has_actions is not None: + self.has_actions = has_actions + if has_issues is not None: + self.has_issues = has_issues + if has_packages is not None: + self.has_packages = has_packages + if has_projects is not None: + self.has_projects = has_projects + if has_pull_requests is not None: + self.has_pull_requests = has_pull_requests + if has_releases is not None: + self.has_releases = has_releases + if has_wiki is not None: + self.has_wiki = has_wiki + if ignore_whitespace_conflicts is not None: + self.ignore_whitespace_conflicts = ignore_whitespace_conflicts + if internal_tracker is not None: + self.internal_tracker = internal_tracker + if mirror_interval is not None: + self.mirror_interval = mirror_interval + if name is not None: + self.name = name + if private is not None: + self.private = private + if projects_mode is not None: + self.projects_mode = projects_mode + if template is not None: + self.template = template + if website is not None: + self.website = website + + @property + def allow_fast_forward_only_merge(self): + """Gets the allow_fast_forward_only_merge of this EditRepoOption. # noqa: E501 + + either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. # noqa: E501 + + :return: The allow_fast_forward_only_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_fast_forward_only_merge + + @allow_fast_forward_only_merge.setter + def allow_fast_forward_only_merge(self, allow_fast_forward_only_merge): + """Sets the allow_fast_forward_only_merge of this EditRepoOption. + + either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. # noqa: E501 + + :param allow_fast_forward_only_merge: The allow_fast_forward_only_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_fast_forward_only_merge = allow_fast_forward_only_merge + + @property + def allow_manual_merge(self): + """Gets the allow_manual_merge of this EditRepoOption. # noqa: E501 + + either `true` to allow mark pr as merged manually, or `false` to prevent it. # noqa: E501 + + :return: The allow_manual_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_manual_merge + + @allow_manual_merge.setter + def allow_manual_merge(self, allow_manual_merge): + """Sets the allow_manual_merge of this EditRepoOption. + + either `true` to allow mark pr as merged manually, or `false` to prevent it. # noqa: E501 + + :param allow_manual_merge: The allow_manual_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_manual_merge = allow_manual_merge + + @property + def allow_merge_commits(self): + """Gets the allow_merge_commits of this EditRepoOption. # noqa: E501 + + either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. # noqa: E501 + + :return: The allow_merge_commits of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_merge_commits + + @allow_merge_commits.setter + def allow_merge_commits(self, allow_merge_commits): + """Sets the allow_merge_commits of this EditRepoOption. + + either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. # noqa: E501 + + :param allow_merge_commits: The allow_merge_commits of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_merge_commits = allow_merge_commits + + @property + def allow_rebase(self): + """Gets the allow_rebase of this EditRepoOption. # noqa: E501 + + either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. # noqa: E501 + + :return: The allow_rebase of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase + + @allow_rebase.setter + def allow_rebase(self, allow_rebase): + """Sets the allow_rebase of this EditRepoOption. + + either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. # noqa: E501 + + :param allow_rebase: The allow_rebase of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase = allow_rebase + + @property + def allow_rebase_explicit(self): + """Gets the allow_rebase_explicit of this EditRepoOption. # noqa: E501 + + either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. # noqa: E501 + + :return: The allow_rebase_explicit of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_explicit + + @allow_rebase_explicit.setter + def allow_rebase_explicit(self, allow_rebase_explicit): + """Sets the allow_rebase_explicit of this EditRepoOption. + + either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. # noqa: E501 + + :param allow_rebase_explicit: The allow_rebase_explicit of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase_explicit = allow_rebase_explicit + + @property + def allow_rebase_update(self): + """Gets the allow_rebase_update of this EditRepoOption. # noqa: E501 + + either `true` to allow updating pull request branch by rebase, or `false` to prevent it. # noqa: E501 + + :return: The allow_rebase_update of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_update + + @allow_rebase_update.setter + def allow_rebase_update(self, allow_rebase_update): + """Sets the allow_rebase_update of this EditRepoOption. + + either `true` to allow updating pull request branch by rebase, or `false` to prevent it. # noqa: E501 + + :param allow_rebase_update: The allow_rebase_update of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase_update = allow_rebase_update + + @property + def allow_squash_merge(self): + """Gets the allow_squash_merge of this EditRepoOption. # noqa: E501 + + either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. # noqa: E501 + + :return: The allow_squash_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_squash_merge + + @allow_squash_merge.setter + def allow_squash_merge(self, allow_squash_merge): + """Sets the allow_squash_merge of this EditRepoOption. + + either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. # noqa: E501 + + :param allow_squash_merge: The allow_squash_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_squash_merge = allow_squash_merge + + @property + def archived(self): + """Gets the archived of this EditRepoOption. # noqa: E501 + + set to `true` to archive this repository. # noqa: E501 + + :return: The archived of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._archived + + @archived.setter + def archived(self, archived): + """Sets the archived of this EditRepoOption. + + set to `true` to archive this repository. # noqa: E501 + + :param archived: The archived of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._archived = archived + + @property + def autodetect_manual_merge(self): + """Gets the autodetect_manual_merge of this EditRepoOption. # noqa: E501 + + either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. # noqa: E501 + + :return: The autodetect_manual_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._autodetect_manual_merge + + @autodetect_manual_merge.setter + def autodetect_manual_merge(self, autodetect_manual_merge): + """Sets the autodetect_manual_merge of this EditRepoOption. + + either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. # noqa: E501 + + :param autodetect_manual_merge: The autodetect_manual_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._autodetect_manual_merge = autodetect_manual_merge + + @property + def default_allow_maintainer_edit(self): + """Gets the default_allow_maintainer_edit of this EditRepoOption. # noqa: E501 + + set to `true` to allow edits from maintainers by default # noqa: E501 + + :return: The default_allow_maintainer_edit of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._default_allow_maintainer_edit + + @default_allow_maintainer_edit.setter + def default_allow_maintainer_edit(self, default_allow_maintainer_edit): + """Sets the default_allow_maintainer_edit of this EditRepoOption. + + set to `true` to allow edits from maintainers by default # noqa: E501 + + :param default_allow_maintainer_edit: The default_allow_maintainer_edit of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._default_allow_maintainer_edit = default_allow_maintainer_edit + + @property + def default_branch(self): + """Gets the default_branch of this EditRepoOption. # noqa: E501 + + sets the default branch for this repository. # noqa: E501 + + :return: The default_branch of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this EditRepoOption. + + sets the default branch for this repository. # noqa: E501 + + :param default_branch: The default_branch of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def default_delete_branch_after_merge(self): + """Gets the default_delete_branch_after_merge of this EditRepoOption. # noqa: E501 + + set to `true` to delete pr branch after merge by default # noqa: E501 + + :return: The default_delete_branch_after_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._default_delete_branch_after_merge + + @default_delete_branch_after_merge.setter + def default_delete_branch_after_merge(self, default_delete_branch_after_merge): + """Sets the default_delete_branch_after_merge of this EditRepoOption. + + set to `true` to delete pr branch after merge by default # noqa: E501 + + :param default_delete_branch_after_merge: The default_delete_branch_after_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._default_delete_branch_after_merge = default_delete_branch_after_merge + + @property + def default_merge_style(self): + """Gets the default_merge_style of this EditRepoOption. # noqa: E501 + + set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\". # noqa: E501 + + :return: The default_merge_style of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_merge_style + + @default_merge_style.setter + def default_merge_style(self, default_merge_style): + """Sets the default_merge_style of this EditRepoOption. + + set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\". # noqa: E501 + + :param default_merge_style: The default_merge_style of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._default_merge_style = default_merge_style + + @property + def description(self): + """Gets the description of this EditRepoOption. # noqa: E501 + + a short description of the repository. # noqa: E501 + + :return: The description of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditRepoOption. + + a short description of the repository. # noqa: E501 + + :param description: The description of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def enable_prune(self): + """Gets the enable_prune of this EditRepoOption. # noqa: E501 + + enable prune - remove obsolete remote-tracking references when mirroring # noqa: E501 + + :return: The enable_prune of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._enable_prune + + @enable_prune.setter + def enable_prune(self, enable_prune): + """Sets the enable_prune of this EditRepoOption. + + enable prune - remove obsolete remote-tracking references when mirroring # noqa: E501 + + :param enable_prune: The enable_prune of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._enable_prune = enable_prune + + @property + def external_tracker(self): + """Gets the external_tracker of this EditRepoOption. # noqa: E501 + + + :return: The external_tracker of this EditRepoOption. # noqa: E501 + :rtype: ExternalTracker + """ + return self._external_tracker + + @external_tracker.setter + def external_tracker(self, external_tracker): + """Sets the external_tracker of this EditRepoOption. + + + :param external_tracker: The external_tracker of this EditRepoOption. # noqa: E501 + :type: ExternalTracker + """ + + self._external_tracker = external_tracker + + @property + def external_wiki(self): + """Gets the external_wiki of this EditRepoOption. # noqa: E501 + + + :return: The external_wiki of this EditRepoOption. # noqa: E501 + :rtype: ExternalWiki + """ + return self._external_wiki + + @external_wiki.setter + def external_wiki(self, external_wiki): + """Sets the external_wiki of this EditRepoOption. + + + :param external_wiki: The external_wiki of this EditRepoOption. # noqa: E501 + :type: ExternalWiki + """ + + self._external_wiki = external_wiki + + @property + def has_actions(self): + """Gets the has_actions of this EditRepoOption. # noqa: E501 + + either `true` to enable actions unit, or `false` to disable them. # noqa: E501 + + :return: The has_actions of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_actions + + @has_actions.setter + def has_actions(self, has_actions): + """Sets the has_actions of this EditRepoOption. + + either `true` to enable actions unit, or `false` to disable them. # noqa: E501 + + :param has_actions: The has_actions of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_actions = has_actions + + @property + def has_issues(self): + """Gets the has_issues of this EditRepoOption. # noqa: E501 + + either `true` to enable issues for this repository or `false` to disable them. # noqa: E501 + + :return: The has_issues of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_issues + + @has_issues.setter + def has_issues(self, has_issues): + """Sets the has_issues of this EditRepoOption. + + either `true` to enable issues for this repository or `false` to disable them. # noqa: E501 + + :param has_issues: The has_issues of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_issues = has_issues + + @property + def has_packages(self): + """Gets the has_packages of this EditRepoOption. # noqa: E501 + + either `true` to enable packages unit, or `false` to disable them. # noqa: E501 + + :return: The has_packages of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_packages + + @has_packages.setter + def has_packages(self, has_packages): + """Sets the has_packages of this EditRepoOption. + + either `true` to enable packages unit, or `false` to disable them. # noqa: E501 + + :param has_packages: The has_packages of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_packages = has_packages + + @property + def has_projects(self): + """Gets the has_projects of this EditRepoOption. # noqa: E501 + + either `true` to enable project unit, or `false` to disable them. # noqa: E501 + + :return: The has_projects of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_projects + + @has_projects.setter + def has_projects(self, has_projects): + """Sets the has_projects of this EditRepoOption. + + either `true` to enable project unit, or `false` to disable them. # noqa: E501 + + :param has_projects: The has_projects of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_projects = has_projects + + @property + def has_pull_requests(self): + """Gets the has_pull_requests of this EditRepoOption. # noqa: E501 + + either `true` to allow pull requests, or `false` to prevent pull request. # noqa: E501 + + :return: The has_pull_requests of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_pull_requests + + @has_pull_requests.setter + def has_pull_requests(self, has_pull_requests): + """Sets the has_pull_requests of this EditRepoOption. + + either `true` to allow pull requests, or `false` to prevent pull request. # noqa: E501 + + :param has_pull_requests: The has_pull_requests of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_pull_requests = has_pull_requests + + @property + def has_releases(self): + """Gets the has_releases of this EditRepoOption. # noqa: E501 + + either `true` to enable releases unit, or `false` to disable them. # noqa: E501 + + :return: The has_releases of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_releases + + @has_releases.setter + def has_releases(self, has_releases): + """Sets the has_releases of this EditRepoOption. + + either `true` to enable releases unit, or `false` to disable them. # noqa: E501 + + :param has_releases: The has_releases of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_releases = has_releases + + @property + def has_wiki(self): + """Gets the has_wiki of this EditRepoOption. # noqa: E501 + + either `true` to enable the wiki for this repository or `false` to disable it. # noqa: E501 + + :return: The has_wiki of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_wiki + + @has_wiki.setter + def has_wiki(self, has_wiki): + """Sets the has_wiki of this EditRepoOption. + + either `true` to enable the wiki for this repository or `false` to disable it. # noqa: E501 + + :param has_wiki: The has_wiki of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_wiki = has_wiki + + @property + def ignore_whitespace_conflicts(self): + """Gets the ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + + either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. # noqa: E501 + + :return: The ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._ignore_whitespace_conflicts + + @ignore_whitespace_conflicts.setter + def ignore_whitespace_conflicts(self, ignore_whitespace_conflicts): + """Sets the ignore_whitespace_conflicts of this EditRepoOption. + + either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. # noqa: E501 + + :param ignore_whitespace_conflicts: The ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._ignore_whitespace_conflicts = ignore_whitespace_conflicts + + @property + def internal_tracker(self): + """Gets the internal_tracker of this EditRepoOption. # noqa: E501 + + + :return: The internal_tracker of this EditRepoOption. # noqa: E501 + :rtype: InternalTracker + """ + return self._internal_tracker + + @internal_tracker.setter + def internal_tracker(self, internal_tracker): + """Sets the internal_tracker of this EditRepoOption. + + + :param internal_tracker: The internal_tracker of this EditRepoOption. # noqa: E501 + :type: InternalTracker + """ + + self._internal_tracker = internal_tracker + + @property + def mirror_interval(self): + """Gets the mirror_interval of this EditRepoOption. # noqa: E501 + + set to a string like `8h30m0s` to set the mirror interval time # noqa: E501 + + :return: The mirror_interval of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._mirror_interval + + @mirror_interval.setter + def mirror_interval(self, mirror_interval): + """Sets the mirror_interval of this EditRepoOption. + + set to a string like `8h30m0s` to set the mirror interval time # noqa: E501 + + :param mirror_interval: The mirror_interval of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._mirror_interval = mirror_interval + + @property + def name(self): + """Gets the name of this EditRepoOption. # noqa: E501 + + name of the repository # noqa: E501 + + :return: The name of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditRepoOption. + + name of the repository # noqa: E501 + + :param name: The name of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def private(self): + """Gets the private of this EditRepoOption. # noqa: E501 + + either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. # noqa: E501 + + :return: The private of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this EditRepoOption. + + either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. # noqa: E501 + + :param private: The private of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def projects_mode(self): + """Gets the projects_mode of this EditRepoOption. # noqa: E501 + + `repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both. # noqa: E501 + + :return: The projects_mode of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._projects_mode + + @projects_mode.setter + def projects_mode(self, projects_mode): + """Sets the projects_mode of this EditRepoOption. + + `repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both. # noqa: E501 + + :param projects_mode: The projects_mode of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._projects_mode = projects_mode + + @property + def template(self): + """Gets the template of this EditRepoOption. # noqa: E501 + + either `true` to make this repository a template or `false` to make it a normal repository # noqa: E501 + + :return: The template of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this EditRepoOption. + + either `true` to make this repository a template or `false` to make it a normal repository # noqa: E501 + + :param template: The template of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._template = template + + @property + def website(self): + """Gets the website of this EditRepoOption. # noqa: E501 + + a URL with more information about the repository. # noqa: E501 + + :return: The website of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditRepoOption. + + a URL with more information about the repository. # noqa: E501 + + :param website: The website of this EditRepoOption. # 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(EditRepoOption, 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, EditRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_tag_protection_option.py b/gitea/models/edit_tag_protection_option.py new file mode 100644 index 0000000..4c36249 --- /dev/null +++ b/gitea/models/edit_tag_protection_option.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class EditTagProtectionOption(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_pattern': 'str', + 'whitelist_teams': 'list[str]', + 'whitelist_usernames': 'list[str]' + } + + attribute_map = { + 'name_pattern': 'name_pattern', + 'whitelist_teams': 'whitelist_teams', + 'whitelist_usernames': 'whitelist_usernames' + } + + def __init__(self, name_pattern=None, whitelist_teams=None, whitelist_usernames=None, _configuration=None): # noqa: E501 + """EditTagProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name_pattern = None + self._whitelist_teams = None + self._whitelist_usernames = None + self.discriminator = None + + if name_pattern is not None: + self.name_pattern = name_pattern + if whitelist_teams is not None: + self.whitelist_teams = whitelist_teams + if whitelist_usernames is not None: + self.whitelist_usernames = whitelist_usernames + + @property + def name_pattern(self): + """Gets the name_pattern of this EditTagProtectionOption. # noqa: E501 + + + :return: The name_pattern of this EditTagProtectionOption. # noqa: E501 + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """Sets the name_pattern of this EditTagProtectionOption. + + + :param name_pattern: The name_pattern of this EditTagProtectionOption. # noqa: E501 + :type: str + """ + + self._name_pattern = name_pattern + + @property + def whitelist_teams(self): + """Gets the whitelist_teams of this EditTagProtectionOption. # noqa: E501 + + + :return: The whitelist_teams of this EditTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_teams + + @whitelist_teams.setter + def whitelist_teams(self, whitelist_teams): + """Sets the whitelist_teams of this EditTagProtectionOption. + + + :param whitelist_teams: The whitelist_teams of this EditTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_teams = whitelist_teams + + @property + def whitelist_usernames(self): + """Gets the whitelist_usernames of this EditTagProtectionOption. # noqa: E501 + + + :return: The whitelist_usernames of this EditTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_usernames + + @whitelist_usernames.setter + def whitelist_usernames(self, whitelist_usernames): + """Sets the whitelist_usernames of this EditTagProtectionOption. + + + :param whitelist_usernames: The whitelist_usernames of this EditTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_usernames = whitelist_usernames + + 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(EditTagProtectionOption, 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, EditTagProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditTagProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_team_option.py b/gitea/models/edit_team_option.py new file mode 100644 index 0000000..4fd9698 --- /dev/null +++ b/gitea/models/edit_team_option.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'can_create_org_repo': 'bool', + 'description': 'str', + 'includes_all_repositories': 'bool', + 'name': 'str', + 'permission': 'str', + 'units': 'list[str]', + 'units_map': 'dict(str, str)' + } + + attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', + 'description': 'description', + 'includes_all_repositories': 'includes_all_repositories', + 'name': 'name', + 'permission': 'permission', + 'units': 'units', + 'units_map': 'units_map' + } + + def __init__(self, can_create_org_repo=None, description=None, includes_all_repositories=None, name=None, permission=None, units=None, units_map=None, _configuration=None): # noqa: E501 + """EditTeamOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_org_repo = None + self._description = None + self._includes_all_repositories = None + self._name = None + self._permission = None + self._units = None + self._units_map = None + self.discriminator = None + + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo + if description is not None: + self.description = description + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories + self.name = name + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + if units_map is not None: + self.units_map = units_map + + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this EditTeamOption. # noqa: E501 + + + :return: The can_create_org_repo of this EditTeamOption. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this EditTeamOption. + + + :param can_create_org_repo: The can_create_org_repo of this EditTeamOption. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + + @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 includes_all_repositories(self): + """Gets the includes_all_repositories of this EditTeamOption. # noqa: E501 + + + :return: The includes_all_repositories of this EditTeamOption. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this EditTeamOption. + + + :param includes_all_repositories: The includes_all_repositories of this EditTeamOption. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + + @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 self._configuration.client_side_validation and 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 (self._configuration.client_side_validation and + 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 + + @property + def units_map(self): + """Gets the units_map of this EditTeamOption. # noqa: E501 + + + :return: The units_map of this EditTeamOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._units_map + + @units_map.setter + def units_map(self, units_map): + """Sets the units_map of this EditTeamOption. + + + :param units_map: The units_map of this EditTeamOption. # noqa: E501 + :type: dict(str, str) + """ + + self._units_map = units_map + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditTeamOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/edit_user_option.py b/gitea/models/edit_user_option.py new file mode 100644 index 0000000..91b5b83 --- /dev/null +++ b/gitea/models/edit_user_option.py @@ -0,0 +1,567 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'description': 'str', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'login_name': 'str', + 'max_repo_creation': 'int', + 'must_change_password': 'bool', + 'password': 'str', + 'prohibit_login': 'bool', + 'restricted': 'bool', + 'source_id': 'int', + 'visibility': 'str', + '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', + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'login_name': 'login_name', + 'max_repo_creation': 'max_repo_creation', + 'must_change_password': 'must_change_password', + 'password': 'password', + 'prohibit_login': 'prohibit_login', + 'restricted': 'restricted', + 'source_id': 'source_id', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, active=None, admin=None, allow_create_organization=None, allow_git_hook=None, allow_import_local=None, description=None, email=None, full_name=None, location=None, login_name=None, max_repo_creation=None, must_change_password=None, password=None, prohibit_login=None, restricted=None, source_id=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """EditUserOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._admin = None + self._allow_create_organization = None + self._allow_git_hook = None + self._allow_import_local = None + self._description = None + self._email = None + self._full_name = None + self._location = None + self._login_name = None + self._max_repo_creation = None + self._must_change_password = None + self._password = None + self._prohibit_login = None + self._restricted = None + self._source_id = None + self._visibility = 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 + if description is not None: + self.description = description + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + self.login_name = login_name + if max_repo_creation is not None: + self.max_repo_creation = max_repo_creation + if must_change_password is not None: + self.must_change_password = must_change_password + if password is not None: + self.password = password + if prohibit_login is not None: + self.prohibit_login = prohibit_login + if restricted is not None: + self.restricted = restricted + self.source_id = source_id + if visibility is not None: + self.visibility = visibility + 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 description(self): + """Gets the description of this EditUserOption. # noqa: E501 + + + :return: The description of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditUserOption. + + + :param description: The description of this EditUserOption. # noqa: E501 + :type: str + """ + + self._description = description + + @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 + """ + + 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 + """ + if self._configuration.client_side_validation and login_name is None: + raise ValueError("Invalid value for `login_name`, must not be `None`") # noqa: E501 + + 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 must_change_password(self): + """Gets the must_change_password of this EditUserOption. # noqa: E501 + + + :return: The must_change_password of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._must_change_password + + @must_change_password.setter + def must_change_password(self, must_change_password): + """Sets the must_change_password of this EditUserOption. + + + :param must_change_password: The must_change_password of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._must_change_password = must_change_password + + @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 restricted(self): + """Gets the restricted of this EditUserOption. # noqa: E501 + + + :return: The restricted of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._restricted + + @restricted.setter + def restricted(self, restricted): + """Sets the restricted of this EditUserOption. + + + :param restricted: The restricted of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._restricted = restricted + + @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 + """ + if self._configuration.client_side_validation and source_id is None: + raise ValueError("Invalid value for `source_id`, must not be `None`") # noqa: E501 + + self._source_id = source_id + + @property + def visibility(self): + """Gets the visibility of this EditUserOption. # noqa: E501 + + + :return: The visibility of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this EditUserOption. + + + :param visibility: The visibility of this EditUserOption. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditUserOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/email.py b/gitea/models/email.py new file mode 100644 index 0000000..b68b137 --- /dev/null +++ b/gitea/models/email.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'user_id': 'int', + 'username': 'str', + 'verified': 'bool' + } + + attribute_map = { + 'email': 'email', + 'primary': 'primary', + 'user_id': 'user_id', + 'username': 'username', + 'verified': 'verified' + } + + def __init__(self, email=None, primary=None, user_id=None, username=None, verified=None, _configuration=None): # noqa: E501 + """Email - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._primary = None + self._user_id = None + self._username = None + self._verified = None + self.discriminator = None + + if email is not None: + self.email = email + if primary is not None: + self.primary = primary + if user_id is not None: + self.user_id = user_id + if username is not None: + self.username = username + 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 user_id(self): + """Gets the user_id of this Email. # noqa: E501 + + + :return: The user_id of this Email. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Email. + + + :param user_id: The user_id of this Email. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def username(self): + """Gets the username of this Email. # noqa: E501 + + + :return: The username of this Email. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this Email. + + + :param username: The username of this Email. # noqa: E501 + :type: str + """ + + self._username = username + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Email): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/external_tracker.py b/gitea/models/external_tracker.py new file mode 100644 index 0000000..6952c23 --- /dev/null +++ b/gitea/models/external_tracker.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ExternalTracker(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 = { + 'external_tracker_format': 'str', + 'external_tracker_regexp_pattern': 'str', + 'external_tracker_style': 'str', + 'external_tracker_url': 'str' + } + + attribute_map = { + 'external_tracker_format': 'external_tracker_format', + 'external_tracker_regexp_pattern': 'external_tracker_regexp_pattern', + 'external_tracker_style': 'external_tracker_style', + 'external_tracker_url': 'external_tracker_url' + } + + def __init__(self, external_tracker_format=None, external_tracker_regexp_pattern=None, external_tracker_style=None, external_tracker_url=None, _configuration=None): # noqa: E501 + """ExternalTracker - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._external_tracker_format = None + self._external_tracker_regexp_pattern = None + self._external_tracker_style = None + self._external_tracker_url = None + self.discriminator = None + + if external_tracker_format is not None: + self.external_tracker_format = external_tracker_format + if external_tracker_regexp_pattern is not None: + self.external_tracker_regexp_pattern = external_tracker_regexp_pattern + if external_tracker_style is not None: + self.external_tracker_style = external_tracker_style + if external_tracker_url is not None: + self.external_tracker_url = external_tracker_url + + @property + def external_tracker_format(self): + """Gets the external_tracker_format of this ExternalTracker. # noqa: E501 + + External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. # noqa: E501 + + :return: The external_tracker_format of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_format + + @external_tracker_format.setter + def external_tracker_format(self, external_tracker_format): + """Sets the external_tracker_format of this ExternalTracker. + + External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. # noqa: E501 + + :param external_tracker_format: The external_tracker_format of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_format = external_tracker_format + + @property + def external_tracker_regexp_pattern(self): + """Gets the external_tracker_regexp_pattern of this ExternalTracker. # noqa: E501 + + External Issue Tracker issue regular expression # noqa: E501 + + :return: The external_tracker_regexp_pattern of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_regexp_pattern + + @external_tracker_regexp_pattern.setter + def external_tracker_regexp_pattern(self, external_tracker_regexp_pattern): + """Sets the external_tracker_regexp_pattern of this ExternalTracker. + + External Issue Tracker issue regular expression # noqa: E501 + + :param external_tracker_regexp_pattern: The external_tracker_regexp_pattern of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_regexp_pattern = external_tracker_regexp_pattern + + @property + def external_tracker_style(self): + """Gets the external_tracker_style of this ExternalTracker. # noqa: E501 + + External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` # noqa: E501 + + :return: The external_tracker_style of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_style + + @external_tracker_style.setter + def external_tracker_style(self, external_tracker_style): + """Sets the external_tracker_style of this ExternalTracker. + + External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` # noqa: E501 + + :param external_tracker_style: The external_tracker_style of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_style = external_tracker_style + + @property + def external_tracker_url(self): + """Gets the external_tracker_url of this ExternalTracker. # noqa: E501 + + URL of external issue tracker. # noqa: E501 + + :return: The external_tracker_url of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_url + + @external_tracker_url.setter + def external_tracker_url(self, external_tracker_url): + """Sets the external_tracker_url of this ExternalTracker. + + URL of external issue tracker. # noqa: E501 + + :param external_tracker_url: The external_tracker_url of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_url = external_tracker_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(ExternalTracker, 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, ExternalTracker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExternalTracker): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/external_wiki.py b/gitea/models/external_wiki.py new file mode 100644 index 0000000..64b2968 --- /dev/null +++ b/gitea/models/external_wiki.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ExternalWiki(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 = { + 'external_wiki_url': 'str' + } + + attribute_map = { + 'external_wiki_url': 'external_wiki_url' + } + + def __init__(self, external_wiki_url=None, _configuration=None): # noqa: E501 + """ExternalWiki - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._external_wiki_url = None + self.discriminator = None + + if external_wiki_url is not None: + self.external_wiki_url = external_wiki_url + + @property + def external_wiki_url(self): + """Gets the external_wiki_url of this ExternalWiki. # noqa: E501 + + URL of external wiki. # noqa: E501 + + :return: The external_wiki_url of this ExternalWiki. # noqa: E501 + :rtype: str + """ + return self._external_wiki_url + + @external_wiki_url.setter + def external_wiki_url(self, external_wiki_url): + """Sets the external_wiki_url of this ExternalWiki. + + URL of external wiki. # noqa: E501 + + :param external_wiki_url: The external_wiki_url of this ExternalWiki. # noqa: E501 + :type: str + """ + + self._external_wiki_url = external_wiki_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(ExternalWiki, 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, ExternalWiki): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExternalWiki): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/file_commit_response.py b/gitea/models/file_commit_response.py new file mode 100644 index 0000000..9793c77 --- /dev/null +++ b/gitea/models/file_commit_response.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class FileCommitResponse(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': 'CommitUser', + 'committer': 'CommitUser', + 'created': 'datetime', + 'html_url': 'str', + 'message': 'str', + 'parents': 'list[CommitMeta]', + 'sha': 'str', + 'tree': 'CommitMeta', + 'url': 'str' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer', + 'created': 'created', + 'html_url': 'html_url', + 'message': 'message', + 'parents': 'parents', + 'sha': 'sha', + 'tree': 'tree', + 'url': 'url' + } + + def __init__(self, author=None, committer=None, created=None, html_url=None, message=None, parents=None, sha=None, tree=None, url=None, _configuration=None): # noqa: E501 + """FileCommitResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._committer = None + self._created = None + self._html_url = None + self._message = None + self._parents = None + self._sha = None + self._tree = None + self._url = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if created is not None: + self.created = created + if html_url is not None: + self.html_url = html_url + if message is not None: + self.message = message + if parents is not None: + self.parents = parents + if sha is not None: + self.sha = sha + if tree is not None: + self.tree = tree + if url is not None: + self.url = url + + @property + def author(self): + """Gets the author of this FileCommitResponse. # noqa: E501 + + + :return: The author of this FileCommitResponse. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this FileCommitResponse. + + + :param author: The author of this FileCommitResponse. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this FileCommitResponse. # noqa: E501 + + + :return: The committer of this FileCommitResponse. # noqa: E501 + :rtype: CommitUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this FileCommitResponse. + + + :param committer: The committer of this FileCommitResponse. # noqa: E501 + :type: CommitUser + """ + + self._committer = committer + + @property + def created(self): + """Gets the created of this FileCommitResponse. # noqa: E501 + + + :return: The created of this FileCommitResponse. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this FileCommitResponse. + + + :param created: The created of this FileCommitResponse. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def html_url(self): + """Gets the html_url of this FileCommitResponse. # noqa: E501 + + + :return: The html_url of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this FileCommitResponse. + + + :param html_url: The html_url of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def message(self): + """Gets the message of this FileCommitResponse. # noqa: E501 + + + :return: The message of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FileCommitResponse. + + + :param message: The message of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def parents(self): + """Gets the parents of this FileCommitResponse. # noqa: E501 + + + :return: The parents of this FileCommitResponse. # noqa: E501 + :rtype: list[CommitMeta] + """ + return self._parents + + @parents.setter + def parents(self, parents): + """Sets the parents of this FileCommitResponse. + + + :param parents: The parents of this FileCommitResponse. # noqa: E501 + :type: list[CommitMeta] + """ + + self._parents = parents + + @property + def sha(self): + """Gets the sha of this FileCommitResponse. # noqa: E501 + + + :return: The sha of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this FileCommitResponse. + + + :param sha: The sha of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def tree(self): + """Gets the tree of this FileCommitResponse. # noqa: E501 + + + :return: The tree of this FileCommitResponse. # noqa: E501 + :rtype: CommitMeta + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this FileCommitResponse. + + + :param tree: The tree of this FileCommitResponse. # noqa: E501 + :type: CommitMeta + """ + + self._tree = tree + + @property + def url(self): + """Gets the url of this FileCommitResponse. # noqa: E501 + + + :return: The url of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this FileCommitResponse. + + + :param url: The url of this FileCommitResponse. # 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(FileCommitResponse, 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, FileCommitResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileCommitResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/file_delete_response.py b/gitea/models/file_delete_response.py new file mode 100644 index 0000000..a1c3e82 --- /dev/null +++ b/gitea/models/file_delete_response.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class FileDeleteResponse(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': 'FileCommitResponse', + 'content': 'object', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'content': 'content', + 'verification': 'verification' + } + + def __init__(self, commit=None, content=None, verification=None, _configuration=None): # noqa: E501 + """FileDeleteResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._content = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if content is not None: + self.content = content + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FileDeleteResponse. # noqa: E501 + + + :return: The commit of this FileDeleteResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FileDeleteResponse. + + + :param commit: The commit of this FileDeleteResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def content(self): + """Gets the content of this FileDeleteResponse. # noqa: E501 + + + :return: The content of this FileDeleteResponse. # noqa: E501 + :rtype: object + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this FileDeleteResponse. + + + :param content: The content of this FileDeleteResponse. # noqa: E501 + :type: object + """ + + self._content = content + + @property + def verification(self): + """Gets the verification of this FileDeleteResponse. # noqa: E501 + + + :return: The verification of this FileDeleteResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FileDeleteResponse. + + + :param verification: The verification of this FileDeleteResponse. # 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(FileDeleteResponse, 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, FileDeleteResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileDeleteResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/file_links_response.py b/gitea/models/file_links_response.py new file mode 100644 index 0000000..e5f250e --- /dev/null +++ b/gitea/models/file_links_response.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class FileLinksResponse(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 = { + 'git': 'str', + 'html': 'str', + '_self': 'str' + } + + attribute_map = { + 'git': 'git', + 'html': 'html', + '_self': 'self' + } + + def __init__(self, git=None, html=None, _self=None, _configuration=None): # noqa: E501 + """FileLinksResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._git = None + self._html = None + self.__self = None + self.discriminator = None + + if git is not None: + self.git = git + if html is not None: + self.html = html + if _self is not None: + self._self = _self + + @property + def git(self): + """Gets the git of this FileLinksResponse. # noqa: E501 + + + :return: The git of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self._git + + @git.setter + def git(self, git): + """Sets the git of this FileLinksResponse. + + + :param git: The git of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self._git = git + + @property + def html(self): + """Gets the html of this FileLinksResponse. # noqa: E501 + + + :return: The html of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this FileLinksResponse. + + + :param html: The html of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self._html = html + + @property + def _self(self): + """Gets the _self of this FileLinksResponse. # noqa: E501 + + + :return: The _self of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self.__self + + @_self.setter + def _self(self, _self): + """Sets the _self of this FileLinksResponse. + + + :param _self: The _self of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self.__self = _self + + 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(FileLinksResponse, 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, FileLinksResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileLinksResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/file_response.py b/gitea/models/file_response.py new file mode 100644 index 0000000..aa99a27 --- /dev/null +++ b/gitea/models/file_response.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class FileResponse(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': 'FileCommitResponse', + 'content': 'ContentsResponse', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'content': 'content', + 'verification': 'verification' + } + + def __init__(self, commit=None, content=None, verification=None, _configuration=None): # noqa: E501 + """FileResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._content = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if content is not None: + self.content = content + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FileResponse. # noqa: E501 + + + :return: The commit of this FileResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FileResponse. + + + :param commit: The commit of this FileResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def content(self): + """Gets the content of this FileResponse. # noqa: E501 + + + :return: The content of this FileResponse. # noqa: E501 + :rtype: ContentsResponse + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this FileResponse. + + + :param content: The content of this FileResponse. # noqa: E501 + :type: ContentsResponse + """ + + self._content = content + + @property + def verification(self): + """Gets the verification of this FileResponse. # noqa: E501 + + + :return: The verification of this FileResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FileResponse. + + + :param verification: The verification of this FileResponse. # 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(FileResponse, 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, FileResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/files_response.py b/gitea/models/files_response.py new file mode 100644 index 0000000..34697ad --- /dev/null +++ b/gitea/models/files_response.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class FilesResponse(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': 'FileCommitResponse', + 'files': 'list[ContentsResponse]', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'files': 'files', + 'verification': 'verification' + } + + def __init__(self, commit=None, files=None, verification=None, _configuration=None): # noqa: E501 + """FilesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._files = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if files is not None: + self.files = files + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FilesResponse. # noqa: E501 + + + :return: The commit of this FilesResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FilesResponse. + + + :param commit: The commit of this FilesResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def files(self): + """Gets the files of this FilesResponse. # noqa: E501 + + + :return: The files of this FilesResponse. # noqa: E501 + :rtype: list[ContentsResponse] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this FilesResponse. + + + :param files: The files of this FilesResponse. # noqa: E501 + :type: list[ContentsResponse] + """ + + self._files = files + + @property + def verification(self): + """Gets the verification of this FilesResponse. # noqa: E501 + + + :return: The verification of this FilesResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FilesResponse. + + + :param verification: The verification of this FilesResponse. # 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(FilesResponse, 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, FilesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FilesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/general_api_settings.py b/gitea/models/general_api_settings.py new file mode 100644 index 0000000..552f634 --- /dev/null +++ b/gitea/models/general_api_settings.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GeneralAPISettings(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 = { + 'default_git_trees_per_page': 'int', + 'default_max_blob_size': 'int', + 'default_paging_num': 'int', + 'max_response_items': 'int' + } + + attribute_map = { + 'default_git_trees_per_page': 'default_git_trees_per_page', + 'default_max_blob_size': 'default_max_blob_size', + 'default_paging_num': 'default_paging_num', + 'max_response_items': 'max_response_items' + } + + def __init__(self, default_git_trees_per_page=None, default_max_blob_size=None, default_paging_num=None, max_response_items=None, _configuration=None): # noqa: E501 + """GeneralAPISettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._default_git_trees_per_page = None + self._default_max_blob_size = None + self._default_paging_num = None + self._max_response_items = None + self.discriminator = None + + if default_git_trees_per_page is not None: + self.default_git_trees_per_page = default_git_trees_per_page + if default_max_blob_size is not None: + self.default_max_blob_size = default_max_blob_size + if default_paging_num is not None: + self.default_paging_num = default_paging_num + if max_response_items is not None: + self.max_response_items = max_response_items + + @property + def default_git_trees_per_page(self): + """Gets the default_git_trees_per_page of this GeneralAPISettings. # noqa: E501 + + + :return: The default_git_trees_per_page of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._default_git_trees_per_page + + @default_git_trees_per_page.setter + def default_git_trees_per_page(self, default_git_trees_per_page): + """Sets the default_git_trees_per_page of this GeneralAPISettings. + + + :param default_git_trees_per_page: The default_git_trees_per_page of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._default_git_trees_per_page = default_git_trees_per_page + + @property + def default_max_blob_size(self): + """Gets the default_max_blob_size of this GeneralAPISettings. # noqa: E501 + + + :return: The default_max_blob_size of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._default_max_blob_size + + @default_max_blob_size.setter + def default_max_blob_size(self, default_max_blob_size): + """Sets the default_max_blob_size of this GeneralAPISettings. + + + :param default_max_blob_size: The default_max_blob_size of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._default_max_blob_size = default_max_blob_size + + @property + def default_paging_num(self): + """Gets the default_paging_num of this GeneralAPISettings. # noqa: E501 + + + :return: The default_paging_num of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._default_paging_num + + @default_paging_num.setter + def default_paging_num(self, default_paging_num): + """Sets the default_paging_num of this GeneralAPISettings. + + + :param default_paging_num: The default_paging_num of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._default_paging_num = default_paging_num + + @property + def max_response_items(self): + """Gets the max_response_items of this GeneralAPISettings. # noqa: E501 + + + :return: The max_response_items of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._max_response_items + + @max_response_items.setter + def max_response_items(self, max_response_items): + """Sets the max_response_items of this GeneralAPISettings. + + + :param max_response_items: The max_response_items of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._max_response_items = max_response_items + + 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(GeneralAPISettings, 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, GeneralAPISettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralAPISettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/general_attachment_settings.py b/gitea/models/general_attachment_settings.py new file mode 100644 index 0000000..9a32cb8 --- /dev/null +++ b/gitea/models/general_attachment_settings.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GeneralAttachmentSettings(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 = { + 'allowed_types': 'str', + 'enabled': 'bool', + 'max_files': 'int', + 'max_size': 'int' + } + + attribute_map = { + 'allowed_types': 'allowed_types', + 'enabled': 'enabled', + 'max_files': 'max_files', + 'max_size': 'max_size' + } + + def __init__(self, allowed_types=None, enabled=None, max_files=None, max_size=None, _configuration=None): # noqa: E501 + """GeneralAttachmentSettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allowed_types = None + self._enabled = None + self._max_files = None + self._max_size = None + self.discriminator = None + + if allowed_types is not None: + self.allowed_types = allowed_types + if enabled is not None: + self.enabled = enabled + if max_files is not None: + self.max_files = max_files + if max_size is not None: + self.max_size = max_size + + @property + def allowed_types(self): + """Gets the allowed_types of this GeneralAttachmentSettings. # noqa: E501 + + + :return: The allowed_types of this GeneralAttachmentSettings. # noqa: E501 + :rtype: str + """ + return self._allowed_types + + @allowed_types.setter + def allowed_types(self, allowed_types): + """Sets the allowed_types of this GeneralAttachmentSettings. + + + :param allowed_types: The allowed_types of this GeneralAttachmentSettings. # noqa: E501 + :type: str + """ + + self._allowed_types = allowed_types + + @property + def enabled(self): + """Gets the enabled of this GeneralAttachmentSettings. # noqa: E501 + + + :return: The enabled of this GeneralAttachmentSettings. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this GeneralAttachmentSettings. + + + :param enabled: The enabled of this GeneralAttachmentSettings. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def max_files(self): + """Gets the max_files of this GeneralAttachmentSettings. # noqa: E501 + + + :return: The max_files of this GeneralAttachmentSettings. # noqa: E501 + :rtype: int + """ + return self._max_files + + @max_files.setter + def max_files(self, max_files): + """Sets the max_files of this GeneralAttachmentSettings. + + + :param max_files: The max_files of this GeneralAttachmentSettings. # noqa: E501 + :type: int + """ + + self._max_files = max_files + + @property + def max_size(self): + """Gets the max_size of this GeneralAttachmentSettings. # noqa: E501 + + + :return: The max_size of this GeneralAttachmentSettings. # noqa: E501 + :rtype: int + """ + return self._max_size + + @max_size.setter + def max_size(self, max_size): + """Sets the max_size of this GeneralAttachmentSettings. + + + :param max_size: The max_size of this GeneralAttachmentSettings. # noqa: E501 + :type: int + """ + + self._max_size = max_size + + 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(GeneralAttachmentSettings, 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, GeneralAttachmentSettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralAttachmentSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/general_repo_settings.py b/gitea/models/general_repo_settings.py new file mode 100644 index 0000000..6ec3c1e --- /dev/null +++ b/gitea/models/general_repo_settings.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GeneralRepoSettings(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 = { + 'http_git_disabled': 'bool', + 'lfs_disabled': 'bool', + 'migrations_disabled': 'bool', + 'mirrors_disabled': 'bool', + 'stars_disabled': 'bool', + 'time_tracking_disabled': 'bool' + } + + attribute_map = { + 'http_git_disabled': 'http_git_disabled', + 'lfs_disabled': 'lfs_disabled', + 'migrations_disabled': 'migrations_disabled', + 'mirrors_disabled': 'mirrors_disabled', + 'stars_disabled': 'stars_disabled', + 'time_tracking_disabled': 'time_tracking_disabled' + } + + def __init__(self, http_git_disabled=None, lfs_disabled=None, migrations_disabled=None, mirrors_disabled=None, stars_disabled=None, time_tracking_disabled=None, _configuration=None): # noqa: E501 + """GeneralRepoSettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._http_git_disabled = None + self._lfs_disabled = None + self._migrations_disabled = None + self._mirrors_disabled = None + self._stars_disabled = None + self._time_tracking_disabled = None + self.discriminator = None + + if http_git_disabled is not None: + self.http_git_disabled = http_git_disabled + if lfs_disabled is not None: + self.lfs_disabled = lfs_disabled + if migrations_disabled is not None: + self.migrations_disabled = migrations_disabled + if mirrors_disabled is not None: + self.mirrors_disabled = mirrors_disabled + if stars_disabled is not None: + self.stars_disabled = stars_disabled + if time_tracking_disabled is not None: + self.time_tracking_disabled = time_tracking_disabled + + @property + def http_git_disabled(self): + """Gets the http_git_disabled of this GeneralRepoSettings. # noqa: E501 + + + :return: The http_git_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._http_git_disabled + + @http_git_disabled.setter + def http_git_disabled(self, http_git_disabled): + """Sets the http_git_disabled of this GeneralRepoSettings. + + + :param http_git_disabled: The http_git_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._http_git_disabled = http_git_disabled + + @property + def lfs_disabled(self): + """Gets the lfs_disabled of this GeneralRepoSettings. # noqa: E501 + + + :return: The lfs_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._lfs_disabled + + @lfs_disabled.setter + def lfs_disabled(self, lfs_disabled): + """Sets the lfs_disabled of this GeneralRepoSettings. + + + :param lfs_disabled: The lfs_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._lfs_disabled = lfs_disabled + + @property + def migrations_disabled(self): + """Gets the migrations_disabled of this GeneralRepoSettings. # noqa: E501 + + + :return: The migrations_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._migrations_disabled + + @migrations_disabled.setter + def migrations_disabled(self, migrations_disabled): + """Sets the migrations_disabled of this GeneralRepoSettings. + + + :param migrations_disabled: The migrations_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._migrations_disabled = migrations_disabled + + @property + def mirrors_disabled(self): + """Gets the mirrors_disabled of this GeneralRepoSettings. # noqa: E501 + + + :return: The mirrors_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._mirrors_disabled + + @mirrors_disabled.setter + def mirrors_disabled(self, mirrors_disabled): + """Sets the mirrors_disabled of this GeneralRepoSettings. + + + :param mirrors_disabled: The mirrors_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._mirrors_disabled = mirrors_disabled + + @property + def stars_disabled(self): + """Gets the stars_disabled of this GeneralRepoSettings. # noqa: E501 + + + :return: The stars_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._stars_disabled + + @stars_disabled.setter + def stars_disabled(self, stars_disabled): + """Sets the stars_disabled of this GeneralRepoSettings. + + + :param stars_disabled: The stars_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._stars_disabled = stars_disabled + + @property + def time_tracking_disabled(self): + """Gets the time_tracking_disabled of this GeneralRepoSettings. # noqa: E501 + + + :return: The time_tracking_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._time_tracking_disabled + + @time_tracking_disabled.setter + def time_tracking_disabled(self, time_tracking_disabled): + """Sets the time_tracking_disabled of this GeneralRepoSettings. + + + :param time_tracking_disabled: The time_tracking_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._time_tracking_disabled = time_tracking_disabled + + 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(GeneralRepoSettings, 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, GeneralRepoSettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralRepoSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/general_ui_settings.py b/gitea/models/general_ui_settings.py new file mode 100644 index 0000000..c445369 --- /dev/null +++ b/gitea/models/general_ui_settings.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GeneralUISettings(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 = { + 'allowed_reactions': 'list[str]', + 'custom_emojis': 'list[str]', + 'default_theme': 'str' + } + + attribute_map = { + 'allowed_reactions': 'allowed_reactions', + 'custom_emojis': 'custom_emojis', + 'default_theme': 'default_theme' + } + + def __init__(self, allowed_reactions=None, custom_emojis=None, default_theme=None, _configuration=None): # noqa: E501 + """GeneralUISettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allowed_reactions = None + self._custom_emojis = None + self._default_theme = None + self.discriminator = None + + if allowed_reactions is not None: + self.allowed_reactions = allowed_reactions + if custom_emojis is not None: + self.custom_emojis = custom_emojis + if default_theme is not None: + self.default_theme = default_theme + + @property + def allowed_reactions(self): + """Gets the allowed_reactions of this GeneralUISettings. # noqa: E501 + + + :return: The allowed_reactions of this GeneralUISettings. # noqa: E501 + :rtype: list[str] + """ + return self._allowed_reactions + + @allowed_reactions.setter + def allowed_reactions(self, allowed_reactions): + """Sets the allowed_reactions of this GeneralUISettings. + + + :param allowed_reactions: The allowed_reactions of this GeneralUISettings. # noqa: E501 + :type: list[str] + """ + + self._allowed_reactions = allowed_reactions + + @property + def custom_emojis(self): + """Gets the custom_emojis of this GeneralUISettings. # noqa: E501 + + + :return: The custom_emojis of this GeneralUISettings. # noqa: E501 + :rtype: list[str] + """ + return self._custom_emojis + + @custom_emojis.setter + def custom_emojis(self, custom_emojis): + """Sets the custom_emojis of this GeneralUISettings. + + + :param custom_emojis: The custom_emojis of this GeneralUISettings. # noqa: E501 + :type: list[str] + """ + + self._custom_emojis = custom_emojis + + @property + def default_theme(self): + """Gets the default_theme of this GeneralUISettings. # noqa: E501 + + + :return: The default_theme of this GeneralUISettings. # noqa: E501 + :rtype: str + """ + return self._default_theme + + @default_theme.setter + def default_theme(self, default_theme): + """Sets the default_theme of this GeneralUISettings. + + + :param default_theme: The default_theme of this GeneralUISettings. # noqa: E501 + :type: str + """ + + self._default_theme = default_theme + + 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(GeneralUISettings, 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, GeneralUISettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralUISettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/generate_repo_option.py b/gitea/models/generate_repo_option.py new file mode 100644 index 0000000..5159a30 --- /dev/null +++ b/gitea/models/generate_repo_option.py @@ -0,0 +1,435 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GenerateRepoOption(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': 'bool', + 'default_branch': 'str', + 'description': 'str', + 'git_content': 'bool', + 'git_hooks': 'bool', + 'labels': 'bool', + 'name': 'str', + 'owner': 'str', + 'private': 'bool', + 'protected_branch': 'bool', + 'topics': 'bool', + 'webhooks': 'bool' + } + + attribute_map = { + 'avatar': 'avatar', + 'default_branch': 'default_branch', + 'description': 'description', + 'git_content': 'git_content', + 'git_hooks': 'git_hooks', + 'labels': 'labels', + 'name': 'name', + 'owner': 'owner', + 'private': 'private', + 'protected_branch': 'protected_branch', + 'topics': 'topics', + 'webhooks': 'webhooks' + } + + def __init__(self, avatar=None, default_branch=None, description=None, git_content=None, git_hooks=None, labels=None, name=None, owner=None, private=None, protected_branch=None, topics=None, webhooks=None, _configuration=None): # noqa: E501 + """GenerateRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._avatar = None + self._default_branch = None + self._description = None + self._git_content = None + self._git_hooks = None + self._labels = None + self._name = None + self._owner = None + self._private = None + self._protected_branch = None + self._topics = None + self._webhooks = None + self.discriminator = None + + if avatar is not None: + self.avatar = avatar + if default_branch is not None: + self.default_branch = default_branch + if description is not None: + self.description = description + if git_content is not None: + self.git_content = git_content + if git_hooks is not None: + self.git_hooks = git_hooks + if labels is not None: + self.labels = labels + self.name = name + self.owner = owner + if private is not None: + self.private = private + if protected_branch is not None: + self.protected_branch = protected_branch + if topics is not None: + self.topics = topics + if webhooks is not None: + self.webhooks = webhooks + + @property + def avatar(self): + """Gets the avatar of this GenerateRepoOption. # noqa: E501 + + include avatar of the template repo # noqa: E501 + + :return: The avatar of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._avatar + + @avatar.setter + def avatar(self, avatar): + """Sets the avatar of this GenerateRepoOption. + + include avatar of the template repo # noqa: E501 + + :param avatar: The avatar of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._avatar = avatar + + @property + def default_branch(self): + """Gets the default_branch of this GenerateRepoOption. # noqa: E501 + + Default branch of the new repository # noqa: E501 + + :return: The default_branch of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this GenerateRepoOption. + + Default branch of the new repository # noqa: E501 + + :param default_branch: The default_branch of this GenerateRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def description(self): + """Gets the description of this GenerateRepoOption. # noqa: E501 + + Description of the repository to create # noqa: E501 + + :return: The description of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this GenerateRepoOption. + + Description of the repository to create # noqa: E501 + + :param description: The description of this GenerateRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def git_content(self): + """Gets the git_content of this GenerateRepoOption. # noqa: E501 + + include git content of default branch in template repo # noqa: E501 + + :return: The git_content of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._git_content + + @git_content.setter + def git_content(self, git_content): + """Sets the git_content of this GenerateRepoOption. + + include git content of default branch in template repo # noqa: E501 + + :param git_content: The git_content of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._git_content = git_content + + @property + def git_hooks(self): + """Gets the git_hooks of this GenerateRepoOption. # noqa: E501 + + include git hooks in template repo # noqa: E501 + + :return: The git_hooks of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._git_hooks + + @git_hooks.setter + def git_hooks(self, git_hooks): + """Sets the git_hooks of this GenerateRepoOption. + + include git hooks in template repo # noqa: E501 + + :param git_hooks: The git_hooks of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._git_hooks = git_hooks + + @property + def labels(self): + """Gets the labels of this GenerateRepoOption. # noqa: E501 + + include labels in template repo # noqa: E501 + + :return: The labels of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this GenerateRepoOption. + + include labels in template repo # noqa: E501 + + :param labels: The labels of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._labels = labels + + @property + def name(self): + """Gets the name of this GenerateRepoOption. # noqa: E501 + + Name of the repository to create # noqa: E501 + + :return: The name of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GenerateRepoOption. + + Name of the repository to create # noqa: E501 + + :param name: The name of this GenerateRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def owner(self): + """Gets the owner of this GenerateRepoOption. # noqa: E501 + + The organization or person who will own the new repository # noqa: E501 + + :return: The owner of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this GenerateRepoOption. + + The organization or person who will own the new repository # noqa: E501 + + :param owner: The owner of this GenerateRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 + + self._owner = owner + + @property + def private(self): + """Gets the private of this GenerateRepoOption. # noqa: E501 + + Whether the repository is private # noqa: E501 + + :return: The private of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this GenerateRepoOption. + + Whether the repository is private # noqa: E501 + + :param private: The private of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def protected_branch(self): + """Gets the protected_branch of this GenerateRepoOption. # noqa: E501 + + include protected branches in template repo # noqa: E501 + + :return: The protected_branch of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._protected_branch + + @protected_branch.setter + def protected_branch(self, protected_branch): + """Sets the protected_branch of this GenerateRepoOption. + + include protected branches in template repo # noqa: E501 + + :param protected_branch: The protected_branch of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._protected_branch = protected_branch + + @property + def topics(self): + """Gets the topics of this GenerateRepoOption. # noqa: E501 + + include topics in template repo # noqa: E501 + + :return: The topics of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this GenerateRepoOption. + + include topics in template repo # noqa: E501 + + :param topics: The topics of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._topics = topics + + @property + def webhooks(self): + """Gets the webhooks of this GenerateRepoOption. # noqa: E501 + + include webhooks in template repo # noqa: E501 + + :return: The webhooks of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._webhooks + + @webhooks.setter + def webhooks(self, webhooks): + """Sets the webhooks of this GenerateRepoOption. + + include webhooks in template repo # noqa: E501 + + :param webhooks: The webhooks of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._webhooks = webhooks + + 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(GenerateRepoOption, 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, GenerateRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GenerateRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/git_blob_response.py b/gitea/models/git_blob_response.py new file mode 100644 index 0000000..73add53 --- /dev/null +++ b/gitea/models/git_blob_response.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GitBlobResponse(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 = { + 'content': 'str', + 'encoding': 'str', + 'sha': 'str', + 'size': 'int', + 'url': 'str' + } + + attribute_map = { + 'content': 'content', + 'encoding': 'encoding', + 'sha': 'sha', + 'size': 'size', + 'url': 'url' + } + + def __init__(self, content=None, encoding=None, sha=None, size=None, url=None, _configuration=None): # noqa: E501 + """GitBlobResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._encoding = None + self._sha = None + self._size = None + self._url = None + self.discriminator = None + + if content is not None: + self.content = content + if encoding is not None: + self.encoding = encoding + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if url is not None: + self.url = url + + @property + def content(self): + """Gets the content of this GitBlobResponse. # noqa: E501 + + + :return: The content of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this GitBlobResponse. + + + :param content: The content of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def encoding(self): + """Gets the encoding of this GitBlobResponse. # noqa: E501 + + + :return: The encoding of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._encoding + + @encoding.setter + def encoding(self, encoding): + """Sets the encoding of this GitBlobResponse. + + + :param encoding: The encoding of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._encoding = encoding + + @property + def sha(self): + """Gets the sha of this GitBlobResponse. # noqa: E501 + + + :return: The sha of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitBlobResponse. + + + :param sha: The sha of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this GitBlobResponse. # noqa: E501 + + + :return: The size of this GitBlobResponse. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this GitBlobResponse. + + + :param size: The size of this GitBlobResponse. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def url(self): + """Gets the url of this GitBlobResponse. # noqa: E501 + + + :return: The url of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitBlobResponse. + + + :param url: The url of this GitBlobResponse. # 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(GitBlobResponse, 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, GitBlobResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitBlobResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/git_entry.py b/gitea/models/git_entry.py new file mode 100644 index 0000000..4ca683e --- /dev/null +++ b/gitea/models/git_entry.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """GitEntry - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitEntry): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/git_hook.py b/gitea/models/git_hook.py new file mode 100644 index 0000000..9943c89 --- /dev/null +++ b/gitea/models/git_hook.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GitHook(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 = { + 'content': 'str', + 'is_active': 'bool', + 'name': 'str' + } + + attribute_map = { + 'content': 'content', + 'is_active': 'is_active', + 'name': 'name' + } + + def __init__(self, content=None, is_active=None, name=None, _configuration=None): # noqa: E501 + """GitHook - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._is_active = None + self._name = None + self.discriminator = None + + if content is not None: + self.content = content + if is_active is not None: + self.is_active = is_active + if name is not None: + self.name = name + + @property + def content(self): + """Gets the content of this GitHook. # noqa: E501 + + + :return: The content of this GitHook. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this GitHook. + + + :param content: The content of this GitHook. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def is_active(self): + """Gets the is_active of this GitHook. # noqa: E501 + + + :return: The is_active of this GitHook. # noqa: E501 + :rtype: bool + """ + return self._is_active + + @is_active.setter + def is_active(self, is_active): + """Sets the is_active of this GitHook. + + + :param is_active: The is_active of this GitHook. # noqa: E501 + :type: bool + """ + + self._is_active = is_active + + @property + def name(self): + """Gets the name of this GitHook. # noqa: E501 + + + :return: The name of this GitHook. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GitHook. + + + :param name: The name of this GitHook. # 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(GitHook, 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, GitHook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitHook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/git_object.py b/gitea/models/git_object.py new file mode 100644 index 0000000..5f02ffb --- /dev/null +++ b/gitea/models/git_object.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """GitObject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/git_tree_response.py b/gitea/models/git_tree_response.py new file mode 100644 index 0000000..325bb35 --- /dev/null +++ b/gitea/models/git_tree_response.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'page': 'int', + 'sha': 'str', + 'total_count': 'int', + 'tree': 'list[GitEntry]', + 'truncated': 'bool', + 'url': 'str' + } + + attribute_map = { + 'page': 'page', + 'sha': 'sha', + 'total_count': 'total_count', + 'tree': 'tree', + 'truncated': 'truncated', + 'url': 'url' + } + + def __init__(self, page=None, sha=None, total_count=None, tree=None, truncated=None, url=None, _configuration=None): # noqa: E501 + """GitTreeResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._page = None + self._sha = None + self._total_count = None + self._tree = None + self._truncated = None + self._url = None + self.discriminator = None + + if page is not None: + self.page = page + if sha is not None: + self.sha = sha + if total_count is not None: + self.total_count = total_count + 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 page(self): + """Gets the page of this GitTreeResponse. # noqa: E501 + + + :return: The page of this GitTreeResponse. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this GitTreeResponse. + + + :param page: The page of this GitTreeResponse. # noqa: E501 + :type: int + """ + + self._page = page + + @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 total_count(self): + """Gets the total_count of this GitTreeResponse. # noqa: E501 + + + :return: The total_count of this GitTreeResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this GitTreeResponse. + + + :param total_count: The total_count of this GitTreeResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitTreeResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/gitignore_template_info.py b/gitea/models/gitignore_template_info.py new file mode 100644 index 0000000..9b0404b --- /dev/null +++ b/gitea/models/gitignore_template_info.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class GitignoreTemplateInfo(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', + 'source': 'str' + } + + attribute_map = { + 'name': 'name', + 'source': 'source' + } + + def __init__(self, name=None, source=None, _configuration=None): # noqa: E501 + """GitignoreTemplateInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._source = None + self.discriminator = None + + if name is not None: + self.name = name + if source is not None: + self.source = source + + @property + def name(self): + """Gets the name of this GitignoreTemplateInfo. # noqa: E501 + + + :return: The name of this GitignoreTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GitignoreTemplateInfo. + + + :param name: The name of this GitignoreTemplateInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def source(self): + """Gets the source of this GitignoreTemplateInfo. # noqa: E501 + + + :return: The source of this GitignoreTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this GitignoreTemplateInfo. + + + :param source: The source of this GitignoreTemplateInfo. # noqa: E501 + :type: str + """ + + self._source = source + + 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(GitignoreTemplateInfo, 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, GitignoreTemplateInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitignoreTemplateInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/gpg_key.py b/gitea/models/gpg_key.py new file mode 100644 index 0000000..706a427 --- /dev/null +++ b/gitea/models/gpg_key.py @@ -0,0 +1,435 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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]', + 'verified': 'bool' + } + + 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', + 'verified': 'verified' + } + + 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, verified=None, _configuration=None): # noqa: E501 + """GPGKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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._verified = 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 + if verified is not None: + self.verified = verified + + @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 + + @property + def verified(self): + """Gets the verified of this GPGKey. # noqa: E501 + + + :return: The verified of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this GPGKey. + + + :param verified: The verified of this GPGKey. # 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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GPGKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/gpg_key_email.py b/gitea/models/gpg_key_email.py new file mode 100644 index 0000000..fdf2649 --- /dev/null +++ b/gitea/models/gpg_key_email.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """GPGKeyEmail - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GPGKeyEmail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/hook.py b/gitea/models/hook.py new file mode 100644 index 0000000..ea09551 --- /dev/null +++ b/gitea/models/hook.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Hook(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', + 'authorization_header': 'str', + 'branch_filter': 'str', + 'config': 'dict(str, str)', + 'created_at': 'datetime', + 'events': 'list[str]', + 'id': 'int', + 'type': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'active': 'active', + 'authorization_header': 'authorization_header', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'created_at': 'created_at', + 'events': 'events', + 'id': 'id', + 'type': 'type', + 'updated_at': 'updated_at' + } + + def __init__(self, active=None, authorization_header=None, branch_filter=None, config=None, created_at=None, events=None, id=None, type=None, updated_at=None, _configuration=None): # noqa: E501 + """Hook - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._authorization_header = None + self._branch_filter = None + self._config = None + self._created_at = None + self._events = None + self._id = None + self._type = None + self._updated_at = None + self.discriminator = None + + if active is not None: + self.active = active + if authorization_header is not None: + self.authorization_header = authorization_header + if branch_filter is not None: + self.branch_filter = branch_filter + if config is not None: + self.config = config + if created_at is not None: + self.created_at = created_at + if events is not None: + self.events = events + if id is not None: + self.id = id + if type is not None: + self.type = type + if updated_at is not None: + self.updated_at = updated_at + + @property + def active(self): + """Gets the active of this Hook. # noqa: E501 + + + :return: The active of this Hook. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this Hook. + + + :param active: The active of this Hook. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def authorization_header(self): + """Gets the authorization_header of this Hook. # noqa: E501 + + + :return: The authorization_header of this Hook. # noqa: E501 + :rtype: str + """ + return self._authorization_header + + @authorization_header.setter + def authorization_header(self, authorization_header): + """Sets the authorization_header of this Hook. + + + :param authorization_header: The authorization_header of this Hook. # noqa: E501 + :type: str + """ + + self._authorization_header = authorization_header + + @property + def branch_filter(self): + """Gets the branch_filter of this Hook. # noqa: E501 + + + :return: The branch_filter of this Hook. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this Hook. + + + :param branch_filter: The branch_filter of this Hook. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @property + def config(self): + """Gets the config of this Hook. # noqa: E501 + + + :return: The config of this Hook. # noqa: E501 + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this Hook. + + + :param config: The config of this Hook. # noqa: E501 + :type: dict(str, str) + """ + + self._config = config + + @property + def created_at(self): + """Gets the created_at of this Hook. # noqa: E501 + + + :return: The created_at of this Hook. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Hook. + + + :param created_at: The created_at of this Hook. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def events(self): + """Gets the events of this Hook. # noqa: E501 + + + :return: The events of this Hook. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this Hook. + + + :param events: The events of this Hook. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def id(self): + """Gets the id of this Hook. # noqa: E501 + + + :return: The id of this Hook. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Hook. + + + :param id: The id of this Hook. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def type(self): + """Gets the type of this Hook. # noqa: E501 + + + :return: The type of this Hook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Hook. + + + :param type: The type of this Hook. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def updated_at(self): + """Gets the updated_at of this Hook. # noqa: E501 + + + :return: The updated_at of this Hook. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Hook. + + + :param updated_at: The updated_at of this Hook. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_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(Hook, 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, Hook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Hook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/identity.py b/gitea/models/identity.py new file mode 100644 index 0000000..ab0d06f --- /dev/null +++ b/gitea/models/identity.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Identity(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' + } + + attribute_map = { + 'email': 'email', + 'name': 'name' + } + + def __init__(self, email=None, name=None, _configuration=None): # noqa: E501 + """Identity - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._name = None + self.discriminator = None + + if email is not None: + self.email = email + if name is not None: + self.name = name + + @property + def email(self): + """Gets the email of this Identity. # noqa: E501 + + + :return: The email of this Identity. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Identity. + + + :param email: The email of this Identity. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this Identity. # noqa: E501 + + + :return: The name of this Identity. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Identity. + + + :param name: The name of this Identity. # 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(Identity, 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, Identity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Identity): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/inline_response200.py b/gitea/models/inline_response200.py new file mode 100644 index 0000000..346afc1 --- /dev/null +++ b/gitea/models/inline_response200.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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[Team]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None, _configuration=None): # noqa: E501 + """InlineResponse200 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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[Team] + """ + 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[Team] + """ + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineResponse200): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/inline_response2001.py b/gitea/models/inline_response2001.py new file mode 100644 index 0000000..a40ee92 --- /dev/null +++ b/gitea/models/inline_response2001.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class InlineResponse2001(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, _configuration=None): # noqa: E501 + """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 InlineResponse2001. # noqa: E501 + + + :return: The data of this InlineResponse2001. # noqa: E501 + :rtype: list[User] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse2001. + + + :param data: The data of this InlineResponse2001. # noqa: E501 + :type: list[User] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this InlineResponse2001. # noqa: E501 + + + :return: The ok of this InlineResponse2001. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this InlineResponse2001. + + + :param ok: The ok of this InlineResponse2001. # 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(InlineResponse2001, 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, InlineResponse2001): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineResponse2001): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/internal_tracker.py b/gitea/models/internal_tracker.py new file mode 100644 index 0000000..b126a39 --- /dev/null +++ b/gitea/models/internal_tracker.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class InternalTracker(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 = { + 'allow_only_contributors_to_track_time': 'bool', + 'enable_issue_dependencies': 'bool', + 'enable_time_tracker': 'bool' + } + + attribute_map = { + 'allow_only_contributors_to_track_time': 'allow_only_contributors_to_track_time', + 'enable_issue_dependencies': 'enable_issue_dependencies', + 'enable_time_tracker': 'enable_time_tracker' + } + + def __init__(self, allow_only_contributors_to_track_time=None, enable_issue_dependencies=None, enable_time_tracker=None, _configuration=None): # noqa: E501 + """InternalTracker - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_only_contributors_to_track_time = None + self._enable_issue_dependencies = None + self._enable_time_tracker = None + self.discriminator = None + + if allow_only_contributors_to_track_time is not None: + self.allow_only_contributors_to_track_time = allow_only_contributors_to_track_time + if enable_issue_dependencies is not None: + self.enable_issue_dependencies = enable_issue_dependencies + if enable_time_tracker is not None: + self.enable_time_tracker = enable_time_tracker + + @property + def allow_only_contributors_to_track_time(self): + """Gets the allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + + Let only contributors track time (Built-in issue tracker) # noqa: E501 + + :return: The allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._allow_only_contributors_to_track_time + + @allow_only_contributors_to_track_time.setter + def allow_only_contributors_to_track_time(self, allow_only_contributors_to_track_time): + """Sets the allow_only_contributors_to_track_time of this InternalTracker. + + Let only contributors track time (Built-in issue tracker) # noqa: E501 + + :param allow_only_contributors_to_track_time: The allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._allow_only_contributors_to_track_time = allow_only_contributors_to_track_time + + @property + def enable_issue_dependencies(self): + """Gets the enable_issue_dependencies of this InternalTracker. # noqa: E501 + + Enable dependencies for issues and pull requests (Built-in issue tracker) # noqa: E501 + + :return: The enable_issue_dependencies of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._enable_issue_dependencies + + @enable_issue_dependencies.setter + def enable_issue_dependencies(self, enable_issue_dependencies): + """Sets the enable_issue_dependencies of this InternalTracker. + + Enable dependencies for issues and pull requests (Built-in issue tracker) # noqa: E501 + + :param enable_issue_dependencies: The enable_issue_dependencies of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._enable_issue_dependencies = enable_issue_dependencies + + @property + def enable_time_tracker(self): + """Gets the enable_time_tracker of this InternalTracker. # noqa: E501 + + Enable time tracking (Built-in issue tracker) # noqa: E501 + + :return: The enable_time_tracker of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._enable_time_tracker + + @enable_time_tracker.setter + def enable_time_tracker(self, enable_time_tracker): + """Sets the enable_time_tracker of this InternalTracker. + + Enable time tracking (Built-in issue tracker) # noqa: E501 + + :param enable_time_tracker: The enable_time_tracker of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._enable_time_tracker = enable_time_tracker + + 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(InternalTracker, 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, InternalTracker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InternalTracker): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue.py b/gitea/models/issue.py new file mode 100644 index 0000000..74d6874 --- /dev/null +++ b/gitea/models/issue.py @@ -0,0 +1,747 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'assets': 'list[Attachment]', + 'assignee': 'User', + 'assignees': 'list[User]', + 'body': 'str', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'due_date': 'datetime', + 'html_url': 'str', + 'id': 'int', + 'is_locked': 'bool', + 'labels': 'list[Label]', + 'milestone': 'Milestone', + 'number': 'int', + 'original_author': 'str', + 'original_author_id': 'int', + 'pin_order': 'int', + 'pull_request': 'PullRequestMeta', + 'ref': 'str', + 'repository': 'RepositoryMeta', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'assets': 'assets', + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'due_date': 'due_date', + 'html_url': 'html_url', + 'id': 'id', + 'is_locked': 'is_locked', + 'labels': 'labels', + 'milestone': 'milestone', + 'number': 'number', + 'original_author': 'original_author', + 'original_author_id': 'original_author_id', + 'pin_order': 'pin_order', + 'pull_request': 'pull_request', + 'ref': 'ref', + 'repository': 'repository', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, assets=None, assignee=None, assignees=None, body=None, closed_at=None, comments=None, created_at=None, due_date=None, html_url=None, id=None, is_locked=None, labels=None, milestone=None, number=None, original_author=None, original_author_id=None, pin_order=None, pull_request=None, ref=None, repository=None, state=None, title=None, updated_at=None, url=None, user=None, _configuration=None): # noqa: E501 + """Issue - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assets = None + 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._html_url = None + self._id = None + self._is_locked = None + self._labels = None + self._milestone = None + self._number = None + self._original_author = None + self._original_author_id = None + self._pin_order = None + self._pull_request = None + self._ref = None + self._repository = None + self._state = None + self._title = None + self._updated_at = None + self._url = None + self._user = None + self.discriminator = None + + if assets is not None: + self.assets = assets + 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 html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if is_locked is not None: + self.is_locked = is_locked + 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 original_author is not None: + self.original_author = original_author + if original_author_id is not None: + self.original_author_id = original_author_id + if pin_order is not None: + self.pin_order = pin_order + if pull_request is not None: + self.pull_request = pull_request + if ref is not None: + self.ref = ref + if repository is not None: + self.repository = repository + 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 assets(self): + """Gets the assets of this Issue. # noqa: E501 + + + :return: The assets of this Issue. # noqa: E501 + :rtype: list[Attachment] + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this Issue. + + + :param assets: The assets of this Issue. # noqa: E501 + :type: list[Attachment] + """ + + self._assets = assets + + @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 html_url(self): + """Gets the html_url of this Issue. # noqa: E501 + + + :return: The html_url of this Issue. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Issue. + + + :param html_url: The html_url of this Issue. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @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 is_locked(self): + """Gets the is_locked of this Issue. # noqa: E501 + + + :return: The is_locked of this Issue. # noqa: E501 + :rtype: bool + """ + return self._is_locked + + @is_locked.setter + def is_locked(self, is_locked): + """Sets the is_locked of this Issue. + + + :param is_locked: The is_locked of this Issue. # noqa: E501 + :type: bool + """ + + self._is_locked = is_locked + + @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 original_author(self): + """Gets the original_author of this Issue. # noqa: E501 + + + :return: The original_author of this Issue. # noqa: E501 + :rtype: str + """ + return self._original_author + + @original_author.setter + def original_author(self, original_author): + """Sets the original_author of this Issue. + + + :param original_author: The original_author of this Issue. # noqa: E501 + :type: str + """ + + self._original_author = original_author + + @property + def original_author_id(self): + """Gets the original_author_id of this Issue. # noqa: E501 + + + :return: The original_author_id of this Issue. # noqa: E501 + :rtype: int + """ + return self._original_author_id + + @original_author_id.setter + def original_author_id(self, original_author_id): + """Sets the original_author_id of this Issue. + + + :param original_author_id: The original_author_id of this Issue. # noqa: E501 + :type: int + """ + + self._original_author_id = original_author_id + + @property + def pin_order(self): + """Gets the pin_order of this Issue. # noqa: E501 + + + :return: The pin_order of this Issue. # noqa: E501 + :rtype: int + """ + return self._pin_order + + @pin_order.setter + def pin_order(self, pin_order): + """Sets the pin_order of this Issue. + + + :param pin_order: The pin_order of this Issue. # noqa: E501 + :type: int + """ + + self._pin_order = pin_order + + @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 ref(self): + """Gets the ref of this Issue. # noqa: E501 + + + :return: The ref of this Issue. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this Issue. + + + :param ref: The ref of this Issue. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def repository(self): + """Gets the repository of this Issue. # noqa: E501 + + + :return: The repository of this Issue. # noqa: E501 + :rtype: RepositoryMeta + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this Issue. + + + :param repository: The repository of this Issue. # noqa: E501 + :type: RepositoryMeta + """ + + self._repository = repository + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Issue): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_config.py b/gitea/models/issue_config.py new file mode 100644 index 0000000..ccc7cf1 --- /dev/null +++ b/gitea/models/issue_config.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueConfig(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 = { + 'blank_issues_enabled': 'bool', + 'contact_links': 'list[IssueConfigContactLink]' + } + + attribute_map = { + 'blank_issues_enabled': 'blank_issues_enabled', + 'contact_links': 'contact_links' + } + + def __init__(self, blank_issues_enabled=None, contact_links=None, _configuration=None): # noqa: E501 + """IssueConfig - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._blank_issues_enabled = None + self._contact_links = None + self.discriminator = None + + if blank_issues_enabled is not None: + self.blank_issues_enabled = blank_issues_enabled + if contact_links is not None: + self.contact_links = contact_links + + @property + def blank_issues_enabled(self): + """Gets the blank_issues_enabled of this IssueConfig. # noqa: E501 + + + :return: The blank_issues_enabled of this IssueConfig. # noqa: E501 + :rtype: bool + """ + return self._blank_issues_enabled + + @blank_issues_enabled.setter + def blank_issues_enabled(self, blank_issues_enabled): + """Sets the blank_issues_enabled of this IssueConfig. + + + :param blank_issues_enabled: The blank_issues_enabled of this IssueConfig. # noqa: E501 + :type: bool + """ + + self._blank_issues_enabled = blank_issues_enabled + + @property + def contact_links(self): + """Gets the contact_links of this IssueConfig. # noqa: E501 + + + :return: The contact_links of this IssueConfig. # noqa: E501 + :rtype: list[IssueConfigContactLink] + """ + return self._contact_links + + @contact_links.setter + def contact_links(self, contact_links): + """Sets the contact_links of this IssueConfig. + + + :param contact_links: The contact_links of this IssueConfig. # noqa: E501 + :type: list[IssueConfigContactLink] + """ + + self._contact_links = contact_links + + 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(IssueConfig, 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, IssueConfig): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_config_contact_link.py b/gitea/models/issue_config_contact_link.py new file mode 100644 index 0000000..2060d74 --- /dev/null +++ b/gitea/models/issue_config_contact_link.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueConfigContactLink(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 = { + 'about': 'str', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'about': 'about', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, about=None, name=None, url=None, _configuration=None): # noqa: E501 + """IssueConfigContactLink - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._about = None + self._name = None + self._url = None + self.discriminator = None + + if about is not None: + self.about = about + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def about(self): + """Gets the about of this IssueConfigContactLink. # noqa: E501 + + + :return: The about of this IssueConfigContactLink. # noqa: E501 + :rtype: str + """ + return self._about + + @about.setter + def about(self, about): + """Sets the about of this IssueConfigContactLink. + + + :param about: The about of this IssueConfigContactLink. # noqa: E501 + :type: str + """ + + self._about = about + + @property + def name(self): + """Gets the name of this IssueConfigContactLink. # noqa: E501 + + + :return: The name of this IssueConfigContactLink. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this IssueConfigContactLink. + + + :param name: The name of this IssueConfigContactLink. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this IssueConfigContactLink. # noqa: E501 + + + :return: The url of this IssueConfigContactLink. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this IssueConfigContactLink. + + + :param url: The url of this IssueConfigContactLink. # 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(IssueConfigContactLink, 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, IssueConfigContactLink): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueConfigContactLink): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_config_validation.py b/gitea/models/issue_config_validation.py new file mode 100644 index 0000000..1fbaf42 --- /dev/null +++ b/gitea/models/issue_config_validation.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueConfigValidation(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 = { + 'message': 'str', + 'valid': 'bool' + } + + attribute_map = { + 'message': 'message', + 'valid': 'valid' + } + + def __init__(self, message=None, valid=None, _configuration=None): # noqa: E501 + """IssueConfigValidation - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._valid = None + self.discriminator = None + + if message is not None: + self.message = message + if valid is not None: + self.valid = valid + + @property + def message(self): + """Gets the message of this IssueConfigValidation. # noqa: E501 + + + :return: The message of this IssueConfigValidation. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this IssueConfigValidation. + + + :param message: The message of this IssueConfigValidation. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def valid(self): + """Gets the valid of this IssueConfigValidation. # noqa: E501 + + + :return: The valid of this IssueConfigValidation. # noqa: E501 + :rtype: bool + """ + return self._valid + + @valid.setter + def valid(self, valid): + """Sets the valid of this IssueConfigValidation. + + + :param valid: The valid of this IssueConfigValidation. # noqa: E501 + :type: bool + """ + + self._valid = valid + + 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(IssueConfigValidation, 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, IssueConfigValidation): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueConfigValidation): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_deadline.py b/gitea/models/issue_deadline.py new file mode 100644 index 0000000..f62b551 --- /dev/null +++ b/gitea/models/issue_deadline.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """IssueDeadline - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueDeadline): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_form_field.py b/gitea/models/issue_form_field.py new file mode 100644 index 0000000..2f5d433 --- /dev/null +++ b/gitea/models/issue_form_field.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueFormField(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 = { + 'attributes': 'dict(str, object)', + 'id': 'str', + 'type': 'IssueFormFieldType', + 'validations': 'dict(str, object)', + 'visible': 'list[IssueFormFieldVisible]' + } + + attribute_map = { + 'attributes': 'attributes', + 'id': 'id', + 'type': 'type', + 'validations': 'validations', + 'visible': 'visible' + } + + def __init__(self, attributes=None, id=None, type=None, validations=None, visible=None, _configuration=None): # noqa: E501 + """IssueFormField - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._attributes = None + self._id = None + self._type = None + self._validations = None + self._visible = None + self.discriminator = None + + if attributes is not None: + self.attributes = attributes + if id is not None: + self.id = id + if type is not None: + self.type = type + if validations is not None: + self.validations = validations + if visible is not None: + self.visible = visible + + @property + def attributes(self): + """Gets the attributes of this IssueFormField. # noqa: E501 + + + :return: The attributes of this IssueFormField. # noqa: E501 + :rtype: dict(str, object) + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this IssueFormField. + + + :param attributes: The attributes of this IssueFormField. # noqa: E501 + :type: dict(str, object) + """ + + self._attributes = attributes + + @property + def id(self): + """Gets the id of this IssueFormField. # noqa: E501 + + + :return: The id of this IssueFormField. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this IssueFormField. + + + :param id: The id of this IssueFormField. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def type(self): + """Gets the type of this IssueFormField. # noqa: E501 + + + :return: The type of this IssueFormField. # noqa: E501 + :rtype: IssueFormFieldType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this IssueFormField. + + + :param type: The type of this IssueFormField. # noqa: E501 + :type: IssueFormFieldType + """ + + self._type = type + + @property + def validations(self): + """Gets the validations of this IssueFormField. # noqa: E501 + + + :return: The validations of this IssueFormField. # noqa: E501 + :rtype: dict(str, object) + """ + return self._validations + + @validations.setter + def validations(self, validations): + """Sets the validations of this IssueFormField. + + + :param validations: The validations of this IssueFormField. # noqa: E501 + :type: dict(str, object) + """ + + self._validations = validations + + @property + def visible(self): + """Gets the visible of this IssueFormField. # noqa: E501 + + + :return: The visible of this IssueFormField. # noqa: E501 + :rtype: list[IssueFormFieldVisible] + """ + return self._visible + + @visible.setter + def visible(self, visible): + """Sets the visible of this IssueFormField. + + + :param visible: The visible of this IssueFormField. # noqa: E501 + :type: list[IssueFormFieldVisible] + """ + + self._visible = visible + + 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(IssueFormField, 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, IssueFormField): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueFormField): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_form_field_type.py b/gitea/models/issue_form_field_type.py new file mode 100644 index 0000000..9b72df9 --- /dev/null +++ b/gitea/models/issue_form_field_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueFormFieldType(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, _configuration=None): # noqa: E501 + """IssueFormFieldType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(IssueFormFieldType, 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, IssueFormFieldType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueFormFieldType): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_form_field_visible.py b/gitea/models/issue_form_field_visible.py new file mode 100644 index 0000000..838df4b --- /dev/null +++ b/gitea/models/issue_form_field_visible.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueFormFieldVisible(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, _configuration=None): # noqa: E501 + """IssueFormFieldVisible - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(IssueFormFieldVisible, 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, IssueFormFieldVisible): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueFormFieldVisible): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_labels_option.py b/gitea/models/issue_labels_option.py new file mode 100644 index 0000000..9ad0070 --- /dev/null +++ b/gitea/models/issue_labels_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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[object]' + } + + attribute_map = { + 'labels': 'labels' + } + + def __init__(self, labels=None, _configuration=None): # noqa: E501 + """IssueLabelsOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 + + Labels can be a list of integers representing label IDs or a list of strings representing label names # noqa: E501 + + :return: The labels of this IssueLabelsOption. # noqa: E501 + :rtype: list[object] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this IssueLabelsOption. + + Labels can be a list of integers representing label IDs or a list of strings representing label names # noqa: E501 + + :param labels: The labels of this IssueLabelsOption. # noqa: E501 + :type: list[object] + """ + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueLabelsOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_meta.py b/gitea/models/issue_meta.py new file mode 100644 index 0000000..140e15f --- /dev/null +++ b/gitea/models/issue_meta.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueMeta(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 = { + 'index': 'int', + 'owner': 'str', + 'repo': 'str' + } + + attribute_map = { + 'index': 'index', + 'owner': 'owner', + 'repo': 'repo' + } + + def __init__(self, index=None, owner=None, repo=None, _configuration=None): # noqa: E501 + """IssueMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._index = None + self._owner = None + self._repo = None + self.discriminator = None + + if index is not None: + self.index = index + if owner is not None: + self.owner = owner + if repo is not None: + self.repo = repo + + @property + def index(self): + """Gets the index of this IssueMeta. # noqa: E501 + + + :return: The index of this IssueMeta. # noqa: E501 + :rtype: int + """ + return self._index + + @index.setter + def index(self, index): + """Sets the index of this IssueMeta. + + + :param index: The index of this IssueMeta. # noqa: E501 + :type: int + """ + + self._index = index + + @property + def owner(self): + """Gets the owner of this IssueMeta. # noqa: E501 + + + :return: The owner of this IssueMeta. # noqa: E501 + :rtype: str + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this IssueMeta. + + + :param owner: The owner of this IssueMeta. # noqa: E501 + :type: str + """ + + self._owner = owner + + @property + def repo(self): + """Gets the repo of this IssueMeta. # noqa: E501 + + + :return: The repo of this IssueMeta. # noqa: E501 + :rtype: str + """ + return self._repo + + @repo.setter + def repo(self, repo): + """Sets the repo of this IssueMeta. + + + :param repo: The repo of this IssueMeta. # noqa: E501 + :type: str + """ + + self._repo = repo + + 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(IssueMeta, 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, IssueMeta): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_template.py b/gitea/models/issue_template.py new file mode 100644 index 0000000..65bfebd --- /dev/null +++ b/gitea/models/issue_template.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueTemplate(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 = { + 'about': 'str', + 'assignees': 'IssueTemplateStringSlice', + 'body': 'list[IssueFormField]', + 'content': 'str', + 'file_name': 'str', + 'labels': 'IssueTemplateStringSlice', + 'name': 'str', + 'ref': 'str', + 'title': 'str' + } + + attribute_map = { + 'about': 'about', + 'assignees': 'assignees', + 'body': 'body', + 'content': 'content', + 'file_name': 'file_name', + 'labels': 'labels', + 'name': 'name', + 'ref': 'ref', + 'title': 'title' + } + + def __init__(self, about=None, assignees=None, body=None, content=None, file_name=None, labels=None, name=None, ref=None, title=None, _configuration=None): # noqa: E501 + """IssueTemplate - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._about = None + self._assignees = None + self._body = None + self._content = None + self._file_name = None + self._labels = None + self._name = None + self._ref = None + self._title = None + self.discriminator = None + + if about is not None: + self.about = about + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if content is not None: + self.content = content + if file_name is not None: + self.file_name = file_name + if labels is not None: + self.labels = labels + if name is not None: + self.name = name + if ref is not None: + self.ref = ref + if title is not None: + self.title = title + + @property + def about(self): + """Gets the about of this IssueTemplate. # noqa: E501 + + + :return: The about of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._about + + @about.setter + def about(self, about): + """Sets the about of this IssueTemplate. + + + :param about: The about of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._about = about + + @property + def assignees(self): + """Gets the assignees of this IssueTemplate. # noqa: E501 + + + :return: The assignees of this IssueTemplate. # noqa: E501 + :rtype: IssueTemplateStringSlice + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this IssueTemplate. + + + :param assignees: The assignees of this IssueTemplate. # noqa: E501 + :type: IssueTemplateStringSlice + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this IssueTemplate. # noqa: E501 + + + :return: The body of this IssueTemplate. # noqa: E501 + :rtype: list[IssueFormField] + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this IssueTemplate. + + + :param body: The body of this IssueTemplate. # noqa: E501 + :type: list[IssueFormField] + """ + + self._body = body + + @property + def content(self): + """Gets the content of this IssueTemplate. # noqa: E501 + + + :return: The content of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this IssueTemplate. + + + :param content: The content of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def file_name(self): + """Gets the file_name of this IssueTemplate. # noqa: E501 + + + :return: The file_name of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._file_name + + @file_name.setter + def file_name(self, file_name): + """Sets the file_name of this IssueTemplate. + + + :param file_name: The file_name of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._file_name = file_name + + @property + def labels(self): + """Gets the labels of this IssueTemplate. # noqa: E501 + + + :return: The labels of this IssueTemplate. # noqa: E501 + :rtype: IssueTemplateStringSlice + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this IssueTemplate. + + + :param labels: The labels of this IssueTemplate. # noqa: E501 + :type: IssueTemplateStringSlice + """ + + self._labels = labels + + @property + def name(self): + """Gets the name of this IssueTemplate. # noqa: E501 + + + :return: The name of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this IssueTemplate. + + + :param name: The name of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def ref(self): + """Gets the ref of this IssueTemplate. # noqa: E501 + + + :return: The ref of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this IssueTemplate. + + + :param ref: The ref of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def title(self): + """Gets the title of this IssueTemplate. # noqa: E501 + + + :return: The title of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this IssueTemplate. + + + :param title: The title of this IssueTemplate. # 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(IssueTemplate, 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, IssueTemplate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueTemplate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/issue_template_string_slice.py b/gitea/models/issue_template_string_slice.py new file mode 100644 index 0000000..0e9b7cb --- /dev/null +++ b/gitea/models/issue_template_string_slice.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class IssueTemplateStringSlice(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, _configuration=None): # noqa: E501 + """IssueTemplateStringSlice - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(IssueTemplateStringSlice, 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, IssueTemplateStringSlice): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueTemplateStringSlice): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/label.py b/gitea/models/label.py new file mode 100644 index 0000000..8e3ab4a --- /dev/null +++ b/gitea/models/label.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'description': 'str', + 'exclusive': 'bool', + 'id': 'int', + 'is_archived': 'bool', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'id': 'id', + 'is_archived': 'is_archived', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, color=None, description=None, exclusive=None, id=None, is_archived=None, name=None, url=None, _configuration=None): # noqa: E501 + """Label - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._id = None + self._is_archived = None + self._name = None + self._url = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if id is not None: + self.id = id + if is_archived is not None: + self.is_archived = is_archived + 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 description(self): + """Gets the description of this Label. # noqa: E501 + + + :return: The description of this Label. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Label. + + + :param description: The description of this Label. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this Label. # noqa: E501 + + + :return: The exclusive of this Label. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this Label. + + + :param exclusive: The exclusive of this Label. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @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 is_archived(self): + """Gets the is_archived of this Label. # noqa: E501 + + + :return: The is_archived of this Label. # noqa: E501 + :rtype: bool + """ + return self._is_archived + + @is_archived.setter + def is_archived(self, is_archived): + """Sets the is_archived of this Label. + + + :param is_archived: The is_archived of this Label. # noqa: E501 + :type: bool + """ + + self._is_archived = is_archived + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Label): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/label_template.py b/gitea/models/label_template.py new file mode 100644 index 0000000..90d625f --- /dev/null +++ b/gitea/models/label_template.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class LabelTemplate(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', + 'description': 'str', + 'exclusive': 'bool', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'name': 'name' + } + + def __init__(self, color=None, description=None, exclusive=None, name=None, _configuration=None): # noqa: E501 + """LabelTemplate - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._name = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if name is not None: + self.name = name + + @property + def color(self): + """Gets the color of this LabelTemplate. # noqa: E501 + + + :return: The color of this LabelTemplate. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this LabelTemplate. + + + :param color: The color of this LabelTemplate. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def description(self): + """Gets the description of this LabelTemplate. # noqa: E501 + + + :return: The description of this LabelTemplate. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this LabelTemplate. + + + :param description: The description of this LabelTemplate. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this LabelTemplate. # noqa: E501 + + + :return: The exclusive of this LabelTemplate. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this LabelTemplate. + + + :param exclusive: The exclusive of this LabelTemplate. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @property + def name(self): + """Gets the name of this LabelTemplate. # noqa: E501 + + + :return: The name of this LabelTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this LabelTemplate. + + + :param name: The name of this LabelTemplate. # 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(LabelTemplate, 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, LabelTemplate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LabelTemplate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/license_template_info.py b/gitea/models/license_template_info.py new file mode 100644 index 0000000..d6fed97 --- /dev/null +++ b/gitea/models/license_template_info.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class LicenseTemplateInfo(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', + 'implementation': 'str', + 'key': 'str', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'body': 'body', + 'implementation': 'implementation', + 'key': 'key', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, body=None, implementation=None, key=None, name=None, url=None, _configuration=None): # noqa: E501 + """LicenseTemplateInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._implementation = None + self._key = None + self._name = None + self._url = None + self.discriminator = None + + if body is not None: + self.body = body + if implementation is not None: + self.implementation = implementation + if key is not None: + self.key = key + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def body(self): + """Gets the body of this LicenseTemplateInfo. # noqa: E501 + + + :return: The body of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this LicenseTemplateInfo. + + + :param body: The body of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def implementation(self): + """Gets the implementation of this LicenseTemplateInfo. # noqa: E501 + + + :return: The implementation of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._implementation + + @implementation.setter + def implementation(self, implementation): + """Sets the implementation of this LicenseTemplateInfo. + + + :param implementation: The implementation of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._implementation = implementation + + @property + def key(self): + """Gets the key of this LicenseTemplateInfo. # noqa: E501 + + + :return: The key of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this LicenseTemplateInfo. + + + :param key: The key of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def name(self): + """Gets the name of this LicenseTemplateInfo. # noqa: E501 + + + :return: The name of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this LicenseTemplateInfo. + + + :param name: The name of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this LicenseTemplateInfo. # noqa: E501 + + + :return: The url of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this LicenseTemplateInfo. + + + :param url: The url of this LicenseTemplateInfo. # 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(LicenseTemplateInfo, 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, LicenseTemplateInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LicenseTemplateInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/licenses_template_list_entry.py b/gitea/models/licenses_template_list_entry.py new file mode 100644 index 0000000..cf4762f --- /dev/null +++ b/gitea/models/licenses_template_list_entry.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class LicensesTemplateListEntry(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', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'key': 'key', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, key=None, name=None, url=None, _configuration=None): # noqa: E501 + """LicensesTemplateListEntry - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._key = None + self._name = None + self._url = None + self.discriminator = None + + if key is not None: + self.key = key + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def key(self): + """Gets the key of this LicensesTemplateListEntry. # noqa: E501 + + + :return: The key of this LicensesTemplateListEntry. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this LicensesTemplateListEntry. + + + :param key: The key of this LicensesTemplateListEntry. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def name(self): + """Gets the name of this LicensesTemplateListEntry. # noqa: E501 + + + :return: The name of this LicensesTemplateListEntry. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this LicensesTemplateListEntry. + + + :param name: The name of this LicensesTemplateListEntry. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this LicensesTemplateListEntry. # noqa: E501 + + + :return: The url of this LicensesTemplateListEntry. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this LicensesTemplateListEntry. + + + :param url: The url of this LicensesTemplateListEntry. # 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(LicensesTemplateListEntry, 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, LicensesTemplateListEntry): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LicensesTemplateListEntry): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/markdown_option.py b/gitea/models/markdown_option.py new file mode 100644 index 0000000..af6a9dd --- /dev/null +++ b/gitea/models/markdown_option.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """MarkdownOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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 + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} 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. + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} 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 (markdown, comment, wiki, file) 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 (markdown, comment, wiki, file) 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? (use mode=wiki instead) Deprecated: true 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? (use mode=wiki instead) Deprecated: true 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarkdownOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/markup_option.py b/gitea/models/markup_option.py new file mode 100644 index 0000000..97af7d2 --- /dev/null +++ b/gitea/models/markup_option.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class MarkupOption(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', + 'file_path': 'str', + 'mode': 'str', + 'text': 'str', + 'wiki': 'bool' + } + + attribute_map = { + 'context': 'Context', + 'file_path': 'FilePath', + 'mode': 'Mode', + 'text': 'Text', + 'wiki': 'Wiki' + } + + def __init__(self, context=None, file_path=None, mode=None, text=None, wiki=None, _configuration=None): # noqa: E501 + """MarkupOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._context = None + self._file_path = None + self._mode = None + self._text = None + self._wiki = None + self.discriminator = None + + if context is not None: + self.context = context + if file_path is not None: + self.file_path = file_path + 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 MarkupOption. # noqa: E501 + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body # noqa: E501 + + :return: The context of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this MarkupOption. + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body # noqa: E501 + + :param context: The context of this MarkupOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def file_path(self): + """Gets the file_path of this MarkupOption. # noqa: E501 + + File path for detecting extension in file mode in: body # noqa: E501 + + :return: The file_path of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._file_path + + @file_path.setter + def file_path(self, file_path): + """Sets the file_path of this MarkupOption. + + File path for detecting extension in file mode in: body # noqa: E501 + + :param file_path: The file_path of this MarkupOption. # noqa: E501 + :type: str + """ + + self._file_path = file_path + + @property + def mode(self): + """Gets the mode of this MarkupOption. # noqa: E501 + + Mode to render (markdown, comment, wiki, file) in: body # noqa: E501 + + :return: The mode of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this MarkupOption. + + Mode to render (markdown, comment, wiki, file) in: body # noqa: E501 + + :param mode: The mode of this MarkupOption. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def text(self): + """Gets the text of this MarkupOption. # noqa: E501 + + Text markup to render in: body # noqa: E501 + + :return: The text of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this MarkupOption. + + Text markup to render in: body # noqa: E501 + + :param text: The text of this MarkupOption. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def wiki(self): + """Gets the wiki of this MarkupOption. # noqa: E501 + + Is it a wiki page? (use mode=wiki instead) Deprecated: true in: body # noqa: E501 + + :return: The wiki of this MarkupOption. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MarkupOption. + + Is it a wiki page? (use mode=wiki instead) Deprecated: true in: body # noqa: E501 + + :param wiki: The wiki of this MarkupOption. # 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(MarkupOption, 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, MarkupOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarkupOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/merge_pull_request_option.py b/gitea/models/merge_pull_request_option.py new file mode 100644 index 0000000..166fb57 --- /dev/null +++ b/gitea/models/merge_pull_request_option.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class MergePullRequestOption(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 = { + 'do': 'str', + 'merge_commit_id': 'str', + 'merge_message_field': 'str', + 'merge_title_field': 'str', + 'delete_branch_after_merge': 'bool', + 'force_merge': 'bool', + 'head_commit_id': 'str', + 'merge_when_checks_succeed': 'bool' + } + + attribute_map = { + 'do': 'Do', + 'merge_commit_id': 'MergeCommitID', + 'merge_message_field': 'MergeMessageField', + 'merge_title_field': 'MergeTitleField', + 'delete_branch_after_merge': 'delete_branch_after_merge', + 'force_merge': 'force_merge', + 'head_commit_id': 'head_commit_id', + 'merge_when_checks_succeed': 'merge_when_checks_succeed' + } + + def __init__(self, do=None, merge_commit_id=None, merge_message_field=None, merge_title_field=None, delete_branch_after_merge=None, force_merge=None, head_commit_id=None, merge_when_checks_succeed=None, _configuration=None): # noqa: E501 + """MergePullRequestOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._do = None + self._merge_commit_id = None + self._merge_message_field = None + self._merge_title_field = None + self._delete_branch_after_merge = None + self._force_merge = None + self._head_commit_id = None + self._merge_when_checks_succeed = None + self.discriminator = None + + self.do = do + if merge_commit_id is not None: + self.merge_commit_id = merge_commit_id + if merge_message_field is not None: + self.merge_message_field = merge_message_field + if merge_title_field is not None: + self.merge_title_field = merge_title_field + if delete_branch_after_merge is not None: + self.delete_branch_after_merge = delete_branch_after_merge + if force_merge is not None: + self.force_merge = force_merge + if head_commit_id is not None: + self.head_commit_id = head_commit_id + if merge_when_checks_succeed is not None: + self.merge_when_checks_succeed = merge_when_checks_succeed + + @property + def do(self): + """Gets the do of this MergePullRequestOption. # noqa: E501 + + + :return: The do of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._do + + @do.setter + def do(self, do): + """Sets the do of this MergePullRequestOption. + + + :param do: The do of this MergePullRequestOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and do is None: + raise ValueError("Invalid value for `do`, must not be `None`") # noqa: E501 + allowed_values = ["merge", "rebase", "rebase-merge", "squash", "fast-forward-only", "manually-merged"] # noqa: E501 + if (self._configuration.client_side_validation and + do not in allowed_values): + raise ValueError( + "Invalid value for `do` ({0}), must be one of {1}" # noqa: E501 + .format(do, allowed_values) + ) + + self._do = do + + @property + def merge_commit_id(self): + """Gets the merge_commit_id of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_commit_id of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_commit_id + + @merge_commit_id.setter + def merge_commit_id(self, merge_commit_id): + """Sets the merge_commit_id of this MergePullRequestOption. + + + :param merge_commit_id: The merge_commit_id of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._merge_commit_id = merge_commit_id + + @property + def merge_message_field(self): + """Gets the merge_message_field of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_message_field of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_message_field + + @merge_message_field.setter + def merge_message_field(self, merge_message_field): + """Sets the merge_message_field of this MergePullRequestOption. + + + :param merge_message_field: The merge_message_field of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._merge_message_field = merge_message_field + + @property + def merge_title_field(self): + """Gets the merge_title_field of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_title_field of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_title_field + + @merge_title_field.setter + def merge_title_field(self, merge_title_field): + """Sets the merge_title_field of this MergePullRequestOption. + + + :param merge_title_field: The merge_title_field of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._merge_title_field = merge_title_field + + @property + def delete_branch_after_merge(self): + """Gets the delete_branch_after_merge of this MergePullRequestOption. # noqa: E501 + + + :return: The delete_branch_after_merge of this MergePullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._delete_branch_after_merge + + @delete_branch_after_merge.setter + def delete_branch_after_merge(self, delete_branch_after_merge): + """Sets the delete_branch_after_merge of this MergePullRequestOption. + + + :param delete_branch_after_merge: The delete_branch_after_merge of this MergePullRequestOption. # noqa: E501 + :type: bool + """ + + self._delete_branch_after_merge = delete_branch_after_merge + + @property + def force_merge(self): + """Gets the force_merge of this MergePullRequestOption. # noqa: E501 + + + :return: The force_merge of this MergePullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._force_merge + + @force_merge.setter + def force_merge(self, force_merge): + """Sets the force_merge of this MergePullRequestOption. + + + :param force_merge: The force_merge of this MergePullRequestOption. # noqa: E501 + :type: bool + """ + + self._force_merge = force_merge + + @property + def head_commit_id(self): + """Gets the head_commit_id of this MergePullRequestOption. # noqa: E501 + + + :return: The head_commit_id of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._head_commit_id + + @head_commit_id.setter + def head_commit_id(self, head_commit_id): + """Sets the head_commit_id of this MergePullRequestOption. + + + :param head_commit_id: The head_commit_id of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._head_commit_id = head_commit_id + + @property + def merge_when_checks_succeed(self): + """Gets the merge_when_checks_succeed of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_when_checks_succeed of this MergePullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._merge_when_checks_succeed + + @merge_when_checks_succeed.setter + def merge_when_checks_succeed(self, merge_when_checks_succeed): + """Sets the merge_when_checks_succeed of this MergePullRequestOption. + + + :param merge_when_checks_succeed: The merge_when_checks_succeed of this MergePullRequestOption. # noqa: E501 + :type: bool + """ + + self._merge_when_checks_succeed = merge_when_checks_succeed + + 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(MergePullRequestOption, 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, MergePullRequestOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MergePullRequestOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/merge_upstream_request.py b/gitea/models/merge_upstream_request.py new file mode 100644 index 0000000..ed7633c --- /dev/null +++ b/gitea/models/merge_upstream_request.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class MergeUpstreamRequest(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 = { + 'branch': 'str' + } + + attribute_map = { + 'branch': 'branch' + } + + def __init__(self, branch=None, _configuration=None): # noqa: E501 + """MergeUpstreamRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._branch = None + self.discriminator = None + + if branch is not None: + self.branch = branch + + @property + def branch(self): + """Gets the branch of this MergeUpstreamRequest. # noqa: E501 + + + :return: The branch of this MergeUpstreamRequest. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this MergeUpstreamRequest. + + + :param branch: The branch of this MergeUpstreamRequest. # noqa: E501 + :type: str + """ + + self._branch = branch + + 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(MergeUpstreamRequest, 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, MergeUpstreamRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MergeUpstreamRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/merge_upstream_response.py b/gitea/models/merge_upstream_response.py new file mode 100644 index 0000000..34f2ae2 --- /dev/null +++ b/gitea/models/merge_upstream_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class MergeUpstreamResponse(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 = { + 'merge_type': 'str' + } + + attribute_map = { + 'merge_type': 'merge_type' + } + + def __init__(self, merge_type=None, _configuration=None): # noqa: E501 + """MergeUpstreamResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._merge_type = None + self.discriminator = None + + if merge_type is not None: + self.merge_type = merge_type + + @property + def merge_type(self): + """Gets the merge_type of this MergeUpstreamResponse. # noqa: E501 + + + :return: The merge_type of this MergeUpstreamResponse. # noqa: E501 + :rtype: str + """ + return self._merge_type + + @merge_type.setter + def merge_type(self, merge_type): + """Sets the merge_type of this MergeUpstreamResponse. + + + :param merge_type: The merge_type of this MergeUpstreamResponse. # noqa: E501 + :type: str + """ + + self._merge_type = merge_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(MergeUpstreamResponse, 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, MergeUpstreamResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MergeUpstreamResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/migrate_repo_options.py b/gitea/models/migrate_repo_options.py new file mode 100644 index 0000000..dc25d98 --- /dev/null +++ b/gitea/models/migrate_repo_options.py @@ -0,0 +1,682 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class MigrateRepoOptions(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_token': 'str', + 'auth_username': 'str', + 'aws_access_key_id': 'str', + 'aws_secret_access_key': 'str', + 'clone_addr': 'str', + 'description': 'str', + 'issues': 'bool', + 'labels': 'bool', + 'lfs': 'bool', + 'lfs_endpoint': 'str', + 'milestones': 'bool', + 'mirror': 'bool', + 'mirror_interval': 'str', + 'private': 'bool', + 'pull_requests': 'bool', + 'releases': 'bool', + 'repo_name': 'str', + 'repo_owner': 'str', + 'service': 'str', + 'uid': 'int', + 'wiki': 'bool' + } + + attribute_map = { + 'auth_password': 'auth_password', + 'auth_token': 'auth_token', + 'auth_username': 'auth_username', + 'aws_access_key_id': 'aws_access_key_id', + 'aws_secret_access_key': 'aws_secret_access_key', + 'clone_addr': 'clone_addr', + 'description': 'description', + 'issues': 'issues', + 'labels': 'labels', + 'lfs': 'lfs', + 'lfs_endpoint': 'lfs_endpoint', + 'milestones': 'milestones', + 'mirror': 'mirror', + 'mirror_interval': 'mirror_interval', + 'private': 'private', + 'pull_requests': 'pull_requests', + 'releases': 'releases', + 'repo_name': 'repo_name', + 'repo_owner': 'repo_owner', + 'service': 'service', + 'uid': 'uid', + 'wiki': 'wiki' + } + + def __init__(self, auth_password=None, auth_token=None, auth_username=None, aws_access_key_id=None, aws_secret_access_key=None, clone_addr=None, description=None, issues=None, labels=None, lfs=None, lfs_endpoint=None, milestones=None, mirror=None, mirror_interval=None, private=None, pull_requests=None, releases=None, repo_name=None, repo_owner=None, service=None, uid=None, wiki=None, _configuration=None): # noqa: E501 + """MigrateRepoOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._auth_password = None + self._auth_token = None + self._auth_username = None + self._aws_access_key_id = None + self._aws_secret_access_key = None + self._clone_addr = None + self._description = None + self._issues = None + self._labels = None + self._lfs = None + self._lfs_endpoint = None + self._milestones = None + self._mirror = None + self._mirror_interval = None + self._private = None + self._pull_requests = None + self._releases = None + self._repo_name = None + self._repo_owner = None + self._service = None + self._uid = None + self._wiki = None + self.discriminator = None + + if auth_password is not None: + self.auth_password = auth_password + if auth_token is not None: + self.auth_token = auth_token + if auth_username is not None: + self.auth_username = auth_username + if aws_access_key_id is not None: + self.aws_access_key_id = aws_access_key_id + if aws_secret_access_key is not None: + self.aws_secret_access_key = aws_secret_access_key + self.clone_addr = clone_addr + if description is not None: + self.description = description + if issues is not None: + self.issues = issues + if labels is not None: + self.labels = labels + if lfs is not None: + self.lfs = lfs + if lfs_endpoint is not None: + self.lfs_endpoint = lfs_endpoint + if milestones is not None: + self.milestones = milestones + if mirror is not None: + self.mirror = mirror + if mirror_interval is not None: + self.mirror_interval = mirror_interval + if private is not None: + self.private = private + if pull_requests is not None: + self.pull_requests = pull_requests + if releases is not None: + self.releases = releases + self.repo_name = repo_name + if repo_owner is not None: + self.repo_owner = repo_owner + if service is not None: + self.service = service + if uid is not None: + self.uid = uid + if wiki is not None: + self.wiki = wiki + + @property + def auth_password(self): + """Gets the auth_password of this MigrateRepoOptions. # noqa: E501 + + + :return: The auth_password of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._auth_password + + @auth_password.setter + def auth_password(self, auth_password): + """Sets the auth_password of this MigrateRepoOptions. + + + :param auth_password: The auth_password of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._auth_password = auth_password + + @property + def auth_token(self): + """Gets the auth_token of this MigrateRepoOptions. # noqa: E501 + + + :return: The auth_token of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._auth_token + + @auth_token.setter + def auth_token(self, auth_token): + """Sets the auth_token of this MigrateRepoOptions. + + + :param auth_token: The auth_token of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._auth_token = auth_token + + @property + def auth_username(self): + """Gets the auth_username of this MigrateRepoOptions. # noqa: E501 + + + :return: The auth_username of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._auth_username + + @auth_username.setter + def auth_username(self, auth_username): + """Sets the auth_username of this MigrateRepoOptions. + + + :param auth_username: The auth_username of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._auth_username = auth_username + + @property + def aws_access_key_id(self): + """Gets the aws_access_key_id of this MigrateRepoOptions. # noqa: E501 + + + :return: The aws_access_key_id of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._aws_access_key_id + + @aws_access_key_id.setter + def aws_access_key_id(self, aws_access_key_id): + """Sets the aws_access_key_id of this MigrateRepoOptions. + + + :param aws_access_key_id: The aws_access_key_id of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._aws_access_key_id = aws_access_key_id + + @property + def aws_secret_access_key(self): + """Gets the aws_secret_access_key of this MigrateRepoOptions. # noqa: E501 + + + :return: The aws_secret_access_key of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._aws_secret_access_key + + @aws_secret_access_key.setter + def aws_secret_access_key(self, aws_secret_access_key): + """Sets the aws_secret_access_key of this MigrateRepoOptions. + + + :param aws_secret_access_key: The aws_secret_access_key of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._aws_secret_access_key = aws_secret_access_key + + @property + def clone_addr(self): + """Gets the clone_addr of this MigrateRepoOptions. # noqa: E501 + + + :return: The clone_addr of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._clone_addr + + @clone_addr.setter + def clone_addr(self, clone_addr): + """Sets the clone_addr of this MigrateRepoOptions. + + + :param clone_addr: The clone_addr of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and 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 MigrateRepoOptions. # noqa: E501 + + + :return: The description of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this MigrateRepoOptions. + + + :param description: The description of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def issues(self): + """Gets the issues of this MigrateRepoOptions. # noqa: E501 + + + :return: The issues of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._issues + + @issues.setter + def issues(self, issues): + """Sets the issues of this MigrateRepoOptions. + + + :param issues: The issues of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._issues = issues + + @property + def labels(self): + """Gets the labels of this MigrateRepoOptions. # noqa: E501 + + + :return: The labels of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this MigrateRepoOptions. + + + :param labels: The labels of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._labels = labels + + @property + def lfs(self): + """Gets the lfs of this MigrateRepoOptions. # noqa: E501 + + + :return: The lfs of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._lfs + + @lfs.setter + def lfs(self, lfs): + """Sets the lfs of this MigrateRepoOptions. + + + :param lfs: The lfs of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._lfs = lfs + + @property + def lfs_endpoint(self): + """Gets the lfs_endpoint of this MigrateRepoOptions. # noqa: E501 + + + :return: The lfs_endpoint of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._lfs_endpoint + + @lfs_endpoint.setter + def lfs_endpoint(self, lfs_endpoint): + """Sets the lfs_endpoint of this MigrateRepoOptions. + + + :param lfs_endpoint: The lfs_endpoint of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._lfs_endpoint = lfs_endpoint + + @property + def milestones(self): + """Gets the milestones of this MigrateRepoOptions. # noqa: E501 + + + :return: The milestones of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._milestones + + @milestones.setter + def milestones(self, milestones): + """Sets the milestones of this MigrateRepoOptions. + + + :param milestones: The milestones of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._milestones = milestones + + @property + def mirror(self): + """Gets the mirror of this MigrateRepoOptions. # noqa: E501 + + + :return: The mirror of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._mirror + + @mirror.setter + def mirror(self, mirror): + """Sets the mirror of this MigrateRepoOptions. + + + :param mirror: The mirror of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._mirror = mirror + + @property + def mirror_interval(self): + """Gets the mirror_interval of this MigrateRepoOptions. # noqa: E501 + + + :return: The mirror_interval of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._mirror_interval + + @mirror_interval.setter + def mirror_interval(self, mirror_interval): + """Sets the mirror_interval of this MigrateRepoOptions. + + + :param mirror_interval: The mirror_interval of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._mirror_interval = mirror_interval + + @property + def private(self): + """Gets the private of this MigrateRepoOptions. # noqa: E501 + + + :return: The private of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this MigrateRepoOptions. + + + :param private: The private of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def pull_requests(self): + """Gets the pull_requests of this MigrateRepoOptions. # noqa: E501 + + + :return: The pull_requests of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._pull_requests + + @pull_requests.setter + def pull_requests(self, pull_requests): + """Sets the pull_requests of this MigrateRepoOptions. + + + :param pull_requests: The pull_requests of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._pull_requests = pull_requests + + @property + def releases(self): + """Gets the releases of this MigrateRepoOptions. # noqa: E501 + + + :return: The releases of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._releases + + @releases.setter + def releases(self, releases): + """Sets the releases of this MigrateRepoOptions. + + + :param releases: The releases of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._releases = releases + + @property + def repo_name(self): + """Gets the repo_name of this MigrateRepoOptions. # noqa: E501 + + + :return: The repo_name of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this MigrateRepoOptions. + + + :param repo_name: The repo_name of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and repo_name is None: + raise ValueError("Invalid value for `repo_name`, must not be `None`") # noqa: E501 + + self._repo_name = repo_name + + @property + def repo_owner(self): + """Gets the repo_owner of this MigrateRepoOptions. # noqa: E501 + + Name of User or Organisation who will own Repo after migration # noqa: E501 + + :return: The repo_owner of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._repo_owner + + @repo_owner.setter + def repo_owner(self, repo_owner): + """Sets the repo_owner of this MigrateRepoOptions. + + Name of User or Organisation who will own Repo after migration # noqa: E501 + + :param repo_owner: The repo_owner of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._repo_owner = repo_owner + + @property + def service(self): + """Gets the service of this MigrateRepoOptions. # noqa: E501 + + + :return: The service of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._service + + @service.setter + def service(self, service): + """Sets the service of this MigrateRepoOptions. + + + :param service: The service of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + allowed_values = ["git", "github", "gitea", "gitlab", "gogs", "onedev", "gitbucket", "codebase"] # noqa: E501 + if (self._configuration.client_side_validation and + service not in allowed_values): + raise ValueError( + "Invalid value for `service` ({0}), must be one of {1}" # noqa: E501 + .format(service, allowed_values) + ) + + self._service = service + + @property + def uid(self): + """Gets the uid of this MigrateRepoOptions. # noqa: E501 + + deprecated (only for backwards compatibility) # noqa: E501 + + :return: The uid of this MigrateRepoOptions. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this MigrateRepoOptions. + + deprecated (only for backwards compatibility) # noqa: E501 + + :param uid: The uid of this MigrateRepoOptions. # noqa: E501 + :type: int + """ + + self._uid = uid + + @property + def wiki(self): + """Gets the wiki of this MigrateRepoOptions. # noqa: E501 + + + :return: The wiki of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MigrateRepoOptions. + + + :param wiki: The wiki of this MigrateRepoOptions. # 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(MigrateRepoOptions, 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, MigrateRepoOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MigrateRepoOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/milestone.py b/gitea/models/milestone.py new file mode 100644 index 0000000..ff94470 --- /dev/null +++ b/gitea/models/milestone.py @@ -0,0 +1,357 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'created_at': 'datetime', + 'description': 'str', + 'due_on': 'datetime', + 'id': 'int', + 'open_issues': 'int', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'closed_at': 'closed_at', + 'closed_issues': 'closed_issues', + 'created_at': 'created_at', + 'description': 'description', + 'due_on': 'due_on', + 'id': 'id', + 'open_issues': 'open_issues', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at' + } + + def __init__(self, closed_at=None, closed_issues=None, created_at=None, description=None, due_on=None, id=None, open_issues=None, state=None, title=None, updated_at=None, _configuration=None): # noqa: E501 + """Milestone - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._closed_at = None + self._closed_issues = None + self._created_at = None + self._description = None + self._due_on = None + self._id = None + self._open_issues = None + self._state = None + self._title = None + self._updated_at = 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 created_at is not None: + self.created_at = created_at + 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 + if updated_at is not None: + self.updated_at = updated_at + + @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 created_at(self): + """Gets the created_at of this Milestone. # noqa: E501 + + + :return: The created_at of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Milestone. + + + :param created_at: The created_at of this Milestone. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @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 + + @property + def updated_at(self): + """Gets the updated_at of this Milestone. # noqa: E501 + + + :return: The updated_at of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Milestone. + + + :param updated_at: The updated_at of this Milestone. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Milestone): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/new_issue_pins_allowed.py b/gitea/models/new_issue_pins_allowed.py new file mode 100644 index 0000000..fb23ef3 --- /dev/null +++ b/gitea/models/new_issue_pins_allowed.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NewIssuePinsAllowed(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 = { + 'issues': 'bool', + 'pull_requests': 'bool' + } + + attribute_map = { + 'issues': 'issues', + 'pull_requests': 'pull_requests' + } + + def __init__(self, issues=None, pull_requests=None, _configuration=None): # noqa: E501 + """NewIssuePinsAllowed - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._issues = None + self._pull_requests = None + self.discriminator = None + + if issues is not None: + self.issues = issues + if pull_requests is not None: + self.pull_requests = pull_requests + + @property + def issues(self): + """Gets the issues of this NewIssuePinsAllowed. # noqa: E501 + + + :return: The issues of this NewIssuePinsAllowed. # noqa: E501 + :rtype: bool + """ + return self._issues + + @issues.setter + def issues(self, issues): + """Sets the issues of this NewIssuePinsAllowed. + + + :param issues: The issues of this NewIssuePinsAllowed. # noqa: E501 + :type: bool + """ + + self._issues = issues + + @property + def pull_requests(self): + """Gets the pull_requests of this NewIssuePinsAllowed. # noqa: E501 + + + :return: The pull_requests of this NewIssuePinsAllowed. # noqa: E501 + :rtype: bool + """ + return self._pull_requests + + @pull_requests.setter + def pull_requests(self, pull_requests): + """Sets the pull_requests of this NewIssuePinsAllowed. + + + :param pull_requests: The pull_requests of this NewIssuePinsAllowed. # noqa: E501 + :type: bool + """ + + self._pull_requests = pull_requests + + 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(NewIssuePinsAllowed, 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, NewIssuePinsAllowed): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NewIssuePinsAllowed): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/node_info.py b/gitea/models/node_info.py new file mode 100644 index 0000000..a57279a --- /dev/null +++ b/gitea/models/node_info.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NodeInfo(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 = { + 'metadata': 'object', + 'open_registrations': 'bool', + 'protocols': 'list[str]', + 'services': 'NodeInfoServices', + 'software': 'NodeInfoSoftware', + 'usage': 'NodeInfoUsage', + 'version': 'str' + } + + attribute_map = { + 'metadata': 'metadata', + 'open_registrations': 'openRegistrations', + 'protocols': 'protocols', + 'services': 'services', + 'software': 'software', + 'usage': 'usage', + 'version': 'version' + } + + def __init__(self, metadata=None, open_registrations=None, protocols=None, services=None, software=None, usage=None, version=None, _configuration=None): # noqa: E501 + """NodeInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._metadata = None + self._open_registrations = None + self._protocols = None + self._services = None + self._software = None + self._usage = None + self._version = None + self.discriminator = None + + if metadata is not None: + self.metadata = metadata + if open_registrations is not None: + self.open_registrations = open_registrations + if protocols is not None: + self.protocols = protocols + if services is not None: + self.services = services + if software is not None: + self.software = software + if usage is not None: + self.usage = usage + if version is not None: + self.version = version + + @property + def metadata(self): + """Gets the metadata of this NodeInfo. # noqa: E501 + + + :return: The metadata of this NodeInfo. # noqa: E501 + :rtype: object + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this NodeInfo. + + + :param metadata: The metadata of this NodeInfo. # noqa: E501 + :type: object + """ + + self._metadata = metadata + + @property + def open_registrations(self): + """Gets the open_registrations of this NodeInfo. # noqa: E501 + + + :return: The open_registrations of this NodeInfo. # noqa: E501 + :rtype: bool + """ + return self._open_registrations + + @open_registrations.setter + def open_registrations(self, open_registrations): + """Sets the open_registrations of this NodeInfo. + + + :param open_registrations: The open_registrations of this NodeInfo. # noqa: E501 + :type: bool + """ + + self._open_registrations = open_registrations + + @property + def protocols(self): + """Gets the protocols of this NodeInfo. # noqa: E501 + + + :return: The protocols of this NodeInfo. # noqa: E501 + :rtype: list[str] + """ + return self._protocols + + @protocols.setter + def protocols(self, protocols): + """Sets the protocols of this NodeInfo. + + + :param protocols: The protocols of this NodeInfo. # noqa: E501 + :type: list[str] + """ + + self._protocols = protocols + + @property + def services(self): + """Gets the services of this NodeInfo. # noqa: E501 + + + :return: The services of this NodeInfo. # noqa: E501 + :rtype: NodeInfoServices + """ + return self._services + + @services.setter + def services(self, services): + """Sets the services of this NodeInfo. + + + :param services: The services of this NodeInfo. # noqa: E501 + :type: NodeInfoServices + """ + + self._services = services + + @property + def software(self): + """Gets the software of this NodeInfo. # noqa: E501 + + + :return: The software of this NodeInfo. # noqa: E501 + :rtype: NodeInfoSoftware + """ + return self._software + + @software.setter + def software(self, software): + """Sets the software of this NodeInfo. + + + :param software: The software of this NodeInfo. # noqa: E501 + :type: NodeInfoSoftware + """ + + self._software = software + + @property + def usage(self): + """Gets the usage of this NodeInfo. # noqa: E501 + + + :return: The usage of this NodeInfo. # noqa: E501 + :rtype: NodeInfoUsage + """ + return self._usage + + @usage.setter + def usage(self, usage): + """Sets the usage of this NodeInfo. + + + :param usage: The usage of this NodeInfo. # noqa: E501 + :type: NodeInfoUsage + """ + + self._usage = usage + + @property + def version(self): + """Gets the version of this NodeInfo. # noqa: E501 + + + :return: The version of this NodeInfo. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this NodeInfo. + + + :param version: The version of this NodeInfo. # 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(NodeInfo, 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, NodeInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/node_info_services.py b/gitea/models/node_info_services.py new file mode 100644 index 0000000..b05eae4 --- /dev/null +++ b/gitea/models/node_info_services.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NodeInfoServices(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 = { + 'inbound': 'list[str]', + 'outbound': 'list[str]' + } + + attribute_map = { + 'inbound': 'inbound', + 'outbound': 'outbound' + } + + def __init__(self, inbound=None, outbound=None, _configuration=None): # noqa: E501 + """NodeInfoServices - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._inbound = None + self._outbound = None + self.discriminator = None + + if inbound is not None: + self.inbound = inbound + if outbound is not None: + self.outbound = outbound + + @property + def inbound(self): + """Gets the inbound of this NodeInfoServices. # noqa: E501 + + + :return: The inbound of this NodeInfoServices. # noqa: E501 + :rtype: list[str] + """ + return self._inbound + + @inbound.setter + def inbound(self, inbound): + """Sets the inbound of this NodeInfoServices. + + + :param inbound: The inbound of this NodeInfoServices. # noqa: E501 + :type: list[str] + """ + + self._inbound = inbound + + @property + def outbound(self): + """Gets the outbound of this NodeInfoServices. # noqa: E501 + + + :return: The outbound of this NodeInfoServices. # noqa: E501 + :rtype: list[str] + """ + return self._outbound + + @outbound.setter + def outbound(self, outbound): + """Sets the outbound of this NodeInfoServices. + + + :param outbound: The outbound of this NodeInfoServices. # noqa: E501 + :type: list[str] + """ + + self._outbound = outbound + + 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(NodeInfoServices, 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, NodeInfoServices): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoServices): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/node_info_software.py b/gitea/models/node_info_software.py new file mode 100644 index 0000000..440d6d6 --- /dev/null +++ b/gitea/models/node_info_software.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NodeInfoSoftware(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 = { + 'homepage': 'str', + 'name': 'str', + 'repository': 'str', + 'version': 'str' + } + + attribute_map = { + 'homepage': 'homepage', + 'name': 'name', + 'repository': 'repository', + 'version': 'version' + } + + def __init__(self, homepage=None, name=None, repository=None, version=None, _configuration=None): # noqa: E501 + """NodeInfoSoftware - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._homepage = None + self._name = None + self._repository = None + self._version = None + self.discriminator = None + + if homepage is not None: + self.homepage = homepage + if name is not None: + self.name = name + if repository is not None: + self.repository = repository + if version is not None: + self.version = version + + @property + def homepage(self): + """Gets the homepage of this NodeInfoSoftware. # noqa: E501 + + + :return: The homepage of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._homepage + + @homepage.setter + def homepage(self, homepage): + """Sets the homepage of this NodeInfoSoftware. + + + :param homepage: The homepage of this NodeInfoSoftware. # noqa: E501 + :type: str + """ + + self._homepage = homepage + + @property + def name(self): + """Gets the name of this NodeInfoSoftware. # noqa: E501 + + + :return: The name of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NodeInfoSoftware. + + + :param name: The name of this NodeInfoSoftware. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def repository(self): + """Gets the repository of this NodeInfoSoftware. # noqa: E501 + + + :return: The repository of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this NodeInfoSoftware. + + + :param repository: The repository of this NodeInfoSoftware. # noqa: E501 + :type: str + """ + + self._repository = repository + + @property + def version(self): + """Gets the version of this NodeInfoSoftware. # noqa: E501 + + + :return: The version of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this NodeInfoSoftware. + + + :param version: The version of this NodeInfoSoftware. # 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(NodeInfoSoftware, 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, NodeInfoSoftware): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoSoftware): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/node_info_usage.py b/gitea/models/node_info_usage.py new file mode 100644 index 0000000..e12a632 --- /dev/null +++ b/gitea/models/node_info_usage.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NodeInfoUsage(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 = { + 'local_comments': 'int', + 'local_posts': 'int', + 'users': 'NodeInfoUsageUsers' + } + + attribute_map = { + 'local_comments': 'localComments', + 'local_posts': 'localPosts', + 'users': 'users' + } + + def __init__(self, local_comments=None, local_posts=None, users=None, _configuration=None): # noqa: E501 + """NodeInfoUsage - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._local_comments = None + self._local_posts = None + self._users = None + self.discriminator = None + + if local_comments is not None: + self.local_comments = local_comments + if local_posts is not None: + self.local_posts = local_posts + if users is not None: + self.users = users + + @property + def local_comments(self): + """Gets the local_comments of this NodeInfoUsage. # noqa: E501 + + + :return: The local_comments of this NodeInfoUsage. # noqa: E501 + :rtype: int + """ + return self._local_comments + + @local_comments.setter + def local_comments(self, local_comments): + """Sets the local_comments of this NodeInfoUsage. + + + :param local_comments: The local_comments of this NodeInfoUsage. # noqa: E501 + :type: int + """ + + self._local_comments = local_comments + + @property + def local_posts(self): + """Gets the local_posts of this NodeInfoUsage. # noqa: E501 + + + :return: The local_posts of this NodeInfoUsage. # noqa: E501 + :rtype: int + """ + return self._local_posts + + @local_posts.setter + def local_posts(self, local_posts): + """Sets the local_posts of this NodeInfoUsage. + + + :param local_posts: The local_posts of this NodeInfoUsage. # noqa: E501 + :type: int + """ + + self._local_posts = local_posts + + @property + def users(self): + """Gets the users of this NodeInfoUsage. # noqa: E501 + + + :return: The users of this NodeInfoUsage. # noqa: E501 + :rtype: NodeInfoUsageUsers + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this NodeInfoUsage. + + + :param users: The users of this NodeInfoUsage. # noqa: E501 + :type: NodeInfoUsageUsers + """ + + self._users = users + + 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(NodeInfoUsage, 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, NodeInfoUsage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoUsage): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/node_info_usage_users.py b/gitea/models/node_info_usage_users.py new file mode 100644 index 0000000..6d5e64c --- /dev/null +++ b/gitea/models/node_info_usage_users.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NodeInfoUsageUsers(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_halfyear': 'int', + 'active_month': 'int', + 'total': 'int' + } + + attribute_map = { + 'active_halfyear': 'activeHalfyear', + 'active_month': 'activeMonth', + 'total': 'total' + } + + def __init__(self, active_halfyear=None, active_month=None, total=None, _configuration=None): # noqa: E501 + """NodeInfoUsageUsers - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active_halfyear = None + self._active_month = None + self._total = None + self.discriminator = None + + if active_halfyear is not None: + self.active_halfyear = active_halfyear + if active_month is not None: + self.active_month = active_month + if total is not None: + self.total = total + + @property + def active_halfyear(self): + """Gets the active_halfyear of this NodeInfoUsageUsers. # noqa: E501 + + + :return: The active_halfyear of this NodeInfoUsageUsers. # noqa: E501 + :rtype: int + """ + return self._active_halfyear + + @active_halfyear.setter + def active_halfyear(self, active_halfyear): + """Sets the active_halfyear of this NodeInfoUsageUsers. + + + :param active_halfyear: The active_halfyear of this NodeInfoUsageUsers. # noqa: E501 + :type: int + """ + + self._active_halfyear = active_halfyear + + @property + def active_month(self): + """Gets the active_month of this NodeInfoUsageUsers. # noqa: E501 + + + :return: The active_month of this NodeInfoUsageUsers. # noqa: E501 + :rtype: int + """ + return self._active_month + + @active_month.setter + def active_month(self, active_month): + """Sets the active_month of this NodeInfoUsageUsers. + + + :param active_month: The active_month of this NodeInfoUsageUsers. # noqa: E501 + :type: int + """ + + self._active_month = active_month + + @property + def total(self): + """Gets the total of this NodeInfoUsageUsers. # noqa: E501 + + + :return: The total of this NodeInfoUsageUsers. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this NodeInfoUsageUsers. + + + :param total: The total of this NodeInfoUsageUsers. # noqa: E501 + :type: int + """ + + self._total = total + + 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(NodeInfoUsageUsers, 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, NodeInfoUsageUsers): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoUsageUsers): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/note.py b/gitea/models/note.py new file mode 100644 index 0000000..58e24a0 --- /dev/null +++ b/gitea/models/note.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Note(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': 'Commit', + 'message': 'str' + } + + attribute_map = { + 'commit': 'commit', + 'message': 'message' + } + + def __init__(self, commit=None, message=None, _configuration=None): # noqa: E501 + """Note - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._message = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if message is not None: + self.message = message + + @property + def commit(self): + """Gets the commit of this Note. # noqa: E501 + + + :return: The commit of this Note. # noqa: E501 + :rtype: Commit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Note. + + + :param commit: The commit of this Note. # noqa: E501 + :type: Commit + """ + + self._commit = commit + + @property + def message(self): + """Gets the message of this Note. # noqa: E501 + + + :return: The message of this Note. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Note. + + + :param message: The message of this Note. # noqa: E501 + :type: str + """ + + self._message = message + + 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(Note, 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, Note): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Note): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/notification_count.py b/gitea/models/notification_count.py new file mode 100644 index 0000000..43b0e37 --- /dev/null +++ b/gitea/models/notification_count.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NotificationCount(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 = { + 'new': 'int' + } + + attribute_map = { + 'new': 'new' + } + + def __init__(self, new=None, _configuration=None): # noqa: E501 + """NotificationCount - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new = None + self.discriminator = None + + if new is not None: + self.new = new + + @property + def new(self): + """Gets the new of this NotificationCount. # noqa: E501 + + + :return: The new of this NotificationCount. # noqa: E501 + :rtype: int + """ + return self._new + + @new.setter + def new(self, new): + """Sets the new of this NotificationCount. + + + :param new: The new of this NotificationCount. # noqa: E501 + :type: int + """ + + self._new = new + + 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(NotificationCount, 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, NotificationCount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotificationCount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/notification_subject.py b/gitea/models/notification_subject.py new file mode 100644 index 0000000..1bfde0a --- /dev/null +++ b/gitea/models/notification_subject.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NotificationSubject(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 = { + 'html_url': 'str', + 'latest_comment_html_url': 'str', + 'latest_comment_url': 'str', + 'state': 'StateType', + 'title': 'str', + 'type': 'NotifySubjectType', + 'url': 'str' + } + + attribute_map = { + 'html_url': 'html_url', + 'latest_comment_html_url': 'latest_comment_html_url', + 'latest_comment_url': 'latest_comment_url', + 'state': 'state', + 'title': 'title', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, html_url=None, latest_comment_html_url=None, latest_comment_url=None, state=None, title=None, type=None, url=None, _configuration=None): # noqa: E501 + """NotificationSubject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._html_url = None + self._latest_comment_html_url = None + self._latest_comment_url = None + self._state = None + self._title = None + self._type = None + self._url = None + self.discriminator = None + + if html_url is not None: + self.html_url = html_url + if latest_comment_html_url is not None: + self.latest_comment_html_url = latest_comment_html_url + if latest_comment_url is not None: + self.latest_comment_url = latest_comment_url + if state is not None: + self.state = state + if title is not None: + self.title = title + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def html_url(self): + """Gets the html_url of this NotificationSubject. # noqa: E501 + + + :return: The html_url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this NotificationSubject. + + + :param html_url: The html_url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def latest_comment_html_url(self): + """Gets the latest_comment_html_url of this NotificationSubject. # noqa: E501 + + + :return: The latest_comment_html_url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._latest_comment_html_url + + @latest_comment_html_url.setter + def latest_comment_html_url(self, latest_comment_html_url): + """Sets the latest_comment_html_url of this NotificationSubject. + + + :param latest_comment_html_url: The latest_comment_html_url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._latest_comment_html_url = latest_comment_html_url + + @property + def latest_comment_url(self): + """Gets the latest_comment_url of this NotificationSubject. # noqa: E501 + + + :return: The latest_comment_url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._latest_comment_url + + @latest_comment_url.setter + def latest_comment_url(self, latest_comment_url): + """Sets the latest_comment_url of this NotificationSubject. + + + :param latest_comment_url: The latest_comment_url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._latest_comment_url = latest_comment_url + + @property + def state(self): + """Gets the state of this NotificationSubject. # noqa: E501 + + + :return: The state of this NotificationSubject. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this NotificationSubject. + + + :param state: The state of this NotificationSubject. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this NotificationSubject. # noqa: E501 + + + :return: The title of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this NotificationSubject. + + + :param title: The title of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def type(self): + """Gets the type of this NotificationSubject. # noqa: E501 + + + :return: The type of this NotificationSubject. # noqa: E501 + :rtype: NotifySubjectType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this NotificationSubject. + + + :param type: The type of this NotificationSubject. # noqa: E501 + :type: NotifySubjectType + """ + + self._type = type + + @property + def url(self): + """Gets the url of this NotificationSubject. # noqa: E501 + + + :return: The url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this NotificationSubject. + + + :param url: The url of this NotificationSubject. # 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(NotificationSubject, 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, NotificationSubject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotificationSubject): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/notification_thread.py b/gitea/models/notification_thread.py new file mode 100644 index 0000000..89e36b6 --- /dev/null +++ b/gitea/models/notification_thread.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NotificationThread(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 = { + 'id': 'int', + 'pinned': 'bool', + 'repository': 'Repository', + 'subject': 'NotificationSubject', + 'unread': 'bool', + 'updated_at': 'datetime', + 'url': 'str' + } + + attribute_map = { + 'id': 'id', + 'pinned': 'pinned', + 'repository': 'repository', + 'subject': 'subject', + 'unread': 'unread', + 'updated_at': 'updated_at', + 'url': 'url' + } + + def __init__(self, id=None, pinned=None, repository=None, subject=None, unread=None, updated_at=None, url=None, _configuration=None): # noqa: E501 + """NotificationThread - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._pinned = None + self._repository = None + self._subject = None + self._unread = None + self._updated_at = None + self._url = None + self.discriminator = None + + if id is not None: + self.id = id + if pinned is not None: + self.pinned = pinned + if repository is not None: + self.repository = repository + if subject is not None: + self.subject = subject + if unread is not None: + self.unread = unread + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + + @property + def id(self): + """Gets the id of this NotificationThread. # noqa: E501 + + + :return: The id of this NotificationThread. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationThread. + + + :param id: The id of this NotificationThread. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def pinned(self): + """Gets the pinned of this NotificationThread. # noqa: E501 + + + :return: The pinned of this NotificationThread. # noqa: E501 + :rtype: bool + """ + return self._pinned + + @pinned.setter + def pinned(self, pinned): + """Sets the pinned of this NotificationThread. + + + :param pinned: The pinned of this NotificationThread. # noqa: E501 + :type: bool + """ + + self._pinned = pinned + + @property + def repository(self): + """Gets the repository of this NotificationThread. # noqa: E501 + + + :return: The repository of this NotificationThread. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this NotificationThread. + + + :param repository: The repository of this NotificationThread. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def subject(self): + """Gets the subject of this NotificationThread. # noqa: E501 + + + :return: The subject of this NotificationThread. # noqa: E501 + :rtype: NotificationSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this NotificationThread. + + + :param subject: The subject of this NotificationThread. # noqa: E501 + :type: NotificationSubject + """ + + self._subject = subject + + @property + def unread(self): + """Gets the unread of this NotificationThread. # noqa: E501 + + + :return: The unread of this NotificationThread. # noqa: E501 + :rtype: bool + """ + return self._unread + + @unread.setter + def unread(self, unread): + """Sets the unread of this NotificationThread. + + + :param unread: The unread of this NotificationThread. # noqa: E501 + :type: bool + """ + + self._unread = unread + + @property + def updated_at(self): + """Gets the updated_at of this NotificationThread. # noqa: E501 + + + :return: The updated_at of this NotificationThread. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this NotificationThread. + + + :param updated_at: The updated_at of this NotificationThread. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this NotificationThread. # noqa: E501 + + + :return: The url of this NotificationThread. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this NotificationThread. + + + :param url: The url of this NotificationThread. # 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(NotificationThread, 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, NotificationThread): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotificationThread): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/notify_subject_type.py b/gitea/models/notify_subject_type.py new file mode 100644 index 0000000..dc692fe --- /dev/null +++ b/gitea/models/notify_subject_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class NotifySubjectType(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, _configuration=None): # noqa: E501 + """NotifySubjectType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(NotifySubjectType, 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, NotifySubjectType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotifySubjectType): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/o_auth2_application.py b/gitea/models/o_auth2_application.py new file mode 100644 index 0000000..da05a52 --- /dev/null +++ b/gitea/models/o_auth2_application.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class OAuth2Application(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 = { + 'client_id': 'str', + 'client_secret': 'str', + 'confidential_client': 'bool', + 'created': 'datetime', + 'id': 'int', + 'name': 'str', + 'redirect_uris': 'list[str]', + 'skip_secondary_authorization': 'bool' + } + + attribute_map = { + 'client_id': 'client_id', + 'client_secret': 'client_secret', + 'confidential_client': 'confidential_client', + 'created': 'created', + 'id': 'id', + 'name': 'name', + 'redirect_uris': 'redirect_uris', + 'skip_secondary_authorization': 'skip_secondary_authorization' + } + + def __init__(self, client_id=None, client_secret=None, confidential_client=None, created=None, id=None, name=None, redirect_uris=None, skip_secondary_authorization=None, _configuration=None): # noqa: E501 + """OAuth2Application - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._client_id = None + self._client_secret = None + self._confidential_client = None + self._created = None + self._id = None + self._name = None + self._redirect_uris = None + self._skip_secondary_authorization = None + self.discriminator = None + + if client_id is not None: + self.client_id = client_id + if client_secret is not None: + self.client_secret = client_secret + if confidential_client is not None: + self.confidential_client = confidential_client + if created is not None: + self.created = created + if id is not None: + self.id = id + if name is not None: + self.name = name + if redirect_uris is not None: + self.redirect_uris = redirect_uris + if skip_secondary_authorization is not None: + self.skip_secondary_authorization = skip_secondary_authorization + + @property + def client_id(self): + """Gets the client_id of this OAuth2Application. # noqa: E501 + + + :return: The client_id of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this OAuth2Application. + + + :param client_id: The client_id of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._client_id = client_id + + @property + def client_secret(self): + """Gets the client_secret of this OAuth2Application. # noqa: E501 + + + :return: The client_secret of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this OAuth2Application. + + + :param client_secret: The client_secret of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._client_secret = client_secret + + @property + def confidential_client(self): + """Gets the confidential_client of this OAuth2Application. # noqa: E501 + + + :return: The confidential_client of this OAuth2Application. # noqa: E501 + :rtype: bool + """ + return self._confidential_client + + @confidential_client.setter + def confidential_client(self, confidential_client): + """Sets the confidential_client of this OAuth2Application. + + + :param confidential_client: The confidential_client of this OAuth2Application. # noqa: E501 + :type: bool + """ + + self._confidential_client = confidential_client + + @property + def created(self): + """Gets the created of this OAuth2Application. # noqa: E501 + + + :return: The created of this OAuth2Application. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this OAuth2Application. + + + :param created: The created of this OAuth2Application. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this OAuth2Application. # noqa: E501 + + + :return: The id of this OAuth2Application. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OAuth2Application. + + + :param id: The id of this OAuth2Application. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this OAuth2Application. # noqa: E501 + + + :return: The name of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OAuth2Application. + + + :param name: The name of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def redirect_uris(self): + """Gets the redirect_uris of this OAuth2Application. # noqa: E501 + + + :return: The redirect_uris of this OAuth2Application. # noqa: E501 + :rtype: list[str] + """ + return self._redirect_uris + + @redirect_uris.setter + def redirect_uris(self, redirect_uris): + """Sets the redirect_uris of this OAuth2Application. + + + :param redirect_uris: The redirect_uris of this OAuth2Application. # noqa: E501 + :type: list[str] + """ + + self._redirect_uris = redirect_uris + + @property + def skip_secondary_authorization(self): + """Gets the skip_secondary_authorization of this OAuth2Application. # noqa: E501 + + + :return: The skip_secondary_authorization of this OAuth2Application. # noqa: E501 + :rtype: bool + """ + return self._skip_secondary_authorization + + @skip_secondary_authorization.setter + def skip_secondary_authorization(self, skip_secondary_authorization): + """Sets the skip_secondary_authorization of this OAuth2Application. + + + :param skip_secondary_authorization: The skip_secondary_authorization of this OAuth2Application. # noqa: E501 + :type: bool + """ + + self._skip_secondary_authorization = skip_secondary_authorization + + 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(OAuth2Application, 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, OAuth2Application): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OAuth2Application): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/organization.py b/gitea/models/organization.py new file mode 100644 index 0000000..88a707e --- /dev/null +++ b/gitea/models/organization.py @@ -0,0 +1,385 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'email': 'str', + 'full_name': 'str', + 'id': 'int', + 'location': 'str', + 'name': 'str', + 'repo_admin_change_team_access': 'bool', + 'username': 'str', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'avatar_url': 'avatar_url', + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'id': 'id', + 'location': 'location', + 'name': 'name', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'username': 'username', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, avatar_url=None, description=None, email=None, full_name=None, id=None, location=None, name=None, repo_admin_change_team_access=None, username=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """Organization - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._avatar_url = None + self._description = None + self._email = None + self._full_name = None + self._id = None + self._location = None + self._name = None + self._repo_admin_change_team_access = None + self._username = None + self._visibility = 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 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 location is not None: + self.location = location + if name is not None: + self.name = name + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + if username is not None: + self.username = username + if visibility is not None: + self.visibility = visibility + 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 email(self): + """Gets the email of this Organization. # noqa: E501 + + + :return: The email of this Organization. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Organization. + + + :param email: The email of this Organization. # noqa: E501 + :type: str + """ + + self._email = email + + @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 name(self): + """Gets the name of this Organization. # noqa: E501 + + + :return: The name of this Organization. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Organization. + + + :param name: The name of this Organization. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this Organization. # noqa: E501 + + + :return: The repo_admin_change_team_access of this Organization. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this Organization. + + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this Organization. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def username(self): + """Gets the username of this Organization. # noqa: E501 + + deprecated # 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. + + deprecated # noqa: E501 + + :param username: The username of this Organization. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this Organization. # noqa: E501 + + + :return: The visibility of this Organization. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this Organization. + + + :param visibility: The visibility of this Organization. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Organization): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/organization_permissions.py b/gitea/models/organization_permissions.py new file mode 100644 index 0000000..ed6be33 --- /dev/null +++ b/gitea/models/organization_permissions.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class OrganizationPermissions(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_create_repository': 'bool', + 'can_read': 'bool', + 'can_write': 'bool', + 'is_admin': 'bool', + 'is_owner': 'bool' + } + + attribute_map = { + 'can_create_repository': 'can_create_repository', + 'can_read': 'can_read', + 'can_write': 'can_write', + 'is_admin': 'is_admin', + 'is_owner': 'is_owner' + } + + def __init__(self, can_create_repository=None, can_read=None, can_write=None, is_admin=None, is_owner=None, _configuration=None): # noqa: E501 + """OrganizationPermissions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_repository = None + self._can_read = None + self._can_write = None + self._is_admin = None + self._is_owner = None + self.discriminator = None + + if can_create_repository is not None: + self.can_create_repository = can_create_repository + if can_read is not None: + self.can_read = can_read + if can_write is not None: + self.can_write = can_write + if is_admin is not None: + self.is_admin = is_admin + if is_owner is not None: + self.is_owner = is_owner + + @property + def can_create_repository(self): + """Gets the can_create_repository of this OrganizationPermissions. # noqa: E501 + + + :return: The can_create_repository of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._can_create_repository + + @can_create_repository.setter + def can_create_repository(self, can_create_repository): + """Sets the can_create_repository of this OrganizationPermissions. + + + :param can_create_repository: The can_create_repository of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._can_create_repository = can_create_repository + + @property + def can_read(self): + """Gets the can_read of this OrganizationPermissions. # noqa: E501 + + + :return: The can_read of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._can_read + + @can_read.setter + def can_read(self, can_read): + """Sets the can_read of this OrganizationPermissions. + + + :param can_read: The can_read of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._can_read = can_read + + @property + def can_write(self): + """Gets the can_write of this OrganizationPermissions. # noqa: E501 + + + :return: The can_write of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._can_write + + @can_write.setter + def can_write(self, can_write): + """Sets the can_write of this OrganizationPermissions. + + + :param can_write: The can_write of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._can_write = can_write + + @property + def is_admin(self): + """Gets the is_admin of this OrganizationPermissions. # noqa: E501 + + + :return: The is_admin of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this OrganizationPermissions. + + + :param is_admin: The is_admin of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @property + def is_owner(self): + """Gets the is_owner of this OrganizationPermissions. # noqa: E501 + + + :return: The is_owner of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._is_owner + + @is_owner.setter + def is_owner(self, is_owner): + """Sets the is_owner of this OrganizationPermissions. + + + :param is_owner: The is_owner of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._is_owner = is_owner + + 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(OrganizationPermissions, 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, OrganizationPermissions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrganizationPermissions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/package.py b/gitea/models/package.py new file mode 100644 index 0000000..8a55e2d --- /dev/null +++ b/gitea/models/package.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Package(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', + 'creator': 'User', + 'html_url': 'str', + 'id': 'int', + 'name': 'str', + 'owner': 'User', + 'repository': 'Repository', + 'type': 'str', + 'version': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'creator': 'creator', + 'html_url': 'html_url', + 'id': 'id', + 'name': 'name', + 'owner': 'owner', + 'repository': 'repository', + 'type': 'type', + 'version': 'version' + } + + def __init__(self, created_at=None, creator=None, html_url=None, id=None, name=None, owner=None, repository=None, type=None, version=None, _configuration=None): # noqa: E501 + """Package - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._creator = None + self._html_url = None + self._id = None + self._name = None + self._owner = None + self._repository = None + self._type = None + self._version = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if creator is not None: + self.creator = creator + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if name is not None: + self.name = name + if owner is not None: + self.owner = owner + if repository is not None: + self.repository = repository + if type is not None: + self.type = type + if version is not None: + self.version = version + + @property + def created_at(self): + """Gets the created_at of this Package. # noqa: E501 + + + :return: The created_at of this Package. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Package. + + + :param created_at: The created_at of this Package. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def creator(self): + """Gets the creator of this Package. # noqa: E501 + + + :return: The creator of this Package. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Package. + + + :param creator: The creator of this Package. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def html_url(self): + """Gets the html_url of this Package. # noqa: E501 + + + :return: The html_url of this Package. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Package. + + + :param html_url: The html_url of this Package. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Package. # noqa: E501 + + + :return: The id of this Package. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Package. + + + :param id: The id of this Package. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Package. # noqa: E501 + + + :return: The name of this Package. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Package. + + + :param name: The name of this Package. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner(self): + """Gets the owner of this Package. # noqa: E501 + + + :return: The owner of this Package. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Package. + + + :param owner: The owner of this Package. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def repository(self): + """Gets the repository of this Package. # noqa: E501 + + + :return: The repository of this Package. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this Package. + + + :param repository: The repository of this Package. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def type(self): + """Gets the type of this Package. # noqa: E501 + + + :return: The type of this Package. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Package. + + + :param type: The type of this Package. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def version(self): + """Gets the version of this Package. # noqa: E501 + + + :return: The version of this Package. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this Package. + + + :param version: The version of this Package. # 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(Package, 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, Package): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Package): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/package_file.py b/gitea/models/package_file.py new file mode 100644 index 0000000..dc746f5 --- /dev/null +++ b/gitea/models/package_file.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class PackageFile(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 = { + 'size': 'int', + 'id': 'int', + 'md5': 'str', + 'name': 'str', + 'sha1': 'str', + 'sha256': 'str', + 'sha512': 'str' + } + + attribute_map = { + 'size': 'Size', + 'id': 'id', + 'md5': 'md5', + 'name': 'name', + 'sha1': 'sha1', + 'sha256': 'sha256', + 'sha512': 'sha512' + } + + def __init__(self, size=None, id=None, md5=None, name=None, sha1=None, sha256=None, sha512=None, _configuration=None): # noqa: E501 + """PackageFile - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._size = None + self._id = None + self._md5 = None + self._name = None + self._sha1 = None + self._sha256 = None + self._sha512 = None + self.discriminator = None + + if size is not None: + self.size = size + if id is not None: + self.id = id + if md5 is not None: + self.md5 = md5 + if name is not None: + self.name = name + if sha1 is not None: + self.sha1 = sha1 + if sha256 is not None: + self.sha256 = sha256 + if sha512 is not None: + self.sha512 = sha512 + + @property + def size(self): + """Gets the size of this PackageFile. # noqa: E501 + + + :return: The size of this PackageFile. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PackageFile. + + + :param size: The size of this PackageFile. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def id(self): + """Gets the id of this PackageFile. # noqa: E501 + + + :return: The id of this PackageFile. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PackageFile. + + + :param id: The id of this PackageFile. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def md5(self): + """Gets the md5 of this PackageFile. # noqa: E501 + + + :return: The md5 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._md5 + + @md5.setter + def md5(self, md5): + """Sets the md5 of this PackageFile. + + + :param md5: The md5 of this PackageFile. # noqa: E501 + :type: str + """ + + self._md5 = md5 + + @property + def name(self): + """Gets the name of this PackageFile. # noqa: E501 + + + :return: The name of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PackageFile. + + + :param name: The name of this PackageFile. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def sha1(self): + """Gets the sha1 of this PackageFile. # noqa: E501 + + + :return: The sha1 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._sha1 + + @sha1.setter + def sha1(self, sha1): + """Sets the sha1 of this PackageFile. + + + :param sha1: The sha1 of this PackageFile. # noqa: E501 + :type: str + """ + + self._sha1 = sha1 + + @property + def sha256(self): + """Gets the sha256 of this PackageFile. # noqa: E501 + + + :return: The sha256 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._sha256 + + @sha256.setter + def sha256(self, sha256): + """Sets the sha256 of this PackageFile. + + + :param sha256: The sha256 of this PackageFile. # noqa: E501 + :type: str + """ + + self._sha256 = sha256 + + @property + def sha512(self): + """Gets the sha512 of this PackageFile. # noqa: E501 + + + :return: The sha512 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._sha512 + + @sha512.setter + def sha512(self, sha512): + """Sets the sha512 of this PackageFile. + + + :param sha512: The sha512 of this PackageFile. # noqa: E501 + :type: str + """ + + self._sha512 = sha512 + + 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(PackageFile, 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, PackageFile): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PackageFile): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/payload_commit.py b/gitea/models/payload_commit.py new file mode 100644 index 0000000..993d199 --- /dev/null +++ b/gitea/models/payload_commit.py @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'added': 'list[str]', + 'author': 'PayloadUser', + 'committer': 'PayloadUser', + 'id': 'str', + 'message': 'str', + 'modified': 'list[str]', + 'removed': 'list[str]', + 'timestamp': 'datetime', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'added': 'added', + 'author': 'author', + 'committer': 'committer', + 'id': 'id', + 'message': 'message', + 'modified': 'modified', + 'removed': 'removed', + 'timestamp': 'timestamp', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, added=None, author=None, committer=None, id=None, message=None, modified=None, removed=None, timestamp=None, url=None, verification=None, _configuration=None): # noqa: E501 + """PayloadCommit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._added = None + self._author = None + self._committer = None + self._id = None + self._message = None + self._modified = None + self._removed = None + self._timestamp = None + self._url = None + self._verification = None + self.discriminator = None + + if added is not None: + self.added = added + 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 modified is not None: + self.modified = modified + if removed is not None: + self.removed = removed + 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 added(self): + """Gets the added of this PayloadCommit. # noqa: E501 + + + :return: The added of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._added + + @added.setter + def added(self, added): + """Sets the added of this PayloadCommit. + + + :param added: The added of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._added = added + + @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 modified(self): + """Gets the modified of this PayloadCommit. # noqa: E501 + + + :return: The modified of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._modified + + @modified.setter + def modified(self, modified): + """Sets the modified of this PayloadCommit. + + + :param modified: The modified of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._modified = modified + + @property + def removed(self): + """Gets the removed of this PayloadCommit. # noqa: E501 + + + :return: The removed of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._removed + + @removed.setter + def removed(self, removed): + """Sets the removed of this PayloadCommit. + + + :param removed: The removed of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._removed = removed + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PayloadCommit): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/payload_commit_verification.py b/gitea/models/payload_commit_verification.py new file mode 100644 index 0000000..a0b5ad9 --- /dev/null +++ b/gitea/models/payload_commit_verification.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'signer': 'PayloadUser', + 'verified': 'bool' + } + + attribute_map = { + 'payload': 'payload', + 'reason': 'reason', + 'signature': 'signature', + 'signer': 'signer', + 'verified': 'verified' + } + + def __init__(self, payload=None, reason=None, signature=None, signer=None, verified=None, _configuration=None): # noqa: E501 + """PayloadCommitVerification - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._payload = None + self._reason = None + self._signature = None + self._signer = 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 signer is not None: + self.signer = signer + 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 signer(self): + """Gets the signer of this PayloadCommitVerification. # noqa: E501 + + + :return: The signer of this PayloadCommitVerification. # noqa: E501 + :rtype: PayloadUser + """ + return self._signer + + @signer.setter + def signer(self, signer): + """Sets the signer of this PayloadCommitVerification. + + + :param signer: The signer of this PayloadCommitVerification. # noqa: E501 + :type: PayloadUser + """ + + self._signer = signer + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PayloadCommitVerification): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/payload_user.py b/gitea/models/payload_user.py new file mode 100644 index 0000000..8d81fee --- /dev/null +++ b/gitea/models/payload_user.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """PayloadUser - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PayloadUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/permission.py b/gitea/models/permission.py new file mode 100644 index 0000000..2780858 --- /dev/null +++ b/gitea/models/permission.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """Permission - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Permission): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/pr_branch_info.py b/gitea/models/pr_branch_info.py new file mode 100644 index 0000000..24122f7 --- /dev/null +++ b/gitea/models/pr_branch_info.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """PRBranchInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PRBranchInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/public_key.py b/gitea/models/public_key.py new file mode 100644 index 0000000..5bfd24f --- /dev/null +++ b/gitea/models/public_key.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """PublicKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PublicKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/pull_request.py b/gitea/models/pull_request.py new file mode 100644 index 0000000..0f0d928 --- /dev/null +++ b/gitea/models/pull_request.py @@ -0,0 +1,1061 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'additions': 'int', + 'allow_maintainer_edit': 'bool', + 'assignee': 'User', + 'assignees': 'list[User]', + 'base': 'PRBranchInfo', + 'body': 'str', + 'changed_files': 'int', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'deletions': 'int', + 'diff_url': 'str', + 'draft': 'bool', + 'due_date': 'datetime', + 'head': 'PRBranchInfo', + 'html_url': 'str', + 'id': 'int', + 'is_locked': 'bool', + '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', + 'pin_order': 'int', + 'requested_reviewers': 'list[User]', + 'requested_reviewers_teams': 'list[Team]', + 'review_comments': 'int', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'additions': 'additions', + 'allow_maintainer_edit': 'allow_maintainer_edit', + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'changed_files': 'changed_files', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'deletions': 'deletions', + 'diff_url': 'diff_url', + 'draft': 'draft', + 'due_date': 'due_date', + 'head': 'head', + 'html_url': 'html_url', + 'id': 'id', + 'is_locked': 'is_locked', + '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', + 'pin_order': 'pin_order', + 'requested_reviewers': 'requested_reviewers', + 'requested_reviewers_teams': 'requested_reviewers_teams', + 'review_comments': 'review_comments', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, additions=None, allow_maintainer_edit=None, assignee=None, assignees=None, base=None, body=None, changed_files=None, closed_at=None, comments=None, created_at=None, deletions=None, diff_url=None, draft=None, due_date=None, head=None, html_url=None, id=None, is_locked=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, pin_order=None, requested_reviewers=None, requested_reviewers_teams=None, review_comments=None, state=None, title=None, updated_at=None, url=None, user=None, _configuration=None): # noqa: E501 + """PullRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._additions = None + self._allow_maintainer_edit = None + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._changed_files = None + self._closed_at = None + self._comments = None + self._created_at = None + self._deletions = None + self._diff_url = None + self._draft = None + self._due_date = None + self._head = None + self._html_url = None + self._id = None + self._is_locked = 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._pin_order = None + self._requested_reviewers = None + self._requested_reviewers_teams = None + self._review_comments = None + self._state = None + self._title = None + self._updated_at = None + self._url = None + self._user = None + self.discriminator = None + + if additions is not None: + self.additions = additions + if allow_maintainer_edit is not None: + self.allow_maintainer_edit = allow_maintainer_edit + 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 changed_files is not None: + self.changed_files = changed_files + 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 deletions is not None: + self.deletions = deletions + if diff_url is not None: + self.diff_url = diff_url + if draft is not None: + self.draft = draft + 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 is_locked is not None: + self.is_locked = is_locked + 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 pin_order is not None: + self.pin_order = pin_order + if requested_reviewers is not None: + self.requested_reviewers = requested_reviewers + if requested_reviewers_teams is not None: + self.requested_reviewers_teams = requested_reviewers_teams + if review_comments is not None: + self.review_comments = review_comments + 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 additions(self): + """Gets the additions of this PullRequest. # noqa: E501 + + + :return: The additions of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._additions + + @additions.setter + def additions(self, additions): + """Sets the additions of this PullRequest. + + + :param additions: The additions of this PullRequest. # noqa: E501 + :type: int + """ + + self._additions = additions + + @property + def allow_maintainer_edit(self): + """Gets the allow_maintainer_edit of this PullRequest. # noqa: E501 + + + :return: The allow_maintainer_edit of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._allow_maintainer_edit + + @allow_maintainer_edit.setter + def allow_maintainer_edit(self, allow_maintainer_edit): + """Sets the allow_maintainer_edit of this PullRequest. + + + :param allow_maintainer_edit: The allow_maintainer_edit of this PullRequest. # noqa: E501 + :type: bool + """ + + self._allow_maintainer_edit = allow_maintainer_edit + + @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 changed_files(self): + """Gets the changed_files of this PullRequest. # noqa: E501 + + + :return: The changed_files of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._changed_files + + @changed_files.setter + def changed_files(self, changed_files): + """Sets the changed_files of this PullRequest. + + + :param changed_files: The changed_files of this PullRequest. # noqa: E501 + :type: int + """ + + self._changed_files = changed_files + + @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 deletions(self): + """Gets the deletions of this PullRequest. # noqa: E501 + + + :return: The deletions of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._deletions + + @deletions.setter + def deletions(self, deletions): + """Sets the deletions of this PullRequest. + + + :param deletions: The deletions of this PullRequest. # noqa: E501 + :type: int + """ + + self._deletions = deletions + + @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 draft(self): + """Gets the draft of this PullRequest. # noqa: E501 + + + :return: The draft of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this PullRequest. + + + :param draft: The draft of this PullRequest. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @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 is_locked(self): + """Gets the is_locked of this PullRequest. # noqa: E501 + + + :return: The is_locked of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._is_locked + + @is_locked.setter + def is_locked(self, is_locked): + """Sets the is_locked of this PullRequest. + + + :param is_locked: The is_locked of this PullRequest. # noqa: E501 + :type: bool + """ + + self._is_locked = is_locked + + @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 pin_order(self): + """Gets the pin_order of this PullRequest. # noqa: E501 + + + :return: The pin_order of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._pin_order + + @pin_order.setter + def pin_order(self, pin_order): + """Sets the pin_order of this PullRequest. + + + :param pin_order: The pin_order of this PullRequest. # noqa: E501 + :type: int + """ + + self._pin_order = pin_order + + @property + def requested_reviewers(self): + """Gets the requested_reviewers of this PullRequest. # noqa: E501 + + + :return: The requested_reviewers of this PullRequest. # noqa: E501 + :rtype: list[User] + """ + return self._requested_reviewers + + @requested_reviewers.setter + def requested_reviewers(self, requested_reviewers): + """Sets the requested_reviewers of this PullRequest. + + + :param requested_reviewers: The requested_reviewers of this PullRequest. # noqa: E501 + :type: list[User] + """ + + self._requested_reviewers = requested_reviewers + + @property + def requested_reviewers_teams(self): + """Gets the requested_reviewers_teams of this PullRequest. # noqa: E501 + + + :return: The requested_reviewers_teams of this PullRequest. # noqa: E501 + :rtype: list[Team] + """ + return self._requested_reviewers_teams + + @requested_reviewers_teams.setter + def requested_reviewers_teams(self, requested_reviewers_teams): + """Sets the requested_reviewers_teams of this PullRequest. + + + :param requested_reviewers_teams: The requested_reviewers_teams of this PullRequest. # noqa: E501 + :type: list[Team] + """ + + self._requested_reviewers_teams = requested_reviewers_teams + + @property + def review_comments(self): + """Gets the review_comments of this PullRequest. # noqa: E501 + + number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) # noqa: E501 + + :return: The review_comments of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._review_comments + + @review_comments.setter + def review_comments(self, review_comments): + """Sets the review_comments of this PullRequest. + + number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) # noqa: E501 + + :param review_comments: The review_comments of this PullRequest. # noqa: E501 + :type: int + """ + + self._review_comments = review_comments + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/pull_request_meta.py b/gitea/models/pull_request_meta.py new file mode 100644 index 0000000..644f2dc --- /dev/null +++ b/gitea/models/pull_request_meta.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'draft': 'bool', + 'html_url': 'str', + 'merged': 'bool', + 'merged_at': 'datetime' + } + + attribute_map = { + 'draft': 'draft', + 'html_url': 'html_url', + 'merged': 'merged', + 'merged_at': 'merged_at' + } + + def __init__(self, draft=None, html_url=None, merged=None, merged_at=None, _configuration=None): # noqa: E501 + """PullRequestMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._draft = None + self._html_url = None + self._merged = None + self._merged_at = None + self.discriminator = None + + if draft is not None: + self.draft = draft + if html_url is not None: + self.html_url = html_url + if merged is not None: + self.merged = merged + if merged_at is not None: + self.merged_at = merged_at + + @property + def draft(self): + """Gets the draft of this PullRequestMeta. # noqa: E501 + + + :return: The draft of this PullRequestMeta. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this PullRequestMeta. + + + :param draft: The draft of this PullRequestMeta. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def html_url(self): + """Gets the html_url of this PullRequestMeta. # noqa: E501 + + + :return: The html_url of this PullRequestMeta. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullRequestMeta. + + + :param html_url: The html_url of this PullRequestMeta. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullRequestMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/pull_review.py b/gitea/models/pull_review.py new file mode 100644 index 0000000..e393b7e --- /dev/null +++ b/gitea/models/pull_review.py @@ -0,0 +1,461 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class PullReview(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', + 'comments_count': 'int', + 'commit_id': 'str', + 'dismissed': 'bool', + 'html_url': 'str', + 'id': 'int', + 'official': 'bool', + 'pull_request_url': 'str', + 'stale': 'bool', + 'state': 'ReviewStateType', + 'submitted_at': 'datetime', + 'team': 'Team', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'comments_count': 'comments_count', + 'commit_id': 'commit_id', + 'dismissed': 'dismissed', + 'html_url': 'html_url', + 'id': 'id', + 'official': 'official', + 'pull_request_url': 'pull_request_url', + 'stale': 'stale', + 'state': 'state', + 'submitted_at': 'submitted_at', + 'team': 'team', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, body=None, comments_count=None, commit_id=None, dismissed=None, html_url=None, id=None, official=None, pull_request_url=None, stale=None, state=None, submitted_at=None, team=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """PullReview - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._comments_count = None + self._commit_id = None + self._dismissed = None + self._html_url = None + self._id = None + self._official = None + self._pull_request_url = None + self._stale = None + self._state = None + self._submitted_at = None + self._team = None + self._updated_at = None + self._user = None + self.discriminator = None + + if body is not None: + self.body = body + if comments_count is not None: + self.comments_count = comments_count + if commit_id is not None: + self.commit_id = commit_id + if dismissed is not None: + self.dismissed = dismissed + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if official is not None: + self.official = official + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if stale is not None: + self.stale = stale + if state is not None: + self.state = state + if submitted_at is not None: + self.submitted_at = submitted_at + if team is not None: + self.team = team + 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 PullReview. # noqa: E501 + + + :return: The body of this PullReview. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullReview. + + + :param body: The body of this PullReview. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def comments_count(self): + """Gets the comments_count of this PullReview. # noqa: E501 + + + :return: The comments_count of this PullReview. # noqa: E501 + :rtype: int + """ + return self._comments_count + + @comments_count.setter + def comments_count(self, comments_count): + """Sets the comments_count of this PullReview. + + + :param comments_count: The comments_count of this PullReview. # noqa: E501 + :type: int + """ + + self._comments_count = comments_count + + @property + def commit_id(self): + """Gets the commit_id of this PullReview. # noqa: E501 + + + :return: The commit_id of this PullReview. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this PullReview. + + + :param commit_id: The commit_id of this PullReview. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def dismissed(self): + """Gets the dismissed of this PullReview. # noqa: E501 + + + :return: The dismissed of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._dismissed + + @dismissed.setter + def dismissed(self, dismissed): + """Sets the dismissed of this PullReview. + + + :param dismissed: The dismissed of this PullReview. # noqa: E501 + :type: bool + """ + + self._dismissed = dismissed + + @property + def html_url(self): + """Gets the html_url of this PullReview. # noqa: E501 + + + :return: The html_url of this PullReview. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullReview. + + + :param html_url: The html_url of this PullReview. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullReview. # noqa: E501 + + + :return: The id of this PullReview. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullReview. + + + :param id: The id of this PullReview. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def official(self): + """Gets the official of this PullReview. # noqa: E501 + + + :return: The official of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._official + + @official.setter + def official(self, official): + """Sets the official of this PullReview. + + + :param official: The official of this PullReview. # noqa: E501 + :type: bool + """ + + self._official = official + + @property + def pull_request_url(self): + """Gets the pull_request_url of this PullReview. # noqa: E501 + + + :return: The pull_request_url of this PullReview. # 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 PullReview. + + + :param pull_request_url: The pull_request_url of this PullReview. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def stale(self): + """Gets the stale of this PullReview. # noqa: E501 + + + :return: The stale of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._stale + + @stale.setter + def stale(self, stale): + """Sets the stale of this PullReview. + + + :param stale: The stale of this PullReview. # noqa: E501 + :type: bool + """ + + self._stale = stale + + @property + def state(self): + """Gets the state of this PullReview. # noqa: E501 + + + :return: The state of this PullReview. # noqa: E501 + :rtype: ReviewStateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this PullReview. + + + :param state: The state of this PullReview. # noqa: E501 + :type: ReviewStateType + """ + + self._state = state + + @property + def submitted_at(self): + """Gets the submitted_at of this PullReview. # noqa: E501 + + + :return: The submitted_at of this PullReview. # noqa: E501 + :rtype: datetime + """ + return self._submitted_at + + @submitted_at.setter + def submitted_at(self, submitted_at): + """Sets the submitted_at of this PullReview. + + + :param submitted_at: The submitted_at of this PullReview. # noqa: E501 + :type: datetime + """ + + self._submitted_at = submitted_at + + @property + def team(self): + """Gets the team of this PullReview. # noqa: E501 + + + :return: The team of this PullReview. # noqa: E501 + :rtype: Team + """ + return self._team + + @team.setter + def team(self, team): + """Sets the team of this PullReview. + + + :param team: The team of this PullReview. # noqa: E501 + :type: Team + """ + + self._team = team + + @property + def updated_at(self): + """Gets the updated_at of this PullReview. # noqa: E501 + + + :return: The updated_at of this PullReview. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullReview. + + + :param updated_at: The updated_at of this PullReview. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this PullReview. # noqa: E501 + + + :return: The user of this PullReview. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullReview. + + + :param user: The user of this PullReview. # 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(PullReview, 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, PullReview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullReview): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/pull_review_comment.py b/gitea/models/pull_review_comment.py new file mode 100644 index 0000000..254b1c8 --- /dev/null +++ b/gitea/models/pull_review_comment.py @@ -0,0 +1,487 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class PullReviewComment(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', + 'commit_id': 'str', + 'created_at': 'datetime', + 'diff_hunk': 'str', + 'html_url': 'str', + 'id': 'int', + 'original_commit_id': 'str', + 'original_position': 'int', + 'path': 'str', + 'position': 'int', + 'pull_request_review_id': 'int', + 'pull_request_url': 'str', + 'resolver': 'User', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'commit_id': 'commit_id', + 'created_at': 'created_at', + 'diff_hunk': 'diff_hunk', + 'html_url': 'html_url', + 'id': 'id', + 'original_commit_id': 'original_commit_id', + 'original_position': 'original_position', + 'path': 'path', + 'position': 'position', + 'pull_request_review_id': 'pull_request_review_id', + 'pull_request_url': 'pull_request_url', + 'resolver': 'resolver', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, body=None, commit_id=None, created_at=None, diff_hunk=None, html_url=None, id=None, original_commit_id=None, original_position=None, path=None, position=None, pull_request_review_id=None, pull_request_url=None, resolver=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """PullReviewComment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._commit_id = None + self._created_at = None + self._diff_hunk = None + self._html_url = None + self._id = None + self._original_commit_id = None + self._original_position = None + self._path = None + self._position = None + self._pull_request_review_id = None + self._pull_request_url = None + self._resolver = None + self._updated_at = None + self._user = None + self.discriminator = None + + if body is not None: + self.body = body + if commit_id is not None: + self.commit_id = commit_id + if created_at is not None: + self.created_at = created_at + if diff_hunk is not None: + self.diff_hunk = diff_hunk + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if original_commit_id is not None: + self.original_commit_id = original_commit_id + if original_position is not None: + self.original_position = original_position + if path is not None: + self.path = path + if position is not None: + self.position = position + if pull_request_review_id is not None: + self.pull_request_review_id = pull_request_review_id + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if resolver is not None: + self.resolver = resolver + 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 PullReviewComment. # noqa: E501 + + + :return: The body of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullReviewComment. + + + :param body: The body of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def commit_id(self): + """Gets the commit_id of this PullReviewComment. # noqa: E501 + + + :return: The commit_id of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this PullReviewComment. + + + :param commit_id: The commit_id of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def created_at(self): + """Gets the created_at of this PullReviewComment. # noqa: E501 + + + :return: The created_at of this PullReviewComment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PullReviewComment. + + + :param created_at: The created_at of this PullReviewComment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def diff_hunk(self): + """Gets the diff_hunk of this PullReviewComment. # noqa: E501 + + + :return: The diff_hunk of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._diff_hunk + + @diff_hunk.setter + def diff_hunk(self, diff_hunk): + """Sets the diff_hunk of this PullReviewComment. + + + :param diff_hunk: The diff_hunk of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._diff_hunk = diff_hunk + + @property + def html_url(self): + """Gets the html_url of this PullReviewComment. # noqa: E501 + + + :return: The html_url of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullReviewComment. + + + :param html_url: The html_url of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullReviewComment. # noqa: E501 + + + :return: The id of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullReviewComment. + + + :param id: The id of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def original_commit_id(self): + """Gets the original_commit_id of this PullReviewComment. # noqa: E501 + + + :return: The original_commit_id of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._original_commit_id + + @original_commit_id.setter + def original_commit_id(self, original_commit_id): + """Sets the original_commit_id of this PullReviewComment. + + + :param original_commit_id: The original_commit_id of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._original_commit_id = original_commit_id + + @property + def original_position(self): + """Gets the original_position of this PullReviewComment. # noqa: E501 + + + :return: The original_position of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._original_position + + @original_position.setter + def original_position(self, original_position): + """Sets the original_position of this PullReviewComment. + + + :param original_position: The original_position of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._original_position = original_position + + @property + def path(self): + """Gets the path of this PullReviewComment. # noqa: E501 + + + :return: The path of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this PullReviewComment. + + + :param path: The path of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def position(self): + """Gets the position of this PullReviewComment. # noqa: E501 + + + :return: The position of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._position + + @position.setter + def position(self, position): + """Sets the position of this PullReviewComment. + + + :param position: The position of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._position = position + + @property + def pull_request_review_id(self): + """Gets the pull_request_review_id of this PullReviewComment. # noqa: E501 + + + :return: The pull_request_review_id of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._pull_request_review_id + + @pull_request_review_id.setter + def pull_request_review_id(self, pull_request_review_id): + """Sets the pull_request_review_id of this PullReviewComment. + + + :param pull_request_review_id: The pull_request_review_id of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._pull_request_review_id = pull_request_review_id + + @property + def pull_request_url(self): + """Gets the pull_request_url of this PullReviewComment. # noqa: E501 + + + :return: The pull_request_url of this PullReviewComment. # 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 PullReviewComment. + + + :param pull_request_url: The pull_request_url of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def resolver(self): + """Gets the resolver of this PullReviewComment. # noqa: E501 + + + :return: The resolver of this PullReviewComment. # noqa: E501 + :rtype: User + """ + return self._resolver + + @resolver.setter + def resolver(self, resolver): + """Sets the resolver of this PullReviewComment. + + + :param resolver: The resolver of this PullReviewComment. # noqa: E501 + :type: User + """ + + self._resolver = resolver + + @property + def updated_at(self): + """Gets the updated_at of this PullReviewComment. # noqa: E501 + + + :return: The updated_at of this PullReviewComment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullReviewComment. + + + :param updated_at: The updated_at of this PullReviewComment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this PullReviewComment. # noqa: E501 + + + :return: The user of this PullReviewComment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullReviewComment. + + + :param user: The user of this PullReviewComment. # 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(PullReviewComment, 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, PullReviewComment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullReviewComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/pull_review_request_options.py b/gitea/models/pull_review_request_options.py new file mode 100644 index 0000000..7d7e168 --- /dev/null +++ b/gitea/models/pull_review_request_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class PullReviewRequestOptions(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 = { + 'reviewers': 'list[str]', + 'team_reviewers': 'list[str]' + } + + attribute_map = { + 'reviewers': 'reviewers', + 'team_reviewers': 'team_reviewers' + } + + def __init__(self, reviewers=None, team_reviewers=None, _configuration=None): # noqa: E501 + """PullReviewRequestOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._reviewers = None + self._team_reviewers = None + self.discriminator = None + + if reviewers is not None: + self.reviewers = reviewers + if team_reviewers is not None: + self.team_reviewers = team_reviewers + + @property + def reviewers(self): + """Gets the reviewers of this PullReviewRequestOptions. # noqa: E501 + + + :return: The reviewers of this PullReviewRequestOptions. # noqa: E501 + :rtype: list[str] + """ + return self._reviewers + + @reviewers.setter + def reviewers(self, reviewers): + """Sets the reviewers of this PullReviewRequestOptions. + + + :param reviewers: The reviewers of this PullReviewRequestOptions. # noqa: E501 + :type: list[str] + """ + + self._reviewers = reviewers + + @property + def team_reviewers(self): + """Gets the team_reviewers of this PullReviewRequestOptions. # noqa: E501 + + + :return: The team_reviewers of this PullReviewRequestOptions. # noqa: E501 + :rtype: list[str] + """ + return self._team_reviewers + + @team_reviewers.setter + def team_reviewers(self, team_reviewers): + """Sets the team_reviewers of this PullReviewRequestOptions. + + + :param team_reviewers: The team_reviewers of this PullReviewRequestOptions. # noqa: E501 + :type: list[str] + """ + + self._team_reviewers = team_reviewers + + 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(PullReviewRequestOptions, 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, PullReviewRequestOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullReviewRequestOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/push_mirror.py b/gitea/models/push_mirror.py new file mode 100644 index 0000000..0efbd1a --- /dev/null +++ b/gitea/models/push_mirror.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class PushMirror(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', + 'interval': 'str', + 'last_error': 'str', + 'last_update': 'datetime', + 'remote_address': 'str', + 'remote_name': 'str', + 'repo_name': 'str', + 'sync_on_commit': 'bool' + } + + attribute_map = { + 'created': 'created', + 'interval': 'interval', + 'last_error': 'last_error', + 'last_update': 'last_update', + 'remote_address': 'remote_address', + 'remote_name': 'remote_name', + 'repo_name': 'repo_name', + 'sync_on_commit': 'sync_on_commit' + } + + def __init__(self, created=None, interval=None, last_error=None, last_update=None, remote_address=None, remote_name=None, repo_name=None, sync_on_commit=None, _configuration=None): # noqa: E501 + """PushMirror - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._interval = None + self._last_error = None + self._last_update = None + self._remote_address = None + self._remote_name = None + self._repo_name = None + self._sync_on_commit = None + self.discriminator = None + + if created is not None: + self.created = created + if interval is not None: + self.interval = interval + if last_error is not None: + self.last_error = last_error + if last_update is not None: + self.last_update = last_update + if remote_address is not None: + self.remote_address = remote_address + if remote_name is not None: + self.remote_name = remote_name + if repo_name is not None: + self.repo_name = repo_name + if sync_on_commit is not None: + self.sync_on_commit = sync_on_commit + + @property + def created(self): + """Gets the created of this PushMirror. # noqa: E501 + + + :return: The created of this PushMirror. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this PushMirror. + + + :param created: The created of this PushMirror. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def interval(self): + """Gets the interval of this PushMirror. # noqa: E501 + + + :return: The interval of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._interval + + @interval.setter + def interval(self, interval): + """Sets the interval of this PushMirror. + + + :param interval: The interval of this PushMirror. # noqa: E501 + :type: str + """ + + self._interval = interval + + @property + def last_error(self): + """Gets the last_error of this PushMirror. # noqa: E501 + + + :return: The last_error of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._last_error + + @last_error.setter + def last_error(self, last_error): + """Sets the last_error of this PushMirror. + + + :param last_error: The last_error of this PushMirror. # noqa: E501 + :type: str + """ + + self._last_error = last_error + + @property + def last_update(self): + """Gets the last_update of this PushMirror. # noqa: E501 + + + :return: The last_update of this PushMirror. # noqa: E501 + :rtype: datetime + """ + return self._last_update + + @last_update.setter + def last_update(self, last_update): + """Sets the last_update of this PushMirror. + + + :param last_update: The last_update of this PushMirror. # noqa: E501 + :type: datetime + """ + + self._last_update = last_update + + @property + def remote_address(self): + """Gets the remote_address of this PushMirror. # noqa: E501 + + + :return: The remote_address of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._remote_address + + @remote_address.setter + def remote_address(self, remote_address): + """Sets the remote_address of this PushMirror. + + + :param remote_address: The remote_address of this PushMirror. # noqa: E501 + :type: str + """ + + self._remote_address = remote_address + + @property + def remote_name(self): + """Gets the remote_name of this PushMirror. # noqa: E501 + + + :return: The remote_name of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._remote_name + + @remote_name.setter + def remote_name(self, remote_name): + """Sets the remote_name of this PushMirror. + + + :param remote_name: The remote_name of this PushMirror. # noqa: E501 + :type: str + """ + + self._remote_name = remote_name + + @property + def repo_name(self): + """Gets the repo_name of this PushMirror. # noqa: E501 + + + :return: The repo_name of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this PushMirror. + + + :param repo_name: The repo_name of this PushMirror. # noqa: E501 + :type: str + """ + + self._repo_name = repo_name + + @property + def sync_on_commit(self): + """Gets the sync_on_commit of this PushMirror. # noqa: E501 + + + :return: The sync_on_commit of this PushMirror. # noqa: E501 + :rtype: bool + """ + return self._sync_on_commit + + @sync_on_commit.setter + def sync_on_commit(self, sync_on_commit): + """Sets the sync_on_commit of this PushMirror. + + + :param sync_on_commit: The sync_on_commit of this PushMirror. # noqa: E501 + :type: bool + """ + + self._sync_on_commit = sync_on_commit + + 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(PushMirror, 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, PushMirror): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PushMirror): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/reaction.py b/gitea/models/reaction.py new file mode 100644 index 0000000..b3c791f --- /dev/null +++ b/gitea/models/reaction.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Reaction(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 = { + 'content': 'str', + 'created_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'content': 'content', + 'created_at': 'created_at', + 'user': 'user' + } + + def __init__(self, content=None, created_at=None, user=None, _configuration=None): # noqa: E501 + """Reaction - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._created_at = None + self._user = None + self.discriminator = None + + if content is not None: + self.content = content + if created_at is not None: + self.created_at = created_at + if user is not None: + self.user = user + + @property + def content(self): + """Gets the content of this Reaction. # noqa: E501 + + + :return: The content of this Reaction. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this Reaction. + + + :param content: The content of this Reaction. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def created_at(self): + """Gets the created_at of this Reaction. # noqa: E501 + + + :return: The created_at of this Reaction. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Reaction. + + + :param created_at: The created_at of this Reaction. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def user(self): + """Gets the user of this Reaction. # noqa: E501 + + + :return: The user of this Reaction. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Reaction. + + + :param user: The user of this Reaction. # 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(Reaction, 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, Reaction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Reaction): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/reference.py b/gitea/models/reference.py new file mode 100644 index 0000000..7a395f1 --- /dev/null +++ b/gitea/models/reference.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """Reference - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Reference): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/release.py b/gitea/models/release.py new file mode 100644 index 0000000..47eb4b6 --- /dev/null +++ b/gitea/models/release.py @@ -0,0 +1,513 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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', + 'html_url': 'str', + 'id': 'int', + 'name': 'str', + 'prerelease': 'bool', + 'published_at': 'datetime', + 'tag_name': 'str', + 'tarball_url': 'str', + 'target_commitish': 'str', + 'upload_url': 'str', + 'url': 'str', + 'zipball_url': 'str' + } + + attribute_map = { + 'assets': 'assets', + 'author': 'author', + 'body': 'body', + 'created_at': 'created_at', + 'draft': 'draft', + 'html_url': 'html_url', + 'id': 'id', + 'name': 'name', + 'prerelease': 'prerelease', + 'published_at': 'published_at', + 'tag_name': 'tag_name', + 'tarball_url': 'tarball_url', + 'target_commitish': 'target_commitish', + 'upload_url': 'upload_url', + 'url': 'url', + 'zipball_url': 'zipball_url' + } + + def __init__(self, assets=None, author=None, body=None, created_at=None, draft=None, html_url=None, id=None, name=None, prerelease=None, published_at=None, tag_name=None, tarball_url=None, target_commitish=None, upload_url=None, url=None, zipball_url=None, _configuration=None): # noqa: E501 + """Release - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assets = None + self._author = None + self._body = None + self._created_at = None + self._draft = None + self._html_url = 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._upload_url = 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 html_url is not None: + self.html_url = html_url + 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 upload_url is not None: + self.upload_url = upload_url + 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 html_url(self): + """Gets the html_url of this Release. # noqa: E501 + + + :return: The html_url of this Release. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Release. + + + :param html_url: The html_url of this Release. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @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 upload_url(self): + """Gets the upload_url of this Release. # noqa: E501 + + + :return: The upload_url of this Release. # noqa: E501 + :rtype: str + """ + return self._upload_url + + @upload_url.setter + def upload_url(self, upload_url): + """Sets the upload_url of this Release. + + + :param upload_url: The upload_url of this Release. # noqa: E501 + :type: str + """ + + self._upload_url = upload_url + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Release): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/rename_user_option.py b/gitea/models/rename_user_option.py new file mode 100644 index 0000000..94d4985 --- /dev/null +++ b/gitea/models/rename_user_option.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class RenameUserOption(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 = { + 'new_username': 'str' + } + + attribute_map = { + 'new_username': 'new_username' + } + + def __init__(self, new_username=None, _configuration=None): # noqa: E501 + """RenameUserOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new_username = None + self.discriminator = None + + self.new_username = new_username + + @property + def new_username(self): + """Gets the new_username of this RenameUserOption. # noqa: E501 + + New username for this user. This name cannot be in use yet by any other user. # noqa: E501 + + :return: The new_username of this RenameUserOption. # noqa: E501 + :rtype: str + """ + return self._new_username + + @new_username.setter + def new_username(self, new_username): + """Sets the new_username of this RenameUserOption. + + New username for this user. This name cannot be in use yet by any other user. # noqa: E501 + + :param new_username: The new_username of this RenameUserOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and new_username is None: + raise ValueError("Invalid value for `new_username`, must not be `None`") # noqa: E501 + + self._new_username = new_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(RenameUserOption, 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, RenameUserOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RenameUserOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/repo_collaborator_permission.py b/gitea/models/repo_collaborator_permission.py new file mode 100644 index 0000000..a6db19b --- /dev/null +++ b/gitea/models/repo_collaborator_permission.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class RepoCollaboratorPermission(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', + 'role_name': 'str', + 'user': 'User' + } + + attribute_map = { + 'permission': 'permission', + 'role_name': 'role_name', + 'user': 'user' + } + + def __init__(self, permission=None, role_name=None, user=None, _configuration=None): # noqa: E501 + """RepoCollaboratorPermission - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._permission = None + self._role_name = None + self._user = None + self.discriminator = None + + if permission is not None: + self.permission = permission + if role_name is not None: + self.role_name = role_name + if user is not None: + self.user = user + + @property + def permission(self): + """Gets the permission of this RepoCollaboratorPermission. # noqa: E501 + + + :return: The permission of this RepoCollaboratorPermission. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this RepoCollaboratorPermission. + + + :param permission: The permission of this RepoCollaboratorPermission. # noqa: E501 + :type: str + """ + + self._permission = permission + + @property + def role_name(self): + """Gets the role_name of this RepoCollaboratorPermission. # noqa: E501 + + + :return: The role_name of this RepoCollaboratorPermission. # noqa: E501 + :rtype: str + """ + return self._role_name + + @role_name.setter + def role_name(self, role_name): + """Sets the role_name of this RepoCollaboratorPermission. + + + :param role_name: The role_name of this RepoCollaboratorPermission. # noqa: E501 + :type: str + """ + + self._role_name = role_name + + @property + def user(self): + """Gets the user of this RepoCollaboratorPermission. # noqa: E501 + + + :return: The user of this RepoCollaboratorPermission. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this RepoCollaboratorPermission. + + + :param user: The user of this RepoCollaboratorPermission. # 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(RepoCollaboratorPermission, 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, RepoCollaboratorPermission): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoCollaboratorPermission): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/repo_commit.py b/gitea/models/repo_commit.py new file mode 100644 index 0000000..09f677e --- /dev/null +++ b/gitea/models/repo_commit.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class RepoCommit(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': 'CommitUser', + 'committer': 'CommitUser', + 'message': 'str', + 'tree': 'CommitMeta', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer', + 'message': 'message', + 'tree': 'tree', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, author=None, committer=None, message=None, tree=None, url=None, verification=None, _configuration=None): # noqa: E501 + """RepoCommit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._committer = None + self._message = None + self._tree = 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 message is not None: + self.message = message + if tree is not None: + self.tree = tree + 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 RepoCommit. # noqa: E501 + + + :return: The author of this RepoCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this RepoCommit. + + + :param author: The author of this RepoCommit. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this RepoCommit. # noqa: E501 + + + :return: The committer of this RepoCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this RepoCommit. + + + :param committer: The committer of this RepoCommit. # noqa: E501 + :type: CommitUser + """ + + self._committer = committer + + @property + def message(self): + """Gets the message of this RepoCommit. # noqa: E501 + + + :return: The message of this RepoCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this RepoCommit. + + + :param message: The message of this RepoCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def tree(self): + """Gets the tree of this RepoCommit. # noqa: E501 + + + :return: The tree of this RepoCommit. # noqa: E501 + :rtype: CommitMeta + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this RepoCommit. + + + :param tree: The tree of this RepoCommit. # noqa: E501 + :type: CommitMeta + """ + + self._tree = tree + + @property + def url(self): + """Gets the url of this RepoCommit. # noqa: E501 + + + :return: The url of this RepoCommit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this RepoCommit. + + + :param url: The url of this RepoCommit. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this RepoCommit. # noqa: E501 + + + :return: The verification of this RepoCommit. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this RepoCommit. + + + :param verification: The verification of this RepoCommit. # 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(RepoCommit, 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, RepoCommit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoCommit): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/repo_topic_options.py b/gitea/models/repo_topic_options.py new file mode 100644 index 0000000..783beb0 --- /dev/null +++ b/gitea/models/repo_topic_options.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class RepoTopicOptions(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 = { + 'topics': 'list[str]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None, _configuration=None): # noqa: E501 + """RepoTopicOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this RepoTopicOptions. # noqa: E501 + + list of topic names # noqa: E501 + + :return: The topics of this RepoTopicOptions. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this RepoTopicOptions. + + list of topic names # noqa: E501 + + :param topics: The topics of this RepoTopicOptions. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + 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(RepoTopicOptions, 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, RepoTopicOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoTopicOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/repo_transfer.py b/gitea/models/repo_transfer.py new file mode 100644 index 0000000..f7599bd --- /dev/null +++ b/gitea/models/repo_transfer.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class RepoTransfer(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 = { + 'doer': 'User', + 'recipient': 'User', + 'teams': 'list[Team]' + } + + attribute_map = { + 'doer': 'doer', + 'recipient': 'recipient', + 'teams': 'teams' + } + + def __init__(self, doer=None, recipient=None, teams=None, _configuration=None): # noqa: E501 + """RepoTransfer - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._doer = None + self._recipient = None + self._teams = None + self.discriminator = None + + if doer is not None: + self.doer = doer + if recipient is not None: + self.recipient = recipient + if teams is not None: + self.teams = teams + + @property + def doer(self): + """Gets the doer of this RepoTransfer. # noqa: E501 + + + :return: The doer of this RepoTransfer. # noqa: E501 + :rtype: User + """ + return self._doer + + @doer.setter + def doer(self, doer): + """Sets the doer of this RepoTransfer. + + + :param doer: The doer of this RepoTransfer. # noqa: E501 + :type: User + """ + + self._doer = doer + + @property + def recipient(self): + """Gets the recipient of this RepoTransfer. # noqa: E501 + + + :return: The recipient of this RepoTransfer. # noqa: E501 + :rtype: User + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this RepoTransfer. + + + :param recipient: The recipient of this RepoTransfer. # noqa: E501 + :type: User + """ + + self._recipient = recipient + + @property + def teams(self): + """Gets the teams of this RepoTransfer. # noqa: E501 + + + :return: The teams of this RepoTransfer. # noqa: E501 + :rtype: list[Team] + """ + return self._teams + + @teams.setter + def teams(self, teams): + """Sets the teams of this RepoTransfer. + + + :param teams: The teams of this RepoTransfer. # noqa: E501 + :type: list[Team] + """ + + self._teams = teams + + 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(RepoTransfer, 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, RepoTransfer): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoTransfer): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/repository.py b/gitea/models/repository.py new file mode 100644 index 0000000..aed8ca1 --- /dev/null +++ b/gitea/models/repository.py @@ -0,0 +1,1718 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'allow_fast_forward_only_merge': 'bool', + 'allow_merge_commits': 'bool', + 'allow_rebase': 'bool', + 'allow_rebase_explicit': 'bool', + 'allow_rebase_update': 'bool', + 'allow_squash_merge': 'bool', + 'archived': 'bool', + 'archived_at': 'datetime', + 'avatar_url': 'str', + 'clone_url': 'str', + 'created_at': 'datetime', + 'default_allow_maintainer_edit': 'bool', + 'default_branch': 'str', + 'default_delete_branch_after_merge': 'bool', + 'default_merge_style': 'str', + 'description': 'str', + 'empty': 'bool', + 'external_tracker': 'ExternalTracker', + 'external_wiki': 'ExternalWiki', + 'fork': 'bool', + 'forks_count': 'int', + 'full_name': 'str', + 'has_actions': 'bool', + 'has_issues': 'bool', + 'has_packages': 'bool', + 'has_projects': 'bool', + 'has_pull_requests': 'bool', + 'has_releases': 'bool', + 'has_wiki': 'bool', + 'html_url': 'str', + 'id': 'int', + 'ignore_whitespace_conflicts': 'bool', + 'internal': 'bool', + 'internal_tracker': 'InternalTracker', + 'language': 'str', + 'languages_url': 'str', + 'licenses': 'list[str]', + 'link': 'str', + 'mirror': 'bool', + 'mirror_interval': 'str', + 'mirror_updated': 'datetime', + 'name': 'str', + 'object_format_name': 'str', + 'open_issues_count': 'int', + 'open_pr_counter': 'int', + 'original_url': 'str', + 'owner': 'User', + 'parent': 'Repository', + 'permissions': 'Permission', + 'private': 'bool', + 'projects_mode': 'str', + 'release_counter': 'int', + 'repo_transfer': 'RepoTransfer', + 'size': 'int', + 'ssh_url': 'str', + 'stars_count': 'int', + 'template': 'bool', + 'topics': 'list[str]', + 'updated_at': 'datetime', + 'url': 'str', + 'watchers_count': 'int', + 'website': 'str' + } + + attribute_map = { + 'allow_fast_forward_only_merge': 'allow_fast_forward_only_merge', + 'allow_merge_commits': 'allow_merge_commits', + 'allow_rebase': 'allow_rebase', + 'allow_rebase_explicit': 'allow_rebase_explicit', + 'allow_rebase_update': 'allow_rebase_update', + 'allow_squash_merge': 'allow_squash_merge', + 'archived': 'archived', + 'archived_at': 'archived_at', + 'avatar_url': 'avatar_url', + 'clone_url': 'clone_url', + 'created_at': 'created_at', + 'default_allow_maintainer_edit': 'default_allow_maintainer_edit', + 'default_branch': 'default_branch', + 'default_delete_branch_after_merge': 'default_delete_branch_after_merge', + 'default_merge_style': 'default_merge_style', + 'description': 'description', + 'empty': 'empty', + 'external_tracker': 'external_tracker', + 'external_wiki': 'external_wiki', + 'fork': 'fork', + 'forks_count': 'forks_count', + 'full_name': 'full_name', + 'has_actions': 'has_actions', + 'has_issues': 'has_issues', + 'has_packages': 'has_packages', + 'has_projects': 'has_projects', + 'has_pull_requests': 'has_pull_requests', + 'has_releases': 'has_releases', + 'has_wiki': 'has_wiki', + 'html_url': 'html_url', + 'id': 'id', + 'ignore_whitespace_conflicts': 'ignore_whitespace_conflicts', + 'internal': 'internal', + 'internal_tracker': 'internal_tracker', + 'language': 'language', + 'languages_url': 'languages_url', + 'licenses': 'licenses', + 'link': 'link', + 'mirror': 'mirror', + 'mirror_interval': 'mirror_interval', + 'mirror_updated': 'mirror_updated', + 'name': 'name', + 'object_format_name': 'object_format_name', + 'open_issues_count': 'open_issues_count', + 'open_pr_counter': 'open_pr_counter', + 'original_url': 'original_url', + 'owner': 'owner', + 'parent': 'parent', + 'permissions': 'permissions', + 'private': 'private', + 'projects_mode': 'projects_mode', + 'release_counter': 'release_counter', + 'repo_transfer': 'repo_transfer', + 'size': 'size', + 'ssh_url': 'ssh_url', + 'stars_count': 'stars_count', + 'template': 'template', + 'topics': 'topics', + 'updated_at': 'updated_at', + 'url': 'url', + 'watchers_count': 'watchers_count', + 'website': 'website' + } + + def __init__(self, allow_fast_forward_only_merge=None, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_rebase_update=None, allow_squash_merge=None, archived=None, archived_at=None, avatar_url=None, clone_url=None, created_at=None, default_allow_maintainer_edit=None, default_branch=None, default_delete_branch_after_merge=None, default_merge_style=None, description=None, empty=None, external_tracker=None, external_wiki=None, fork=None, forks_count=None, full_name=None, has_actions=None, has_issues=None, has_packages=None, has_projects=None, has_pull_requests=None, has_releases=None, has_wiki=None, html_url=None, id=None, ignore_whitespace_conflicts=None, internal=None, internal_tracker=None, language=None, languages_url=None, licenses=None, link=None, mirror=None, mirror_interval=None, mirror_updated=None, name=None, object_format_name=None, open_issues_count=None, open_pr_counter=None, original_url=None, owner=None, parent=None, permissions=None, private=None, projects_mode=None, release_counter=None, repo_transfer=None, size=None, ssh_url=None, stars_count=None, template=None, topics=None, updated_at=None, url=None, watchers_count=None, website=None, _configuration=None): # noqa: E501 + """Repository - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_fast_forward_only_merge = None + self._allow_merge_commits = None + self._allow_rebase = None + self._allow_rebase_explicit = None + self._allow_rebase_update = None + self._allow_squash_merge = None + self._archived = None + self._archived_at = None + self._avatar_url = None + self._clone_url = None + self._created_at = None + self._default_allow_maintainer_edit = None + self._default_branch = None + self._default_delete_branch_after_merge = None + self._default_merge_style = None + self._description = None + self._empty = None + self._external_tracker = None + self._external_wiki = None + self._fork = None + self._forks_count = None + self._full_name = None + self._has_actions = None + self._has_issues = None + self._has_packages = None + self._has_projects = None + self._has_pull_requests = None + self._has_releases = None + self._has_wiki = None + self._html_url = None + self._id = None + self._ignore_whitespace_conflicts = None + self._internal = None + self._internal_tracker = None + self._language = None + self._languages_url = None + self._licenses = None + self._link = None + self._mirror = None + self._mirror_interval = None + self._mirror_updated = None + self._name = None + self._object_format_name = None + self._open_issues_count = None + self._open_pr_counter = None + self._original_url = None + self._owner = None + self._parent = None + self._permissions = None + self._private = None + self._projects_mode = None + self._release_counter = None + self._repo_transfer = None + self._size = None + self._ssh_url = None + self._stars_count = None + self._template = None + self._topics = None + self._updated_at = None + self._url = None + self._watchers_count = None + self._website = None + self.discriminator = None + + if allow_fast_forward_only_merge is not None: + self.allow_fast_forward_only_merge = allow_fast_forward_only_merge + if allow_merge_commits is not None: + self.allow_merge_commits = allow_merge_commits + if allow_rebase is not None: + self.allow_rebase = allow_rebase + if allow_rebase_explicit is not None: + self.allow_rebase_explicit = allow_rebase_explicit + if allow_rebase_update is not None: + self.allow_rebase_update = allow_rebase_update + if allow_squash_merge is not None: + self.allow_squash_merge = allow_squash_merge + if archived is not None: + self.archived = archived + if archived_at is not None: + self.archived_at = archived_at + if avatar_url is not None: + self.avatar_url = avatar_url + if clone_url is not None: + self.clone_url = clone_url + if created_at is not None: + self.created_at = created_at + if default_allow_maintainer_edit is not None: + self.default_allow_maintainer_edit = default_allow_maintainer_edit + if default_branch is not None: + self.default_branch = default_branch + if default_delete_branch_after_merge is not None: + self.default_delete_branch_after_merge = default_delete_branch_after_merge + if default_merge_style is not None: + self.default_merge_style = default_merge_style + if description is not None: + self.description = description + if empty is not None: + self.empty = empty + if external_tracker is not None: + self.external_tracker = external_tracker + if external_wiki is not None: + self.external_wiki = external_wiki + 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 has_actions is not None: + self.has_actions = has_actions + if has_issues is not None: + self.has_issues = has_issues + if has_packages is not None: + self.has_packages = has_packages + if has_projects is not None: + self.has_projects = has_projects + if has_pull_requests is not None: + self.has_pull_requests = has_pull_requests + if has_releases is not None: + self.has_releases = has_releases + if has_wiki is not None: + self.has_wiki = has_wiki + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if ignore_whitespace_conflicts is not None: + self.ignore_whitespace_conflicts = ignore_whitespace_conflicts + if internal is not None: + self.internal = internal + if internal_tracker is not None: + self.internal_tracker = internal_tracker + if language is not None: + self.language = language + if languages_url is not None: + self.languages_url = languages_url + if licenses is not None: + self.licenses = licenses + if link is not None: + self.link = link + if mirror is not None: + self.mirror = mirror + if mirror_interval is not None: + self.mirror_interval = mirror_interval + if mirror_updated is not None: + self.mirror_updated = mirror_updated + if name is not None: + self.name = name + if object_format_name is not None: + self.object_format_name = object_format_name + if open_issues_count is not None: + self.open_issues_count = open_issues_count + if open_pr_counter is not None: + self.open_pr_counter = open_pr_counter + if original_url is not None: + self.original_url = original_url + 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 projects_mode is not None: + self.projects_mode = projects_mode + if release_counter is not None: + self.release_counter = release_counter + if repo_transfer is not None: + self.repo_transfer = repo_transfer + 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 template is not None: + self.template = template + if topics is not None: + self.topics = topics + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if watchers_count is not None: + self.watchers_count = watchers_count + if website is not None: + self.website = website + + @property + def allow_fast_forward_only_merge(self): + """Gets the allow_fast_forward_only_merge of this Repository. # noqa: E501 + + + :return: The allow_fast_forward_only_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_fast_forward_only_merge + + @allow_fast_forward_only_merge.setter + def allow_fast_forward_only_merge(self, allow_fast_forward_only_merge): + """Sets the allow_fast_forward_only_merge of this Repository. + + + :param allow_fast_forward_only_merge: The allow_fast_forward_only_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_fast_forward_only_merge = allow_fast_forward_only_merge + + @property + def allow_merge_commits(self): + """Gets the allow_merge_commits of this Repository. # noqa: E501 + + + :return: The allow_merge_commits of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_merge_commits + + @allow_merge_commits.setter + def allow_merge_commits(self, allow_merge_commits): + """Sets the allow_merge_commits of this Repository. + + + :param allow_merge_commits: The allow_merge_commits of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_merge_commits = allow_merge_commits + + @property + def allow_rebase(self): + """Gets the allow_rebase of this Repository. # noqa: E501 + + + :return: The allow_rebase of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase + + @allow_rebase.setter + def allow_rebase(self, allow_rebase): + """Sets the allow_rebase of this Repository. + + + :param allow_rebase: The allow_rebase of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase = allow_rebase + + @property + def allow_rebase_explicit(self): + """Gets the allow_rebase_explicit of this Repository. # noqa: E501 + + + :return: The allow_rebase_explicit of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_explicit + + @allow_rebase_explicit.setter + def allow_rebase_explicit(self, allow_rebase_explicit): + """Sets the allow_rebase_explicit of this Repository. + + + :param allow_rebase_explicit: The allow_rebase_explicit of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase_explicit = allow_rebase_explicit + + @property + def allow_rebase_update(self): + """Gets the allow_rebase_update of this Repository. # noqa: E501 + + + :return: The allow_rebase_update of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_update + + @allow_rebase_update.setter + def allow_rebase_update(self, allow_rebase_update): + """Sets the allow_rebase_update of this Repository. + + + :param allow_rebase_update: The allow_rebase_update of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase_update = allow_rebase_update + + @property + def allow_squash_merge(self): + """Gets the allow_squash_merge of this Repository. # noqa: E501 + + + :return: The allow_squash_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_squash_merge + + @allow_squash_merge.setter + def allow_squash_merge(self, allow_squash_merge): + """Sets the allow_squash_merge of this Repository. + + + :param allow_squash_merge: The allow_squash_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_squash_merge = allow_squash_merge + + @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 archived_at(self): + """Gets the archived_at of this Repository. # noqa: E501 + + + :return: The archived_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._archived_at + + @archived_at.setter + def archived_at(self, archived_at): + """Sets the archived_at of this Repository. + + + :param archived_at: The archived_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._archived_at = archived_at + + @property + def avatar_url(self): + """Gets the avatar_url of this Repository. # noqa: E501 + + + :return: The avatar_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this Repository. + + + :param avatar_url: The avatar_url of this Repository. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @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_allow_maintainer_edit(self): + """Gets the default_allow_maintainer_edit of this Repository. # noqa: E501 + + + :return: The default_allow_maintainer_edit of this Repository. # noqa: E501 + :rtype: bool + """ + return self._default_allow_maintainer_edit + + @default_allow_maintainer_edit.setter + def default_allow_maintainer_edit(self, default_allow_maintainer_edit): + """Sets the default_allow_maintainer_edit of this Repository. + + + :param default_allow_maintainer_edit: The default_allow_maintainer_edit of this Repository. # noqa: E501 + :type: bool + """ + + self._default_allow_maintainer_edit = default_allow_maintainer_edit + + @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 default_delete_branch_after_merge(self): + """Gets the default_delete_branch_after_merge of this Repository. # noqa: E501 + + + :return: The default_delete_branch_after_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._default_delete_branch_after_merge + + @default_delete_branch_after_merge.setter + def default_delete_branch_after_merge(self, default_delete_branch_after_merge): + """Sets the default_delete_branch_after_merge of this Repository. + + + :param default_delete_branch_after_merge: The default_delete_branch_after_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._default_delete_branch_after_merge = default_delete_branch_after_merge + + @property + def default_merge_style(self): + """Gets the default_merge_style of this Repository. # noqa: E501 + + + :return: The default_merge_style of this Repository. # noqa: E501 + :rtype: str + """ + return self._default_merge_style + + @default_merge_style.setter + def default_merge_style(self, default_merge_style): + """Sets the default_merge_style of this Repository. + + + :param default_merge_style: The default_merge_style of this Repository. # noqa: E501 + :type: str + """ + + self._default_merge_style = default_merge_style + + @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 external_tracker(self): + """Gets the external_tracker of this Repository. # noqa: E501 + + + :return: The external_tracker of this Repository. # noqa: E501 + :rtype: ExternalTracker + """ + return self._external_tracker + + @external_tracker.setter + def external_tracker(self, external_tracker): + """Sets the external_tracker of this Repository. + + + :param external_tracker: The external_tracker of this Repository. # noqa: E501 + :type: ExternalTracker + """ + + self._external_tracker = external_tracker + + @property + def external_wiki(self): + """Gets the external_wiki of this Repository. # noqa: E501 + + + :return: The external_wiki of this Repository. # noqa: E501 + :rtype: ExternalWiki + """ + return self._external_wiki + + @external_wiki.setter + def external_wiki(self, external_wiki): + """Sets the external_wiki of this Repository. + + + :param external_wiki: The external_wiki of this Repository. # noqa: E501 + :type: ExternalWiki + """ + + self._external_wiki = external_wiki + + @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 has_actions(self): + """Gets the has_actions of this Repository. # noqa: E501 + + + :return: The has_actions of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_actions + + @has_actions.setter + def has_actions(self, has_actions): + """Sets the has_actions of this Repository. + + + :param has_actions: The has_actions of this Repository. # noqa: E501 + :type: bool + """ + + self._has_actions = has_actions + + @property + def has_issues(self): + """Gets the has_issues of this Repository. # noqa: E501 + + + :return: The has_issues of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_issues + + @has_issues.setter + def has_issues(self, has_issues): + """Sets the has_issues of this Repository. + + + :param has_issues: The has_issues of this Repository. # noqa: E501 + :type: bool + """ + + self._has_issues = has_issues + + @property + def has_packages(self): + """Gets the has_packages of this Repository. # noqa: E501 + + + :return: The has_packages of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_packages + + @has_packages.setter + def has_packages(self, has_packages): + """Sets the has_packages of this Repository. + + + :param has_packages: The has_packages of this Repository. # noqa: E501 + :type: bool + """ + + self._has_packages = has_packages + + @property + def has_projects(self): + """Gets the has_projects of this Repository. # noqa: E501 + + + :return: The has_projects of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_projects + + @has_projects.setter + def has_projects(self, has_projects): + """Sets the has_projects of this Repository. + + + :param has_projects: The has_projects of this Repository. # noqa: E501 + :type: bool + """ + + self._has_projects = has_projects + + @property + def has_pull_requests(self): + """Gets the has_pull_requests of this Repository. # noqa: E501 + + + :return: The has_pull_requests of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_pull_requests + + @has_pull_requests.setter + def has_pull_requests(self, has_pull_requests): + """Sets the has_pull_requests of this Repository. + + + :param has_pull_requests: The has_pull_requests of this Repository. # noqa: E501 + :type: bool + """ + + self._has_pull_requests = has_pull_requests + + @property + def has_releases(self): + """Gets the has_releases of this Repository. # noqa: E501 + + + :return: The has_releases of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_releases + + @has_releases.setter + def has_releases(self, has_releases): + """Sets the has_releases of this Repository. + + + :param has_releases: The has_releases of this Repository. # noqa: E501 + :type: bool + """ + + self._has_releases = has_releases + + @property + def has_wiki(self): + """Gets the has_wiki of this Repository. # noqa: E501 + + + :return: The has_wiki of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_wiki + + @has_wiki.setter + def has_wiki(self, has_wiki): + """Sets the has_wiki of this Repository. + + + :param has_wiki: The has_wiki of this Repository. # noqa: E501 + :type: bool + """ + + self._has_wiki = has_wiki + + @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 ignore_whitespace_conflicts(self): + """Gets the ignore_whitespace_conflicts of this Repository. # noqa: E501 + + + :return: The ignore_whitespace_conflicts of this Repository. # noqa: E501 + :rtype: bool + """ + return self._ignore_whitespace_conflicts + + @ignore_whitespace_conflicts.setter + def ignore_whitespace_conflicts(self, ignore_whitespace_conflicts): + """Sets the ignore_whitespace_conflicts of this Repository. + + + :param ignore_whitespace_conflicts: The ignore_whitespace_conflicts of this Repository. # noqa: E501 + :type: bool + """ + + self._ignore_whitespace_conflicts = ignore_whitespace_conflicts + + @property + def internal(self): + """Gets the internal of this Repository. # noqa: E501 + + + :return: The internal of this Repository. # noqa: E501 + :rtype: bool + """ + return self._internal + + @internal.setter + def internal(self, internal): + """Sets the internal of this Repository. + + + :param internal: The internal of this Repository. # noqa: E501 + :type: bool + """ + + self._internal = internal + + @property + def internal_tracker(self): + """Gets the internal_tracker of this Repository. # noqa: E501 + + + :return: The internal_tracker of this Repository. # noqa: E501 + :rtype: InternalTracker + """ + return self._internal_tracker + + @internal_tracker.setter + def internal_tracker(self, internal_tracker): + """Sets the internal_tracker of this Repository. + + + :param internal_tracker: The internal_tracker of this Repository. # noqa: E501 + :type: InternalTracker + """ + + self._internal_tracker = internal_tracker + + @property + def language(self): + """Gets the language of this Repository. # noqa: E501 + + + :return: The language of this Repository. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this Repository. + + + :param language: The language of this Repository. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def languages_url(self): + """Gets the languages_url of this Repository. # noqa: E501 + + + :return: The languages_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._languages_url + + @languages_url.setter + def languages_url(self, languages_url): + """Sets the languages_url of this Repository. + + + :param languages_url: The languages_url of this Repository. # noqa: E501 + :type: str + """ + + self._languages_url = languages_url + + @property + def licenses(self): + """Gets the licenses of this Repository. # noqa: E501 + + + :return: The licenses of this Repository. # noqa: E501 + :rtype: list[str] + """ + return self._licenses + + @licenses.setter + def licenses(self, licenses): + """Sets the licenses of this Repository. + + + :param licenses: The licenses of this Repository. # noqa: E501 + :type: list[str] + """ + + self._licenses = licenses + + @property + def link(self): + """Gets the link of this Repository. # noqa: E501 + + + :return: The link of this Repository. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this Repository. + + + :param link: The link of this Repository. # noqa: E501 + :type: str + """ + + self._link = link + + @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 mirror_interval(self): + """Gets the mirror_interval of this Repository. # noqa: E501 + + + :return: The mirror_interval of this Repository. # noqa: E501 + :rtype: str + """ + return self._mirror_interval + + @mirror_interval.setter + def mirror_interval(self, mirror_interval): + """Sets the mirror_interval of this Repository. + + + :param mirror_interval: The mirror_interval of this Repository. # noqa: E501 + :type: str + """ + + self._mirror_interval = mirror_interval + + @property + def mirror_updated(self): + """Gets the mirror_updated of this Repository. # noqa: E501 + + + :return: The mirror_updated of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._mirror_updated + + @mirror_updated.setter + def mirror_updated(self, mirror_updated): + """Sets the mirror_updated of this Repository. + + + :param mirror_updated: The mirror_updated of this Repository. # noqa: E501 + :type: datetime + """ + + self._mirror_updated = mirror_updated + + @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 object_format_name(self): + """Gets the object_format_name of this Repository. # noqa: E501 + + ObjectFormatName of the underlying git repository # noqa: E501 + + :return: The object_format_name of this Repository. # noqa: E501 + :rtype: str + """ + return self._object_format_name + + @object_format_name.setter + def object_format_name(self, object_format_name): + """Sets the object_format_name of this Repository. + + ObjectFormatName of the underlying git repository # noqa: E501 + + :param object_format_name: The object_format_name of this Repository. # noqa: E501 + :type: str + """ + allowed_values = ["sha1", "sha256"] # noqa: E501 + if (self._configuration.client_side_validation and + object_format_name not in allowed_values): + raise ValueError( + "Invalid value for `object_format_name` ({0}), must be one of {1}" # noqa: E501 + .format(object_format_name, allowed_values) + ) + + self._object_format_name = object_format_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 open_pr_counter(self): + """Gets the open_pr_counter of this Repository. # noqa: E501 + + + :return: The open_pr_counter of this Repository. # noqa: E501 + :rtype: int + """ + return self._open_pr_counter + + @open_pr_counter.setter + def open_pr_counter(self, open_pr_counter): + """Sets the open_pr_counter of this Repository. + + + :param open_pr_counter: The open_pr_counter of this Repository. # noqa: E501 + :type: int + """ + + self._open_pr_counter = open_pr_counter + + @property + def original_url(self): + """Gets the original_url of this Repository. # noqa: E501 + + + :return: The original_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._original_url + + @original_url.setter + def original_url(self, original_url): + """Sets the original_url of this Repository. + + + :param original_url: The original_url of this Repository. # noqa: E501 + :type: str + """ + + self._original_url = original_url + + @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 projects_mode(self): + """Gets the projects_mode of this Repository. # noqa: E501 + + + :return: The projects_mode of this Repository. # noqa: E501 + :rtype: str + """ + return self._projects_mode + + @projects_mode.setter + def projects_mode(self, projects_mode): + """Sets the projects_mode of this Repository. + + + :param projects_mode: The projects_mode of this Repository. # noqa: E501 + :type: str + """ + + self._projects_mode = projects_mode + + @property + def release_counter(self): + """Gets the release_counter of this Repository. # noqa: E501 + + + :return: The release_counter of this Repository. # noqa: E501 + :rtype: int + """ + return self._release_counter + + @release_counter.setter + def release_counter(self, release_counter): + """Sets the release_counter of this Repository. + + + :param release_counter: The release_counter of this Repository. # noqa: E501 + :type: int + """ + + self._release_counter = release_counter + + @property + def repo_transfer(self): + """Gets the repo_transfer of this Repository. # noqa: E501 + + + :return: The repo_transfer of this Repository. # noqa: E501 + :rtype: RepoTransfer + """ + return self._repo_transfer + + @repo_transfer.setter + def repo_transfer(self, repo_transfer): + """Sets the repo_transfer of this Repository. + + + :param repo_transfer: The repo_transfer of this Repository. # noqa: E501 + :type: RepoTransfer + """ + + self._repo_transfer = repo_transfer + + @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 template(self): + """Gets the template of this Repository. # noqa: E501 + + + :return: The template of this Repository. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this Repository. + + + :param template: The template of this Repository. # noqa: E501 + :type: bool + """ + + self._template = template + + @property + def topics(self): + """Gets the topics of this Repository. # noqa: E501 + + + :return: The topics of this Repository. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this Repository. + + + :param topics: The topics of this Repository. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + @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 url(self): + """Gets the url of this Repository. # noqa: E501 + + + :return: The url of this Repository. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Repository. + + + :param url: The url of this Repository. # noqa: E501 + :type: str + """ + + self._url = url + + @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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Repository): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/repository_meta.py b/gitea/models/repository_meta.py new file mode 100644 index 0000000..b5baa0a --- /dev/null +++ b/gitea/models/repository_meta.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class RepositoryMeta(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 = { + 'full_name': 'str', + 'id': 'int', + 'name': 'str', + 'owner': 'str' + } + + attribute_map = { + 'full_name': 'full_name', + 'id': 'id', + 'name': 'name', + 'owner': 'owner' + } + + def __init__(self, full_name=None, id=None, name=None, owner=None, _configuration=None): # noqa: E501 + """RepositoryMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._full_name = None + self._id = None + self._name = None + self._owner = None + self.discriminator = None + + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if name is not None: + self.name = name + if owner is not None: + self.owner = owner + + @property + def full_name(self): + """Gets the full_name of this RepositoryMeta. # noqa: E501 + + + :return: The full_name of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this RepositoryMeta. + + + :param full_name: The full_name of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this RepositoryMeta. # noqa: E501 + + + :return: The id of this RepositoryMeta. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RepositoryMeta. + + + :param id: The id of this RepositoryMeta. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this RepositoryMeta. # noqa: E501 + + + :return: The name of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this RepositoryMeta. + + + :param name: The name of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner(self): + """Gets the owner of this RepositoryMeta. # noqa: E501 + + + :return: The owner of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this RepositoryMeta. + + + :param owner: The owner of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._owner = owner + + 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(RepositoryMeta, 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, RepositoryMeta): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepositoryMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/review_state_type.py b/gitea/models/review_state_type.py new file mode 100644 index 0000000..a6f515f --- /dev/null +++ b/gitea/models/review_state_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class ReviewStateType(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, _configuration=None): # noqa: E501 + """ReviewStateType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(ReviewStateType, 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, ReviewStateType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReviewStateType): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/search_results.py b/gitea/models/search_results.py new file mode 100644 index 0000000..de7f352 --- /dev/null +++ b/gitea/models/search_results.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """SearchResults - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SearchResults): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/secret.py b/gitea/models/secret.py new file mode 100644 index 0000000..1ebe55f --- /dev/null +++ b/gitea/models/secret.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Secret(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', + 'name': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'name': 'name' + } + + def __init__(self, created_at=None, name=None, _configuration=None): # noqa: E501 + """Secret - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._name = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if name is not None: + self.name = name + + @property + def created_at(self): + """Gets the created_at of this Secret. # noqa: E501 + + + :return: The created_at of this Secret. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Secret. + + + :param created_at: The created_at of this Secret. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def name(self): + """Gets the name of this Secret. # noqa: E501 + + the secret's name # noqa: E501 + + :return: The name of this Secret. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Secret. + + the secret's name # noqa: E501 + + :param name: The name of this Secret. # 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(Secret, 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, Secret): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Secret): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/server_version.py b/gitea/models/server_version.py new file mode 100644 index 0000000..156f2e7 --- /dev/null +++ b/gitea/models/server_version.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """ServerVersion - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ServerVersion): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/state_type.py b/gitea/models/state_type.py new file mode 100644 index 0000000..ea93726 --- /dev/null +++ b/gitea/models/state_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """StateType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StateType): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/stop_watch.py b/gitea/models/stop_watch.py new file mode 100644 index 0000000..93a1170 --- /dev/null +++ b/gitea/models/stop_watch.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class StopWatch(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', + 'duration': 'str', + 'issue_index': 'int', + 'issue_title': 'str', + 'repo_name': 'str', + 'repo_owner_name': 'str', + 'seconds': 'int' + } + + attribute_map = { + 'created': 'created', + 'duration': 'duration', + 'issue_index': 'issue_index', + 'issue_title': 'issue_title', + 'repo_name': 'repo_name', + 'repo_owner_name': 'repo_owner_name', + 'seconds': 'seconds' + } + + def __init__(self, created=None, duration=None, issue_index=None, issue_title=None, repo_name=None, repo_owner_name=None, seconds=None, _configuration=None): # noqa: E501 + """StopWatch - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._duration = None + self._issue_index = None + self._issue_title = None + self._repo_name = None + self._repo_owner_name = None + self._seconds = None + self.discriminator = None + + if created is not None: + self.created = created + if duration is not None: + self.duration = duration + if issue_index is not None: + self.issue_index = issue_index + if issue_title is not None: + self.issue_title = issue_title + if repo_name is not None: + self.repo_name = repo_name + if repo_owner_name is not None: + self.repo_owner_name = repo_owner_name + if seconds is not None: + self.seconds = seconds + + @property + def created(self): + """Gets the created of this StopWatch. # noqa: E501 + + + :return: The created of this StopWatch. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this StopWatch. + + + :param created: The created of this StopWatch. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def duration(self): + """Gets the duration of this StopWatch. # noqa: E501 + + + :return: The duration of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._duration + + @duration.setter + def duration(self, duration): + """Sets the duration of this StopWatch. + + + :param duration: The duration of this StopWatch. # noqa: E501 + :type: str + """ + + self._duration = duration + + @property + def issue_index(self): + """Gets the issue_index of this StopWatch. # noqa: E501 + + + :return: The issue_index of this StopWatch. # noqa: E501 + :rtype: int + """ + return self._issue_index + + @issue_index.setter + def issue_index(self, issue_index): + """Sets the issue_index of this StopWatch. + + + :param issue_index: The issue_index of this StopWatch. # noqa: E501 + :type: int + """ + + self._issue_index = issue_index + + @property + def issue_title(self): + """Gets the issue_title of this StopWatch. # noqa: E501 + + + :return: The issue_title of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._issue_title + + @issue_title.setter + def issue_title(self, issue_title): + """Sets the issue_title of this StopWatch. + + + :param issue_title: The issue_title of this StopWatch. # noqa: E501 + :type: str + """ + + self._issue_title = issue_title + + @property + def repo_name(self): + """Gets the repo_name of this StopWatch. # noqa: E501 + + + :return: The repo_name of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this StopWatch. + + + :param repo_name: The repo_name of this StopWatch. # noqa: E501 + :type: str + """ + + self._repo_name = repo_name + + @property + def repo_owner_name(self): + """Gets the repo_owner_name of this StopWatch. # noqa: E501 + + + :return: The repo_owner_name of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._repo_owner_name + + @repo_owner_name.setter + def repo_owner_name(self, repo_owner_name): + """Sets the repo_owner_name of this StopWatch. + + + :param repo_owner_name: The repo_owner_name of this StopWatch. # noqa: E501 + :type: str + """ + + self._repo_owner_name = repo_owner_name + + @property + def seconds(self): + """Gets the seconds of this StopWatch. # noqa: E501 + + + :return: The seconds of this StopWatch. # noqa: E501 + :rtype: int + """ + return self._seconds + + @seconds.setter + def seconds(self, seconds): + """Sets the seconds of this StopWatch. + + + :param seconds: The seconds of this StopWatch. # noqa: E501 + :type: int + """ + + self._seconds = seconds + + 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(StopWatch, 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, StopWatch): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StopWatch): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/submit_pull_review_options.py b/gitea/models/submit_pull_review_options.py new file mode 100644 index 0000000..674f018 --- /dev/null +++ b/gitea/models/submit_pull_review_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class SubmitPullReviewOptions(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', + 'event': 'ReviewStateType' + } + + attribute_map = { + 'body': 'body', + 'event': 'event' + } + + def __init__(self, body=None, event=None, _configuration=None): # noqa: E501 + """SubmitPullReviewOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._event = None + self.discriminator = None + + if body is not None: + self.body = body + if event is not None: + self.event = event + + @property + def body(self): + """Gets the body of this SubmitPullReviewOptions. # noqa: E501 + + + :return: The body of this SubmitPullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SubmitPullReviewOptions. + + + :param body: The body of this SubmitPullReviewOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def event(self): + """Gets the event of this SubmitPullReviewOptions. # noqa: E501 + + + :return: The event of this SubmitPullReviewOptions. # noqa: E501 + :rtype: ReviewStateType + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this SubmitPullReviewOptions. + + + :param event: The event of this SubmitPullReviewOptions. # noqa: E501 + :type: ReviewStateType + """ + + self._event = event + + 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(SubmitPullReviewOptions, 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, SubmitPullReviewOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubmitPullReviewOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/tag.py b/gitea/models/tag.py new file mode 100644 index 0000000..1f562cb --- /dev/null +++ b/gitea/models/tag.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class Tag(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': 'CommitMeta', + 'id': 'str', + 'message': 'str', + 'name': 'str', + 'tarball_url': 'str', + 'zipball_url': 'str' + } + + attribute_map = { + 'commit': 'commit', + 'id': 'id', + 'message': 'message', + 'name': 'name', + 'tarball_url': 'tarball_url', + 'zipball_url': 'zipball_url' + } + + def __init__(self, commit=None, id=None, message=None, name=None, tarball_url=None, zipball_url=None, _configuration=None): # noqa: E501 + """Tag - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._id = None + self._message = None + self._name = None + self._tarball_url = None + self._zipball_url = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if id is not None: + self.id = id + if message is not None: + self.message = message + if name is not None: + self.name = name + if tarball_url is not None: + self.tarball_url = tarball_url + if zipball_url is not None: + self.zipball_url = zipball_url + + @property + def commit(self): + """Gets the commit of this Tag. # noqa: E501 + + + :return: The commit of this Tag. # noqa: E501 + :rtype: CommitMeta + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Tag. + + + :param commit: The commit of this Tag. # noqa: E501 + :type: CommitMeta + """ + + self._commit = commit + + @property + def id(self): + """Gets the id of this Tag. # noqa: E501 + + + :return: The id of this Tag. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Tag. + + + :param id: The id of this Tag. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def message(self): + """Gets the message of this Tag. # noqa: E501 + + + :return: The message of this Tag. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Tag. + + + :param message: The message of this Tag. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def name(self): + """Gets the name of this Tag. # noqa: E501 + + + :return: The name of this Tag. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Tag. + + + :param name: The name of this Tag. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tarball_url(self): + """Gets the tarball_url of this Tag. # noqa: E501 + + + :return: The tarball_url of this Tag. # noqa: E501 + :rtype: str + """ + return self._tarball_url + + @tarball_url.setter + def tarball_url(self, tarball_url): + """Sets the tarball_url of this Tag. + + + :param tarball_url: The tarball_url of this Tag. # noqa: E501 + :type: str + """ + + self._tarball_url = tarball_url + + @property + def zipball_url(self): + """Gets the zipball_url of this Tag. # noqa: E501 + + + :return: The zipball_url of this Tag. # noqa: E501 + :rtype: str + """ + return self._zipball_url + + @zipball_url.setter + def zipball_url(self, zipball_url): + """Sets the zipball_url of this Tag. + + + :param zipball_url: The zipball_url of this Tag. # 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(Tag, 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, Tag): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/tag_protection.py b/gitea/models/tag_protection.py new file mode 100644 index 0000000..a0f3d8d --- /dev/null +++ b/gitea/models/tag_protection.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class TagProtection(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', + 'id': 'int', + 'name_pattern': 'str', + 'updated_at': 'datetime', + 'whitelist_teams': 'list[str]', + 'whitelist_usernames': 'list[str]' + } + + attribute_map = { + 'created_at': 'created_at', + 'id': 'id', + 'name_pattern': 'name_pattern', + 'updated_at': 'updated_at', + 'whitelist_teams': 'whitelist_teams', + 'whitelist_usernames': 'whitelist_usernames' + } + + def __init__(self, created_at=None, id=None, name_pattern=None, updated_at=None, whitelist_teams=None, whitelist_usernames=None, _configuration=None): # noqa: E501 + """TagProtection - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._id = None + self._name_pattern = None + self._updated_at = None + self._whitelist_teams = None + self._whitelist_usernames = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if id is not None: + self.id = id + if name_pattern is not None: + self.name_pattern = name_pattern + if updated_at is not None: + self.updated_at = updated_at + if whitelist_teams is not None: + self.whitelist_teams = whitelist_teams + if whitelist_usernames is not None: + self.whitelist_usernames = whitelist_usernames + + @property + def created_at(self): + """Gets the created_at of this TagProtection. # noqa: E501 + + + :return: The created_at of this TagProtection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TagProtection. + + + :param created_at: The created_at of this TagProtection. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def id(self): + """Gets the id of this TagProtection. # noqa: E501 + + + :return: The id of this TagProtection. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TagProtection. + + + :param id: The id of this TagProtection. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name_pattern(self): + """Gets the name_pattern of this TagProtection. # noqa: E501 + + + :return: The name_pattern of this TagProtection. # noqa: E501 + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """Sets the name_pattern of this TagProtection. + + + :param name_pattern: The name_pattern of this TagProtection. # noqa: E501 + :type: str + """ + + self._name_pattern = name_pattern + + @property + def updated_at(self): + """Gets the updated_at of this TagProtection. # noqa: E501 + + + :return: The updated_at of this TagProtection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this TagProtection. + + + :param updated_at: The updated_at of this TagProtection. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def whitelist_teams(self): + """Gets the whitelist_teams of this TagProtection. # noqa: E501 + + + :return: The whitelist_teams of this TagProtection. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_teams + + @whitelist_teams.setter + def whitelist_teams(self, whitelist_teams): + """Sets the whitelist_teams of this TagProtection. + + + :param whitelist_teams: The whitelist_teams of this TagProtection. # noqa: E501 + :type: list[str] + """ + + self._whitelist_teams = whitelist_teams + + @property + def whitelist_usernames(self): + """Gets the whitelist_usernames of this TagProtection. # noqa: E501 + + + :return: The whitelist_usernames of this TagProtection. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_usernames + + @whitelist_usernames.setter + def whitelist_usernames(self, whitelist_usernames): + """Sets the whitelist_usernames of this TagProtection. + + + :param whitelist_usernames: The whitelist_usernames of this TagProtection. # noqa: E501 + :type: list[str] + """ + + self._whitelist_usernames = whitelist_usernames + + 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(TagProtection, 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, TagProtection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TagProtection): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/team.py b/gitea/models/team.py new file mode 100644 index 0000000..a875b1f --- /dev/null +++ b/gitea/models/team.py @@ -0,0 +1,338 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'can_create_org_repo': 'bool', + 'description': 'str', + 'id': 'int', + 'includes_all_repositories': 'bool', + 'name': 'str', + 'organization': 'Organization', + 'permission': 'str', + 'units': 'list[str]', + 'units_map': 'dict(str, str)' + } + + attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', + 'description': 'description', + 'id': 'id', + 'includes_all_repositories': 'includes_all_repositories', + 'name': 'name', + 'organization': 'organization', + 'permission': 'permission', + 'units': 'units', + 'units_map': 'units_map' + } + + def __init__(self, can_create_org_repo=None, description=None, id=None, includes_all_repositories=None, name=None, organization=None, permission=None, units=None, units_map=None, _configuration=None): # noqa: E501 + """Team - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_org_repo = None + self._description = None + self._id = None + self._includes_all_repositories = None + self._name = None + self._organization = None + self._permission = None + self._units = None + self._units_map = None + self.discriminator = None + + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo + if description is not None: + self.description = description + if id is not None: + self.id = id + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories + if name is not None: + self.name = name + if organization is not None: + self.organization = organization + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + if units_map is not None: + self.units_map = units_map + + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this Team. # noqa: E501 + + + :return: The can_create_org_repo of this Team. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this Team. + + + :param can_create_org_repo: The can_create_org_repo of this Team. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + + @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 includes_all_repositories(self): + """Gets the includes_all_repositories of this Team. # noqa: E501 + + + :return: The includes_all_repositories of this Team. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this Team. + + + :param includes_all_repositories: The includes_all_repositories of this Team. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + + @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 organization(self): + """Gets the organization of this Team. # noqa: E501 + + + :return: The organization of this Team. # noqa: E501 + :rtype: Organization + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this Team. + + + :param organization: The organization of this Team. # noqa: E501 + :type: Organization + """ + + self._organization = organization + + @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 (self._configuration.client_side_validation and + 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 + + @property + def units_map(self): + """Gets the units_map of this Team. # noqa: E501 + + + :return: The units_map of this Team. # noqa: E501 + :rtype: dict(str, str) + """ + return self._units_map + + @units_map.setter + def units_map(self, units_map): + """Sets the units_map of this Team. + + + :param units_map: The units_map of this Team. # noqa: E501 + :type: dict(str, str) + """ + + self._units_map = units_map + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Team): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/time_stamp.py b/gitea/models/time_stamp.py new file mode 100644 index 0000000..ae39b0a --- /dev/null +++ b/gitea/models/time_stamp.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """TimeStamp - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TimeStamp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/timeline_comment.py b/gitea/models/timeline_comment.py new file mode 100644 index 0000000..11e1445 --- /dev/null +++ b/gitea/models/timeline_comment.py @@ -0,0 +1,855 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class TimelineComment(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', + 'assignee_team': 'Team', + 'body': 'str', + 'created_at': 'datetime', + 'dependent_issue': 'Issue', + 'html_url': 'str', + 'id': 'int', + 'issue_url': 'str', + 'label': 'Label', + 'milestone': 'Milestone', + 'new_ref': 'str', + 'new_title': 'str', + 'old_milestone': 'Milestone', + 'old_project_id': 'int', + 'old_ref': 'str', + 'old_title': 'str', + 'project_id': 'int', + 'pull_request_url': 'str', + 'ref_action': 'str', + 'ref_comment': 'Comment', + 'ref_commit_sha': 'str', + 'ref_issue': 'Issue', + 'removed_assignee': 'bool', + 'resolve_doer': 'User', + 'review_id': 'int', + 'tracked_time': 'TrackedTime', + 'type': 'str', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignee_team': 'assignee_team', + 'body': 'body', + 'created_at': 'created_at', + 'dependent_issue': 'dependent_issue', + 'html_url': 'html_url', + 'id': 'id', + 'issue_url': 'issue_url', + 'label': 'label', + 'milestone': 'milestone', + 'new_ref': 'new_ref', + 'new_title': 'new_title', + 'old_milestone': 'old_milestone', + 'old_project_id': 'old_project_id', + 'old_ref': 'old_ref', + 'old_title': 'old_title', + 'project_id': 'project_id', + 'pull_request_url': 'pull_request_url', + 'ref_action': 'ref_action', + 'ref_comment': 'ref_comment', + 'ref_commit_sha': 'ref_commit_sha', + 'ref_issue': 'ref_issue', + 'removed_assignee': 'removed_assignee', + 'resolve_doer': 'resolve_doer', + 'review_id': 'review_id', + 'tracked_time': 'tracked_time', + 'type': 'type', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, assignee=None, assignee_team=None, body=None, created_at=None, dependent_issue=None, html_url=None, id=None, issue_url=None, label=None, milestone=None, new_ref=None, new_title=None, old_milestone=None, old_project_id=None, old_ref=None, old_title=None, project_id=None, pull_request_url=None, ref_action=None, ref_comment=None, ref_commit_sha=None, ref_issue=None, removed_assignee=None, resolve_doer=None, review_id=None, tracked_time=None, type=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """TimelineComment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assignee = None + self._assignee_team = None + self._body = None + self._created_at = None + self._dependent_issue = None + self._html_url = None + self._id = None + self._issue_url = None + self._label = None + self._milestone = None + self._new_ref = None + self._new_title = None + self._old_milestone = None + self._old_project_id = None + self._old_ref = None + self._old_title = None + self._project_id = None + self._pull_request_url = None + self._ref_action = None + self._ref_comment = None + self._ref_commit_sha = None + self._ref_issue = None + self._removed_assignee = None + self._resolve_doer = None + self._review_id = None + self._tracked_time = None + self._type = None + self._updated_at = None + self._user = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignee_team is not None: + self.assignee_team = assignee_team + if body is not None: + self.body = body + if created_at is not None: + self.created_at = created_at + if dependent_issue is not None: + self.dependent_issue = dependent_issue + 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 label is not None: + self.label = label + if milestone is not None: + self.milestone = milestone + if new_ref is not None: + self.new_ref = new_ref + if new_title is not None: + self.new_title = new_title + if old_milestone is not None: + self.old_milestone = old_milestone + if old_project_id is not None: + self.old_project_id = old_project_id + if old_ref is not None: + self.old_ref = old_ref + if old_title is not None: + self.old_title = old_title + if project_id is not None: + self.project_id = project_id + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if ref_action is not None: + self.ref_action = ref_action + if ref_comment is not None: + self.ref_comment = ref_comment + if ref_commit_sha is not None: + self.ref_commit_sha = ref_commit_sha + if ref_issue is not None: + self.ref_issue = ref_issue + if removed_assignee is not None: + self.removed_assignee = removed_assignee + if resolve_doer is not None: + self.resolve_doer = resolve_doer + if review_id is not None: + self.review_id = review_id + if tracked_time is not None: + self.tracked_time = tracked_time + if type is not None: + self.type = type + if updated_at is not None: + self.updated_at = updated_at + if user is not None: + self.user = user + + @property + def assignee(self): + """Gets the assignee of this TimelineComment. # noqa: E501 + + + :return: The assignee of this TimelineComment. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this TimelineComment. + + + :param assignee: The assignee of this TimelineComment. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignee_team(self): + """Gets the assignee_team of this TimelineComment. # noqa: E501 + + + :return: The assignee_team of this TimelineComment. # noqa: E501 + :rtype: Team + """ + return self._assignee_team + + @assignee_team.setter + def assignee_team(self, assignee_team): + """Sets the assignee_team of this TimelineComment. + + + :param assignee_team: The assignee_team of this TimelineComment. # noqa: E501 + :type: Team + """ + + self._assignee_team = assignee_team + + @property + def body(self): + """Gets the body of this TimelineComment. # noqa: E501 + + + :return: The body of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this TimelineComment. + + + :param body: The body of this TimelineComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this TimelineComment. # noqa: E501 + + + :return: The created_at of this TimelineComment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TimelineComment. + + + :param created_at: The created_at of this TimelineComment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def dependent_issue(self): + """Gets the dependent_issue of this TimelineComment. # noqa: E501 + + + :return: The dependent_issue of this TimelineComment. # noqa: E501 + :rtype: Issue + """ + return self._dependent_issue + + @dependent_issue.setter + def dependent_issue(self, dependent_issue): + """Sets the dependent_issue of this TimelineComment. + + + :param dependent_issue: The dependent_issue of this TimelineComment. # noqa: E501 + :type: Issue + """ + + self._dependent_issue = dependent_issue + + @property + def html_url(self): + """Gets the html_url of this TimelineComment. # noqa: E501 + + + :return: The html_url of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this TimelineComment. + + + :param html_url: The html_url of this TimelineComment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this TimelineComment. # noqa: E501 + + + :return: The id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TimelineComment. + + + :param id: The id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def issue_url(self): + """Gets the issue_url of this TimelineComment. # noqa: E501 + + + :return: The issue_url of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._issue_url + + @issue_url.setter + def issue_url(self, issue_url): + """Sets the issue_url of this TimelineComment. + + + :param issue_url: The issue_url of this TimelineComment. # noqa: E501 + :type: str + """ + + self._issue_url = issue_url + + @property + def label(self): + """Gets the label of this TimelineComment. # noqa: E501 + + + :return: The label of this TimelineComment. # noqa: E501 + :rtype: Label + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this TimelineComment. + + + :param label: The label of this TimelineComment. # noqa: E501 + :type: Label + """ + + self._label = label + + @property + def milestone(self): + """Gets the milestone of this TimelineComment. # noqa: E501 + + + :return: The milestone of this TimelineComment. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this TimelineComment. + + + :param milestone: The milestone of this TimelineComment. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def new_ref(self): + """Gets the new_ref of this TimelineComment. # noqa: E501 + + + :return: The new_ref of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._new_ref + + @new_ref.setter + def new_ref(self, new_ref): + """Sets the new_ref of this TimelineComment. + + + :param new_ref: The new_ref of this TimelineComment. # noqa: E501 + :type: str + """ + + self._new_ref = new_ref + + @property + def new_title(self): + """Gets the new_title of this TimelineComment. # noqa: E501 + + + :return: The new_title of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._new_title + + @new_title.setter + def new_title(self, new_title): + """Sets the new_title of this TimelineComment. + + + :param new_title: The new_title of this TimelineComment. # noqa: E501 + :type: str + """ + + self._new_title = new_title + + @property + def old_milestone(self): + """Gets the old_milestone of this TimelineComment. # noqa: E501 + + + :return: The old_milestone of this TimelineComment. # noqa: E501 + :rtype: Milestone + """ + return self._old_milestone + + @old_milestone.setter + def old_milestone(self, old_milestone): + """Sets the old_milestone of this TimelineComment. + + + :param old_milestone: The old_milestone of this TimelineComment. # noqa: E501 + :type: Milestone + """ + + self._old_milestone = old_milestone + + @property + def old_project_id(self): + """Gets the old_project_id of this TimelineComment. # noqa: E501 + + + :return: The old_project_id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._old_project_id + + @old_project_id.setter + def old_project_id(self, old_project_id): + """Sets the old_project_id of this TimelineComment. + + + :param old_project_id: The old_project_id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._old_project_id = old_project_id + + @property + def old_ref(self): + """Gets the old_ref of this TimelineComment. # noqa: E501 + + + :return: The old_ref of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._old_ref + + @old_ref.setter + def old_ref(self, old_ref): + """Sets the old_ref of this TimelineComment. + + + :param old_ref: The old_ref of this TimelineComment. # noqa: E501 + :type: str + """ + + self._old_ref = old_ref + + @property + def old_title(self): + """Gets the old_title of this TimelineComment. # noqa: E501 + + + :return: The old_title of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._old_title + + @old_title.setter + def old_title(self, old_title): + """Sets the old_title of this TimelineComment. + + + :param old_title: The old_title of this TimelineComment. # noqa: E501 + :type: str + """ + + self._old_title = old_title + + @property + def project_id(self): + """Gets the project_id of this TimelineComment. # noqa: E501 + + + :return: The project_id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this TimelineComment. + + + :param project_id: The project_id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._project_id = project_id + + @property + def pull_request_url(self): + """Gets the pull_request_url of this TimelineComment. # noqa: E501 + + + :return: The pull_request_url of this TimelineComment. # 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 TimelineComment. + + + :param pull_request_url: The pull_request_url of this TimelineComment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def ref_action(self): + """Gets the ref_action of this TimelineComment. # noqa: E501 + + + :return: The ref_action of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._ref_action + + @ref_action.setter + def ref_action(self, ref_action): + """Sets the ref_action of this TimelineComment. + + + :param ref_action: The ref_action of this TimelineComment. # noqa: E501 + :type: str + """ + + self._ref_action = ref_action + + @property + def ref_comment(self): + """Gets the ref_comment of this TimelineComment. # noqa: E501 + + + :return: The ref_comment of this TimelineComment. # noqa: E501 + :rtype: Comment + """ + return self._ref_comment + + @ref_comment.setter + def ref_comment(self, ref_comment): + """Sets the ref_comment of this TimelineComment. + + + :param ref_comment: The ref_comment of this TimelineComment. # noqa: E501 + :type: Comment + """ + + self._ref_comment = ref_comment + + @property + def ref_commit_sha(self): + """Gets the ref_commit_sha of this TimelineComment. # noqa: E501 + + commit SHA where issue/PR was referenced # noqa: E501 + + :return: The ref_commit_sha of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._ref_commit_sha + + @ref_commit_sha.setter + def ref_commit_sha(self, ref_commit_sha): + """Sets the ref_commit_sha of this TimelineComment. + + commit SHA where issue/PR was referenced # noqa: E501 + + :param ref_commit_sha: The ref_commit_sha of this TimelineComment. # noqa: E501 + :type: str + """ + + self._ref_commit_sha = ref_commit_sha + + @property + def ref_issue(self): + """Gets the ref_issue of this TimelineComment. # noqa: E501 + + + :return: The ref_issue of this TimelineComment. # noqa: E501 + :rtype: Issue + """ + return self._ref_issue + + @ref_issue.setter + def ref_issue(self, ref_issue): + """Sets the ref_issue of this TimelineComment. + + + :param ref_issue: The ref_issue of this TimelineComment. # noqa: E501 + :type: Issue + """ + + self._ref_issue = ref_issue + + @property + def removed_assignee(self): + """Gets the removed_assignee of this TimelineComment. # noqa: E501 + + whether the assignees were removed or added # noqa: E501 + + :return: The removed_assignee of this TimelineComment. # noqa: E501 + :rtype: bool + """ + return self._removed_assignee + + @removed_assignee.setter + def removed_assignee(self, removed_assignee): + """Sets the removed_assignee of this TimelineComment. + + whether the assignees were removed or added # noqa: E501 + + :param removed_assignee: The removed_assignee of this TimelineComment. # noqa: E501 + :type: bool + """ + + self._removed_assignee = removed_assignee + + @property + def resolve_doer(self): + """Gets the resolve_doer of this TimelineComment. # noqa: E501 + + + :return: The resolve_doer of this TimelineComment. # noqa: E501 + :rtype: User + """ + return self._resolve_doer + + @resolve_doer.setter + def resolve_doer(self, resolve_doer): + """Sets the resolve_doer of this TimelineComment. + + + :param resolve_doer: The resolve_doer of this TimelineComment. # noqa: E501 + :type: User + """ + + self._resolve_doer = resolve_doer + + @property + def review_id(self): + """Gets the review_id of this TimelineComment. # noqa: E501 + + + :return: The review_id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._review_id + + @review_id.setter + def review_id(self, review_id): + """Sets the review_id of this TimelineComment. + + + :param review_id: The review_id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._review_id = review_id + + @property + def tracked_time(self): + """Gets the tracked_time of this TimelineComment. # noqa: E501 + + + :return: The tracked_time of this TimelineComment. # noqa: E501 + :rtype: TrackedTime + """ + return self._tracked_time + + @tracked_time.setter + def tracked_time(self, tracked_time): + """Sets the tracked_time of this TimelineComment. + + + :param tracked_time: The tracked_time of this TimelineComment. # noqa: E501 + :type: TrackedTime + """ + + self._tracked_time = tracked_time + + @property + def type(self): + """Gets the type of this TimelineComment. # noqa: E501 + + + :return: The type of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this TimelineComment. + + + :param type: The type of this TimelineComment. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def updated_at(self): + """Gets the updated_at of this TimelineComment. # noqa: E501 + + + :return: The updated_at of this TimelineComment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this TimelineComment. + + + :param updated_at: The updated_at of this TimelineComment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this TimelineComment. # noqa: E501 + + + :return: The user of this TimelineComment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this TimelineComment. + + + :param user: The user of this TimelineComment. # 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(TimelineComment, 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, TimelineComment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TimelineComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/topic_name.py b/gitea/models/topic_name.py new file mode 100644 index 0000000..0fedf46 --- /dev/null +++ b/gitea/models/topic_name.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class TopicName(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 = { + 'topics': 'list[str]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None, _configuration=None): # noqa: E501 + """TopicName - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this TopicName. # noqa: E501 + + + :return: The topics of this TopicName. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this TopicName. + + + :param topics: The topics of this TopicName. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + 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(TopicName, 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, TopicName): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TopicName): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/topic_response.py b/gitea/models/topic_response.py new file mode 100644 index 0000000..8cfea1d --- /dev/null +++ b/gitea/models/topic_response.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class TopicResponse(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', + 'repo_count': 'int', + 'topic_name': 'str', + 'updated': 'datetime' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'repo_count': 'repo_count', + 'topic_name': 'topic_name', + 'updated': 'updated' + } + + def __init__(self, created=None, id=None, repo_count=None, topic_name=None, updated=None, _configuration=None): # noqa: E501 + """TopicResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._id = None + self._repo_count = None + self._topic_name = None + self._updated = None + self.discriminator = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + if repo_count is not None: + self.repo_count = repo_count + if topic_name is not None: + self.topic_name = topic_name + if updated is not None: + self.updated = updated + + @property + def created(self): + """Gets the created of this TopicResponse. # noqa: E501 + + + :return: The created of this TopicResponse. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TopicResponse. + + + :param created: The created of this TopicResponse. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this TopicResponse. # noqa: E501 + + + :return: The id of this TopicResponse. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TopicResponse. + + + :param id: The id of this TopicResponse. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def repo_count(self): + """Gets the repo_count of this TopicResponse. # noqa: E501 + + + :return: The repo_count of this TopicResponse. # noqa: E501 + :rtype: int + """ + return self._repo_count + + @repo_count.setter + def repo_count(self, repo_count): + """Sets the repo_count of this TopicResponse. + + + :param repo_count: The repo_count of this TopicResponse. # noqa: E501 + :type: int + """ + + self._repo_count = repo_count + + @property + def topic_name(self): + """Gets the topic_name of this TopicResponse. # noqa: E501 + + + :return: The topic_name of this TopicResponse. # noqa: E501 + :rtype: str + """ + return self._topic_name + + @topic_name.setter + def topic_name(self, topic_name): + """Sets the topic_name of this TopicResponse. + + + :param topic_name: The topic_name of this TopicResponse. # noqa: E501 + :type: str + """ + + self._topic_name = topic_name + + @property + def updated(self): + """Gets the updated of this TopicResponse. # noqa: E501 + + + :return: The updated of this TopicResponse. # noqa: E501 + :rtype: datetime + """ + return self._updated + + @updated.setter + def updated(self, updated): + """Sets the updated of this TopicResponse. + + + :param updated: The updated of this TopicResponse. # noqa: E501 + :type: datetime + """ + + self._updated = updated + + 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(TopicResponse, 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, TopicResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TopicResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/tracked_time.py b/gitea/models/tracked_time.py new file mode 100644 index 0000000..ef39d79 --- /dev/null +++ b/gitea/models/tracked_time.py @@ -0,0 +1,285 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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': 'Issue', + 'issue_id': 'int', + 'time': 'int', + 'user_id': 'int', + 'user_name': 'str' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'issue': 'issue', + 'issue_id': 'issue_id', + 'time': 'time', + 'user_id': 'user_id', + 'user_name': 'user_name' + } + + def __init__(self, created=None, id=None, issue=None, issue_id=None, time=None, user_id=None, user_name=None, _configuration=None): # noqa: E501 + """TrackedTime - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._id = None + self._issue = None + self._issue_id = None + self._time = None + self._user_id = None + self._user_name = None + self.discriminator = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + if issue is not None: + self.issue = issue + 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 + if user_name is not None: + self.user_name = user_name + + @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(self): + """Gets the issue of this TrackedTime. # noqa: E501 + + + :return: The issue of this TrackedTime. # noqa: E501 + :rtype: Issue + """ + return self._issue + + @issue.setter + def issue(self, issue): + """Sets the issue of this TrackedTime. + + + :param issue: The issue of this TrackedTime. # noqa: E501 + :type: Issue + """ + + self._issue = issue + + @property + def issue_id(self): + """Gets the issue_id of this TrackedTime. # noqa: E501 + + deprecated (only for backwards compatibility) # 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. + + deprecated (only for backwards compatibility) # noqa: E501 + + :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 + + deprecated (only for backwards compatibility) # 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. + + deprecated (only for backwards compatibility) # noqa: E501 + + :param user_id: The user_id of this TrackedTime. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this TrackedTime. # noqa: E501 + + + :return: The user_name of this TrackedTime. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this TrackedTime. + + + :param user_name: The user_name of this TrackedTime. # noqa: E501 + :type: str + """ + + self._user_name = user_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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TrackedTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/transfer_repo_option.py b/gitea/models/transfer_repo_option.py new file mode 100644 index 0000000..5b520db --- /dev/null +++ b/gitea/models/transfer_repo_option.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class TransferRepoOption(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 = { + 'new_owner': 'str', + 'team_ids': 'list[int]' + } + + attribute_map = { + 'new_owner': 'new_owner', + 'team_ids': 'team_ids' + } + + def __init__(self, new_owner=None, team_ids=None, _configuration=None): # noqa: E501 + """TransferRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new_owner = None + self._team_ids = None + self.discriminator = None + + self.new_owner = new_owner + if team_ids is not None: + self.team_ids = team_ids + + @property + def new_owner(self): + """Gets the new_owner of this TransferRepoOption. # noqa: E501 + + + :return: The new_owner of this TransferRepoOption. # noqa: E501 + :rtype: str + """ + return self._new_owner + + @new_owner.setter + def new_owner(self, new_owner): + """Sets the new_owner of this TransferRepoOption. + + + :param new_owner: The new_owner of this TransferRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and new_owner is None: + raise ValueError("Invalid value for `new_owner`, must not be `None`") # noqa: E501 + + self._new_owner = new_owner + + @property + def team_ids(self): + """Gets the team_ids of this TransferRepoOption. # noqa: E501 + + ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. # noqa: E501 + + :return: The team_ids of this TransferRepoOption. # noqa: E501 + :rtype: list[int] + """ + return self._team_ids + + @team_ids.setter + def team_ids(self, team_ids): + """Sets the team_ids of this TransferRepoOption. + + ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. # noqa: E501 + + :param team_ids: The team_ids of this TransferRepoOption. # noqa: E501 + :type: list[int] + """ + + self._team_ids = team_ids + + 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(TransferRepoOption, 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, TransferRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransferRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/update_branch_protection_priories.py b/gitea/models/update_branch_protection_priories.py new file mode 100644 index 0000000..56eed93 --- /dev/null +++ b/gitea/models/update_branch_protection_priories.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UpdateBranchProtectionPriories(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 = { + 'ids': 'list[int]' + } + + attribute_map = { + 'ids': 'ids' + } + + def __init__(self, ids=None, _configuration=None): # noqa: E501 + """UpdateBranchProtectionPriories - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._ids = None + self.discriminator = None + + if ids is not None: + self.ids = ids + + @property + def ids(self): + """Gets the ids of this UpdateBranchProtectionPriories. # noqa: E501 + + + :return: The ids of this UpdateBranchProtectionPriories. # noqa: E501 + :rtype: list[int] + """ + return self._ids + + @ids.setter + def ids(self, ids): + """Sets the ids of this UpdateBranchProtectionPriories. + + + :param ids: The ids of this UpdateBranchProtectionPriories. # noqa: E501 + :type: list[int] + """ + + self._ids = ids + + 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(UpdateBranchProtectionPriories, 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, UpdateBranchProtectionPriories): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateBranchProtectionPriories): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/update_branch_repo_option.py b/gitea/models/update_branch_repo_option.py new file mode 100644 index 0000000..0b2cd86 --- /dev/null +++ b/gitea/models/update_branch_repo_option.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UpdateBranchRepoOption(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, _configuration=None): # noqa: E501 + """UpdateBranchRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self.discriminator = None + + self.name = name + + @property + def name(self): + """Gets the name of this UpdateBranchRepoOption. # noqa: E501 + + New branch name # noqa: E501 + + :return: The name of this UpdateBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UpdateBranchRepoOption. + + New branch name # noqa: E501 + + :param name: The name of this UpdateBranchRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and 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(UpdateBranchRepoOption, 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, UpdateBranchRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateBranchRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/update_file_options.py b/gitea/models/update_file_options.py new file mode 100644 index 0000000..e817692 --- /dev/null +++ b/gitea/models/update_file_options.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UpdateFileOptions(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': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'content': 'str', + 'dates': 'CommitDateOptions', + 'from_path': 'str', + 'message': 'str', + 'new_branch': 'str', + 'sha': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'content': 'content', + 'dates': 'dates', + 'from_path': 'from_path', + 'message': 'message', + 'new_branch': 'new_branch', + 'sha': 'sha', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, content=None, dates=None, from_path=None, message=None, new_branch=None, sha=None, signoff=None, _configuration=None): # noqa: E501 + """UpdateFileOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._content = None + self._dates = None + self._from_path = None + self._message = None + self._new_branch = None + self._sha = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + self.content = content + if dates is not None: + self.dates = dates + if from_path is not None: + self.from_path = from_path + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + self.sha = sha + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this UpdateFileOptions. # noqa: E501 + + + :return: The author of this UpdateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this UpdateFileOptions. + + + :param author: The author of this UpdateFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this UpdateFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this UpdateFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this UpdateFileOptions. # noqa: E501 + + + :return: The committer of this UpdateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this UpdateFileOptions. + + + :param committer: The committer of this UpdateFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def content(self): + """Gets the content of this UpdateFileOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this UpdateFileOptions. + + content must be base64 encoded # noqa: E501 + + :param content: The content of this UpdateFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and content is None: + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def dates(self): + """Gets the dates of this UpdateFileOptions. # noqa: E501 + + + :return: The dates of this UpdateFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this UpdateFileOptions. + + + :param dates: The dates of this UpdateFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def from_path(self): + """Gets the from_path of this UpdateFileOptions. # noqa: E501 + + from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL # noqa: E501 + + :return: The from_path of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._from_path + + @from_path.setter + def from_path(self, from_path): + """Sets the from_path of this UpdateFileOptions. + + from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL # noqa: E501 + + :param from_path: The from_path of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._from_path = from_path + + @property + def message(self): + """Gets the message of this UpdateFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this UpdateFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this UpdateFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this UpdateFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def sha(self): + """Gets the sha of this UpdateFileOptions. # noqa: E501 + + sha is the SHA for the file that already exists # noqa: E501 + + :return: The sha of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this UpdateFileOptions. + + sha is the SHA for the file that already exists # noqa: E501 + + :param sha: The sha of this UpdateFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and sha is None: + raise ValueError("Invalid value for `sha`, must not be `None`") # noqa: E501 + + self._sha = sha + + @property + def signoff(self): + """Gets the signoff of this UpdateFileOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this UpdateFileOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this UpdateFileOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this UpdateFileOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(UpdateFileOptions, 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, UpdateFileOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateFileOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/update_repo_avatar_option.py b/gitea/models/update_repo_avatar_option.py new file mode 100644 index 0000000..8cf6d95 --- /dev/null +++ b/gitea/models/update_repo_avatar_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UpdateRepoAvatarOption(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 = { + 'image': 'str' + } + + attribute_map = { + 'image': 'image' + } + + def __init__(self, image=None, _configuration=None): # noqa: E501 + """UpdateRepoAvatarOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._image = None + self.discriminator = None + + if image is not None: + self.image = image + + @property + def image(self): + """Gets the image of this UpdateRepoAvatarOption. # noqa: E501 + + image must be base64 encoded # noqa: E501 + + :return: The image of this UpdateRepoAvatarOption. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this UpdateRepoAvatarOption. + + image must be base64 encoded # noqa: E501 + + :param image: The image of this UpdateRepoAvatarOption. # noqa: E501 + :type: str + """ + + self._image = image + + 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(UpdateRepoAvatarOption, 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, UpdateRepoAvatarOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateRepoAvatarOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/update_user_avatar_option.py b/gitea/models/update_user_avatar_option.py new file mode 100644 index 0000000..99630f8 --- /dev/null +++ b/gitea/models/update_user_avatar_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UpdateUserAvatarOption(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 = { + 'image': 'str' + } + + attribute_map = { + 'image': 'image' + } + + def __init__(self, image=None, _configuration=None): # noqa: E501 + """UpdateUserAvatarOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._image = None + self.discriminator = None + + if image is not None: + self.image = image + + @property + def image(self): + """Gets the image of this UpdateUserAvatarOption. # noqa: E501 + + image must be base64 encoded # noqa: E501 + + :return: The image of this UpdateUserAvatarOption. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this UpdateUserAvatarOption. + + image must be base64 encoded # noqa: E501 + + :param image: The image of this UpdateUserAvatarOption. # noqa: E501 + :type: str + """ + + self._image = image + + 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(UpdateUserAvatarOption, 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, UpdateUserAvatarOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateUserAvatarOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/update_variable_option.py b/gitea/models/update_variable_option.py new file mode 100644 index 0000000..060f4f0 --- /dev/null +++ b/gitea/models/update_variable_option.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UpdateVariableOption(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', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, _configuration=None): # noqa: E501 + """UpdateVariableOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + self.value = value + + @property + def name(self): + """Gets the name of this UpdateVariableOption. # noqa: E501 + + New name for the variable. If the field is empty, the variable name won't be updated. # noqa: E501 + + :return: The name of this UpdateVariableOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UpdateVariableOption. + + New name for the variable. If the field is empty, the variable name won't be updated. # noqa: E501 + + :param name: The name of this UpdateVariableOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this UpdateVariableOption. # noqa: E501 + + Value of the variable to update # noqa: E501 + + :return: The value of this UpdateVariableOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this UpdateVariableOption. + + Value of the variable to update # noqa: E501 + + :param value: The value of this UpdateVariableOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and value is None: + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + 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(UpdateVariableOption, 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, UpdateVariableOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVariableOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/user.py b/gitea/models/user.py new file mode 100644 index 0000000..c72d23b --- /dev/null +++ b/gitea/models/user.py @@ -0,0 +1,703 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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 = { + 'active': 'bool', + 'avatar_url': 'str', + 'created': 'datetime', + 'description': 'str', + 'email': 'str', + 'followers_count': 'int', + 'following_count': 'int', + 'full_name': 'str', + 'html_url': 'str', + 'id': 'int', + 'is_admin': 'bool', + 'language': 'str', + 'last_login': 'datetime', + 'location': 'str', + 'login': 'str', + 'login_name': 'str', + 'prohibit_login': 'bool', + 'restricted': 'bool', + 'source_id': 'int', + 'starred_repos_count': 'int', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'active': 'active', + 'avatar_url': 'avatar_url', + 'created': 'created', + 'description': 'description', + 'email': 'email', + 'followers_count': 'followers_count', + 'following_count': 'following_count', + 'full_name': 'full_name', + 'html_url': 'html_url', + 'id': 'id', + 'is_admin': 'is_admin', + 'language': 'language', + 'last_login': 'last_login', + 'location': 'location', + 'login': 'login', + 'login_name': 'login_name', + 'prohibit_login': 'prohibit_login', + 'restricted': 'restricted', + 'source_id': 'source_id', + 'starred_repos_count': 'starred_repos_count', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, active=None, avatar_url=None, created=None, description=None, email=None, followers_count=None, following_count=None, full_name=None, html_url=None, id=None, is_admin=None, language=None, last_login=None, location=None, login=None, login_name='empty', prohibit_login=None, restricted=None, source_id=None, starred_repos_count=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """User - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._avatar_url = None + self._created = None + self._description = None + self._email = None + self._followers_count = None + self._following_count = None + self._full_name = None + self._html_url = None + self._id = None + self._is_admin = None + self._language = None + self._last_login = None + self._location = None + self._login = None + self._login_name = None + self._prohibit_login = None + self._restricted = None + self._source_id = None + self._starred_repos_count = None + self._visibility = None + self._website = None + self.discriminator = None + + if active is not None: + self.active = active + if avatar_url is not None: + self.avatar_url = avatar_url + if created is not None: + self.created = created + if description is not None: + self.description = description + if email is not None: + self.email = email + if followers_count is not None: + self.followers_count = followers_count + if following_count is not None: + self.following_count = following_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 is_admin is not None: + self.is_admin = is_admin + if language is not None: + self.language = language + if last_login is not None: + self.last_login = last_login + if location is not None: + self.location = location + if login is not None: + self.login = login + if login_name is not None: + self.login_name = login_name + if prohibit_login is not None: + self.prohibit_login = prohibit_login + if restricted is not None: + self.restricted = restricted + if source_id is not None: + self.source_id = source_id + if starred_repos_count is not None: + self.starred_repos_count = starred_repos_count + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def active(self): + """Gets the active of this User. # noqa: E501 + + Is user active # noqa: E501 + + :return: The active of this User. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this User. + + Is user active # noqa: E501 + + :param active: The active of this User. # noqa: E501 + :type: bool + """ + + self._active = active + + @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 created(self): + """Gets the created of this User. # noqa: E501 + + + :return: The created of this User. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this User. + + + :param created: The created of this User. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def description(self): + """Gets the description of this User. # noqa: E501 + + the user's description # noqa: E501 + + :return: The description of this User. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this User. + + the user's description # noqa: E501 + + :param description: The description of this User. # noqa: E501 + :type: str + """ + + self._description = description + + @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 followers_count(self): + """Gets the followers_count of this User. # noqa: E501 + + user counts # noqa: E501 + + :return: The followers_count of this User. # noqa: E501 + :rtype: int + """ + return self._followers_count + + @followers_count.setter + def followers_count(self, followers_count): + """Sets the followers_count of this User. + + user counts # noqa: E501 + + :param followers_count: The followers_count of this User. # noqa: E501 + :type: int + """ + + self._followers_count = followers_count + + @property + def following_count(self): + """Gets the following_count of this User. # noqa: E501 + + + :return: The following_count of this User. # noqa: E501 + :rtype: int + """ + return self._following_count + + @following_count.setter + def following_count(self, following_count): + """Sets the following_count of this User. + + + :param following_count: The following_count of this User. # noqa: E501 + :type: int + """ + + self._following_count = following_count + + @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 html_url(self): + """Gets the html_url of this User. # noqa: E501 + + URL to the user's gitea page # noqa: E501 + + :return: The html_url of this User. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this User. + + URL to the user's gitea page # noqa: E501 + + :param html_url: The html_url of this User. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @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 is_admin(self): + """Gets the is_admin of this User. # noqa: E501 + + Is the user an administrator # noqa: E501 + + :return: The is_admin of this User. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this User. + + Is the user an administrator # noqa: E501 + + :param is_admin: The is_admin of this User. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @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 last_login(self): + """Gets the last_login of this User. # noqa: E501 + + + :return: The last_login of this User. # noqa: E501 + :rtype: datetime + """ + return self._last_login + + @last_login.setter + def last_login(self, last_login): + """Sets the last_login of this User. + + + :param last_login: The last_login of this User. # noqa: E501 + :type: datetime + """ + + self._last_login = last_login + + @property + def location(self): + """Gets the location of this User. # noqa: E501 + + the user's location # noqa: E501 + + :return: The location of this User. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this User. + + the user's location # noqa: E501 + + :param location: The location of this User. # noqa: E501 + :type: str + """ + + self._location = location + + @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 + + @property + def login_name(self): + """Gets the login_name of this User. # noqa: E501 + + the user's authentication sign-in name. # noqa: E501 + + :return: The login_name of this User. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this User. + + the user's authentication sign-in name. # noqa: E501 + + :param login_name: The login_name of this User. # noqa: E501 + :type: str + """ + + self._login_name = login_name + + @property + def prohibit_login(self): + """Gets the prohibit_login of this User. # noqa: E501 + + Is user login prohibited # noqa: E501 + + :return: The prohibit_login of this User. # noqa: E501 + :rtype: bool + """ + return self._prohibit_login + + @prohibit_login.setter + def prohibit_login(self, prohibit_login): + """Sets the prohibit_login of this User. + + Is user login prohibited # noqa: E501 + + :param prohibit_login: The prohibit_login of this User. # noqa: E501 + :type: bool + """ + + self._prohibit_login = prohibit_login + + @property + def restricted(self): + """Gets the restricted of this User. # noqa: E501 + + Is user restricted # noqa: E501 + + :return: The restricted of this User. # noqa: E501 + :rtype: bool + """ + return self._restricted + + @restricted.setter + def restricted(self, restricted): + """Sets the restricted of this User. + + Is user restricted # noqa: E501 + + :param restricted: The restricted of this User. # noqa: E501 + :type: bool + """ + + self._restricted = restricted + + @property + def source_id(self): + """Gets the source_id of this User. # noqa: E501 + + The ID of the user's Authentication Source # noqa: E501 + + :return: The source_id of this User. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this User. + + The ID of the user's Authentication Source # noqa: E501 + + :param source_id: The source_id of this User. # noqa: E501 + :type: int + """ + + self._source_id = source_id + + @property + def starred_repos_count(self): + """Gets the starred_repos_count of this User. # noqa: E501 + + + :return: The starred_repos_count of this User. # noqa: E501 + :rtype: int + """ + return self._starred_repos_count + + @starred_repos_count.setter + def starred_repos_count(self, starred_repos_count): + """Sets the starred_repos_count of this User. + + + :param starred_repos_count: The starred_repos_count of this User. # noqa: E501 + :type: int + """ + + self._starred_repos_count = starred_repos_count + + @property + def visibility(self): + """Gets the visibility of this User. # noqa: E501 + + User visibility level option: public, limited, private # noqa: E501 + + :return: The visibility of this User. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this User. + + User visibility level option: public, limited, private # noqa: E501 + + :param visibility: The visibility of this User. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this User. # noqa: E501 + + the user's website # noqa: E501 + + :return: The website of this User. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this User. + + the user's website # noqa: E501 + + :param website: The website of this User. # 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(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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/user_badge_option.py b/gitea/models/user_badge_option.py new file mode 100644 index 0000000..60a9a81 --- /dev/null +++ b/gitea/models/user_badge_option.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UserBadgeOption(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 = { + 'badge_slugs': 'list[str]' + } + + attribute_map = { + 'badge_slugs': 'badge_slugs' + } + + def __init__(self, badge_slugs=None, _configuration=None): # noqa: E501 + """UserBadgeOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._badge_slugs = None + self.discriminator = None + + if badge_slugs is not None: + self.badge_slugs = badge_slugs + + @property + def badge_slugs(self): + """Gets the badge_slugs of this UserBadgeOption. # noqa: E501 + + + :return: The badge_slugs of this UserBadgeOption. # noqa: E501 + :rtype: list[str] + """ + return self._badge_slugs + + @badge_slugs.setter + def badge_slugs(self, badge_slugs): + """Sets the badge_slugs of this UserBadgeOption. + + + :param badge_slugs: The badge_slugs of this UserBadgeOption. # noqa: E501 + :type: list[str] + """ + + self._badge_slugs = badge_slugs + + 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(UserBadgeOption, 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, UserBadgeOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserBadgeOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/user_heatmap_data.py b/gitea/models/user_heatmap_data.py new file mode 100644 index 0000000..b6637ec --- /dev/null +++ b/gitea/models/user_heatmap_data.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """UserHeatmapData - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserHeatmapData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/user_settings.py b/gitea/models/user_settings.py new file mode 100644 index 0000000..3ce4993 --- /dev/null +++ b/gitea/models/user_settings.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UserSettings(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', + 'diff_view_style': 'str', + 'full_name': 'str', + 'hide_activity': 'bool', + 'hide_email': 'bool', + 'language': 'str', + 'location': 'str', + 'theme': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'diff_view_style': 'diff_view_style', + 'full_name': 'full_name', + 'hide_activity': 'hide_activity', + 'hide_email': 'hide_email', + 'language': 'language', + 'location': 'location', + 'theme': 'theme', + 'website': 'website' + } + + def __init__(self, description=None, diff_view_style=None, full_name=None, hide_activity=None, hide_email=None, language=None, location=None, theme=None, website=None, _configuration=None): # noqa: E501 + """UserSettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._diff_view_style = None + self._full_name = None + self._hide_activity = None + self._hide_email = None + self._language = None + self._location = None + self._theme = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if diff_view_style is not None: + self.diff_view_style = diff_view_style + if full_name is not None: + self.full_name = full_name + if hide_activity is not None: + self.hide_activity = hide_activity + if hide_email is not None: + self.hide_email = hide_email + if language is not None: + self.language = language + if location is not None: + self.location = location + if theme is not None: + self.theme = theme + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this UserSettings. # noqa: E501 + + + :return: The description of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UserSettings. + + + :param description: The description of this UserSettings. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def diff_view_style(self): + """Gets the diff_view_style of this UserSettings. # noqa: E501 + + + :return: The diff_view_style of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._diff_view_style + + @diff_view_style.setter + def diff_view_style(self, diff_view_style): + """Sets the diff_view_style of this UserSettings. + + + :param diff_view_style: The diff_view_style of this UserSettings. # noqa: E501 + :type: str + """ + + self._diff_view_style = diff_view_style + + @property + def full_name(self): + """Gets the full_name of this UserSettings. # noqa: E501 + + + :return: The full_name of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this UserSettings. + + + :param full_name: The full_name of this UserSettings. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def hide_activity(self): + """Gets the hide_activity of this UserSettings. # noqa: E501 + + + :return: The hide_activity of this UserSettings. # noqa: E501 + :rtype: bool + """ + return self._hide_activity + + @hide_activity.setter + def hide_activity(self, hide_activity): + """Sets the hide_activity of this UserSettings. + + + :param hide_activity: The hide_activity of this UserSettings. # noqa: E501 + :type: bool + """ + + self._hide_activity = hide_activity + + @property + def hide_email(self): + """Gets the hide_email of this UserSettings. # noqa: E501 + + Privacy # noqa: E501 + + :return: The hide_email of this UserSettings. # noqa: E501 + :rtype: bool + """ + return self._hide_email + + @hide_email.setter + def hide_email(self, hide_email): + """Sets the hide_email of this UserSettings. + + Privacy # noqa: E501 + + :param hide_email: The hide_email of this UserSettings. # noqa: E501 + :type: bool + """ + + self._hide_email = hide_email + + @property + def language(self): + """Gets the language of this UserSettings. # noqa: E501 + + + :return: The language of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this UserSettings. + + + :param language: The language of this UserSettings. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def location(self): + """Gets the location of this UserSettings. # noqa: E501 + + + :return: The location of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this UserSettings. + + + :param location: The location of this UserSettings. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def theme(self): + """Gets the theme of this UserSettings. # noqa: E501 + + + :return: The theme of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._theme + + @theme.setter + def theme(self, theme): + """Sets the theme of this UserSettings. + + + :param theme: The theme of this UserSettings. # noqa: E501 + :type: str + """ + + self._theme = theme + + @property + def website(self): + """Gets the website of this UserSettings. # noqa: E501 + + + :return: The website of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this UserSettings. + + + :param website: The website of this UserSettings. # 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(UserSettings, 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, UserSettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/user_settings_options.py b/gitea/models/user_settings_options.py new file mode 100644 index 0000000..04d619e --- /dev/null +++ b/gitea/models/user_settings_options.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class UserSettingsOptions(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', + 'diff_view_style': 'str', + 'full_name': 'str', + 'hide_activity': 'bool', + 'hide_email': 'bool', + 'language': 'str', + 'location': 'str', + 'theme': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'diff_view_style': 'diff_view_style', + 'full_name': 'full_name', + 'hide_activity': 'hide_activity', + 'hide_email': 'hide_email', + 'language': 'language', + 'location': 'location', + 'theme': 'theme', + 'website': 'website' + } + + def __init__(self, description=None, diff_view_style=None, full_name=None, hide_activity=None, hide_email=None, language=None, location=None, theme=None, website=None, _configuration=None): # noqa: E501 + """UserSettingsOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._diff_view_style = None + self._full_name = None + self._hide_activity = None + self._hide_email = None + self._language = None + self._location = None + self._theme = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if diff_view_style is not None: + self.diff_view_style = diff_view_style + if full_name is not None: + self.full_name = full_name + if hide_activity is not None: + self.hide_activity = hide_activity + if hide_email is not None: + self.hide_email = hide_email + if language is not None: + self.language = language + if location is not None: + self.location = location + if theme is not None: + self.theme = theme + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this UserSettingsOptions. # noqa: E501 + + + :return: The description of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UserSettingsOptions. + + + :param description: The description of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def diff_view_style(self): + """Gets the diff_view_style of this UserSettingsOptions. # noqa: E501 + + + :return: The diff_view_style of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._diff_view_style + + @diff_view_style.setter + def diff_view_style(self, diff_view_style): + """Sets the diff_view_style of this UserSettingsOptions. + + + :param diff_view_style: The diff_view_style of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._diff_view_style = diff_view_style + + @property + def full_name(self): + """Gets the full_name of this UserSettingsOptions. # noqa: E501 + + + :return: The full_name of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this UserSettingsOptions. + + + :param full_name: The full_name of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def hide_activity(self): + """Gets the hide_activity of this UserSettingsOptions. # noqa: E501 + + + :return: The hide_activity of this UserSettingsOptions. # noqa: E501 + :rtype: bool + """ + return self._hide_activity + + @hide_activity.setter + def hide_activity(self, hide_activity): + """Sets the hide_activity of this UserSettingsOptions. + + + :param hide_activity: The hide_activity of this UserSettingsOptions. # noqa: E501 + :type: bool + """ + + self._hide_activity = hide_activity + + @property + def hide_email(self): + """Gets the hide_email of this UserSettingsOptions. # noqa: E501 + + Privacy # noqa: E501 + + :return: The hide_email of this UserSettingsOptions. # noqa: E501 + :rtype: bool + """ + return self._hide_email + + @hide_email.setter + def hide_email(self, hide_email): + """Sets the hide_email of this UserSettingsOptions. + + Privacy # noqa: E501 + + :param hide_email: The hide_email of this UserSettingsOptions. # noqa: E501 + :type: bool + """ + + self._hide_email = hide_email + + @property + def language(self): + """Gets the language of this UserSettingsOptions. # noqa: E501 + + + :return: The language of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this UserSettingsOptions. + + + :param language: The language of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def location(self): + """Gets the location of this UserSettingsOptions. # noqa: E501 + + + :return: The location of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this UserSettingsOptions. + + + :param location: The location of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def theme(self): + """Gets the theme of this UserSettingsOptions. # noqa: E501 + + + :return: The theme of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._theme + + @theme.setter + def theme(self, theme): + """Sets the theme of this UserSettingsOptions. + + + :param theme: The theme of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._theme = theme + + @property + def website(self): + """Gets the website of this UserSettingsOptions. # noqa: E501 + + + :return: The website of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this UserSettingsOptions. + + + :param website: The website of this UserSettingsOptions. # 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(UserSettingsOptions, 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, UserSettingsOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserSettingsOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/watch_info.py b/gitea/models/watch_info.py new file mode 100644 index 0000000..8aafc29 --- /dev/null +++ b/gitea/models/watch_info.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +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, _configuration=None): # noqa: E501 + """WatchInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + 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.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WatchInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/wiki_commit.py b/gitea/models/wiki_commit.py new file mode 100644 index 0000000..17e2ada --- /dev/null +++ b/gitea/models/wiki_commit.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class WikiCommit(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': 'CommitUser', + 'commiter': 'CommitUser', + 'message': 'str', + 'sha': 'str' + } + + attribute_map = { + 'author': 'author', + 'commiter': 'commiter', + 'message': 'message', + 'sha': 'sha' + } + + def __init__(self, author=None, commiter=None, message=None, sha=None, _configuration=None): # noqa: E501 + """WikiCommit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._commiter = None + self._message = None + self._sha = None + self.discriminator = None + + if author is not None: + self.author = author + if commiter is not None: + self.commiter = commiter + if message is not None: + self.message = message + if sha is not None: + self.sha = sha + + @property + def author(self): + """Gets the author of this WikiCommit. # noqa: E501 + + + :return: The author of this WikiCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this WikiCommit. + + + :param author: The author of this WikiCommit. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def commiter(self): + """Gets the commiter of this WikiCommit. # noqa: E501 + + + :return: The commiter of this WikiCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._commiter + + @commiter.setter + def commiter(self, commiter): + """Sets the commiter of this WikiCommit. + + + :param commiter: The commiter of this WikiCommit. # noqa: E501 + :type: CommitUser + """ + + self._commiter = commiter + + @property + def message(self): + """Gets the message of this WikiCommit. # noqa: E501 + + + :return: The message of this WikiCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this WikiCommit. + + + :param message: The message of this WikiCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def sha(self): + """Gets the sha of this WikiCommit. # noqa: E501 + + + :return: The sha of this WikiCommit. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this WikiCommit. + + + :param sha: The sha of this WikiCommit. # 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(WikiCommit, 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, WikiCommit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiCommit): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/wiki_commit_list.py b/gitea/models/wiki_commit_list.py new file mode 100644 index 0000000..538226f --- /dev/null +++ b/gitea/models/wiki_commit_list.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class WikiCommitList(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 = { + 'commits': 'list[WikiCommit]', + 'count': 'int' + } + + attribute_map = { + 'commits': 'commits', + 'count': 'count' + } + + def __init__(self, commits=None, count=None, _configuration=None): # noqa: E501 + """WikiCommitList - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commits = None + self._count = None + self.discriminator = None + + if commits is not None: + self.commits = commits + if count is not None: + self.count = count + + @property + def commits(self): + """Gets the commits of this WikiCommitList. # noqa: E501 + + + :return: The commits of this WikiCommitList. # noqa: E501 + :rtype: list[WikiCommit] + """ + return self._commits + + @commits.setter + def commits(self, commits): + """Sets the commits of this WikiCommitList. + + + :param commits: The commits of this WikiCommitList. # noqa: E501 + :type: list[WikiCommit] + """ + + self._commits = commits + + @property + def count(self): + """Gets the count of this WikiCommitList. # noqa: E501 + + + :return: The count of this WikiCommitList. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this WikiCommitList. + + + :param count: The count of this WikiCommitList. # noqa: E501 + :type: int + """ + + self._count = count + + 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(WikiCommitList, 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, WikiCommitList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiCommitList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/wiki_page.py b/gitea/models/wiki_page.py new file mode 100644 index 0000000..1f83a35 --- /dev/null +++ b/gitea/models/wiki_page.py @@ -0,0 +1,307 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class WikiPage(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_count': 'int', + 'content_base64': 'str', + 'footer': 'str', + 'html_url': 'str', + 'last_commit': 'WikiCommit', + 'sidebar': 'str', + 'sub_url': 'str', + 'title': 'str' + } + + attribute_map = { + 'commit_count': 'commit_count', + 'content_base64': 'content_base64', + 'footer': 'footer', + 'html_url': 'html_url', + 'last_commit': 'last_commit', + 'sidebar': 'sidebar', + 'sub_url': 'sub_url', + 'title': 'title' + } + + def __init__(self, commit_count=None, content_base64=None, footer=None, html_url=None, last_commit=None, sidebar=None, sub_url=None, title=None, _configuration=None): # noqa: E501 + """WikiPage - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit_count = None + self._content_base64 = None + self._footer = None + self._html_url = None + self._last_commit = None + self._sidebar = None + self._sub_url = None + self._title = None + self.discriminator = None + + if commit_count is not None: + self.commit_count = commit_count + if content_base64 is not None: + self.content_base64 = content_base64 + if footer is not None: + self.footer = footer + if html_url is not None: + self.html_url = html_url + if last_commit is not None: + self.last_commit = last_commit + if sidebar is not None: + self.sidebar = sidebar + if sub_url is not None: + self.sub_url = sub_url + if title is not None: + self.title = title + + @property + def commit_count(self): + """Gets the commit_count of this WikiPage. # noqa: E501 + + + :return: The commit_count of this WikiPage. # noqa: E501 + :rtype: int + """ + return self._commit_count + + @commit_count.setter + def commit_count(self, commit_count): + """Sets the commit_count of this WikiPage. + + + :param commit_count: The commit_count of this WikiPage. # noqa: E501 + :type: int + """ + + self._commit_count = commit_count + + @property + def content_base64(self): + """Gets the content_base64 of this WikiPage. # noqa: E501 + + Page content, base64 encoded # noqa: E501 + + :return: The content_base64 of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._content_base64 + + @content_base64.setter + def content_base64(self, content_base64): + """Sets the content_base64 of this WikiPage. + + Page content, base64 encoded # noqa: E501 + + :param content_base64: The content_base64 of this WikiPage. # noqa: E501 + :type: str + """ + + self._content_base64 = content_base64 + + @property + def footer(self): + """Gets the footer of this WikiPage. # noqa: E501 + + + :return: The footer of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._footer + + @footer.setter + def footer(self, footer): + """Sets the footer of this WikiPage. + + + :param footer: The footer of this WikiPage. # noqa: E501 + :type: str + """ + + self._footer = footer + + @property + def html_url(self): + """Gets the html_url of this WikiPage. # noqa: E501 + + + :return: The html_url of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this WikiPage. + + + :param html_url: The html_url of this WikiPage. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def last_commit(self): + """Gets the last_commit of this WikiPage. # noqa: E501 + + + :return: The last_commit of this WikiPage. # noqa: E501 + :rtype: WikiCommit + """ + return self._last_commit + + @last_commit.setter + def last_commit(self, last_commit): + """Sets the last_commit of this WikiPage. + + + :param last_commit: The last_commit of this WikiPage. # noqa: E501 + :type: WikiCommit + """ + + self._last_commit = last_commit + + @property + def sidebar(self): + """Gets the sidebar of this WikiPage. # noqa: E501 + + + :return: The sidebar of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._sidebar + + @sidebar.setter + def sidebar(self, sidebar): + """Sets the sidebar of this WikiPage. + + + :param sidebar: The sidebar of this WikiPage. # noqa: E501 + :type: str + """ + + self._sidebar = sidebar + + @property + def sub_url(self): + """Gets the sub_url of this WikiPage. # noqa: E501 + + + :return: The sub_url of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._sub_url + + @sub_url.setter + def sub_url(self, sub_url): + """Sets the sub_url of this WikiPage. + + + :param sub_url: The sub_url of this WikiPage. # noqa: E501 + :type: str + """ + + self._sub_url = sub_url + + @property + def title(self): + """Gets the title of this WikiPage. # noqa: E501 + + + :return: The title of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this WikiPage. + + + :param title: The title of this WikiPage. # 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(WikiPage, 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, WikiPage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiPage): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/models/wiki_page_meta_data.py b/gitea/models/wiki_page_meta_data.py new file mode 100644 index 0000000..ad3e31e --- /dev/null +++ b/gitea/models/wiki_page_meta_data.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from gitea.configuration import Configuration + + +class WikiPageMetaData(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 = { + 'html_url': 'str', + 'last_commit': 'WikiCommit', + 'sub_url': 'str', + 'title': 'str' + } + + attribute_map = { + 'html_url': 'html_url', + 'last_commit': 'last_commit', + 'sub_url': 'sub_url', + 'title': 'title' + } + + def __init__(self, html_url=None, last_commit=None, sub_url=None, title=None, _configuration=None): # noqa: E501 + """WikiPageMetaData - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._html_url = None + self._last_commit = None + self._sub_url = None + self._title = None + self.discriminator = None + + if html_url is not None: + self.html_url = html_url + if last_commit is not None: + self.last_commit = last_commit + if sub_url is not None: + self.sub_url = sub_url + if title is not None: + self.title = title + + @property + def html_url(self): + """Gets the html_url of this WikiPageMetaData. # noqa: E501 + + + :return: The html_url of this WikiPageMetaData. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this WikiPageMetaData. + + + :param html_url: The html_url of this WikiPageMetaData. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def last_commit(self): + """Gets the last_commit of this WikiPageMetaData. # noqa: E501 + + + :return: The last_commit of this WikiPageMetaData. # noqa: E501 + :rtype: WikiCommit + """ + return self._last_commit + + @last_commit.setter + def last_commit(self, last_commit): + """Sets the last_commit of this WikiPageMetaData. + + + :param last_commit: The last_commit of this WikiPageMetaData. # noqa: E501 + :type: WikiCommit + """ + + self._last_commit = last_commit + + @property + def sub_url(self): + """Gets the sub_url of this WikiPageMetaData. # noqa: E501 + + + :return: The sub_url of this WikiPageMetaData. # noqa: E501 + :rtype: str + """ + return self._sub_url + + @sub_url.setter + def sub_url(self, sub_url): + """Sets the sub_url of this WikiPageMetaData. + + + :param sub_url: The sub_url of this WikiPageMetaData. # noqa: E501 + :type: str + """ + + self._sub_url = sub_url + + @property + def title(self): + """Gets the title of this WikiPageMetaData. # noqa: E501 + + + :return: The title of this WikiPageMetaData. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this WikiPageMetaData. + + + :param title: The title of this WikiPageMetaData. # 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(WikiPageMetaData, 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, WikiPageMetaData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiPageMetaData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gitea/rest.py b/gitea/rest.py new file mode 100644 index 0000000..faa6955 --- /dev/null +++ b/gitea/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.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.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(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 = '{}' + 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/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..91b9434 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "gitea-api" +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/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..576f56f --- /dev/null +++ b/test/__init__.py @@ -0,0 +1 @@ +# coding: utf-8 \ No newline at end of file diff --git a/test/test_access_token.py b/test/test_access_token.py new file mode 100644 index 0000000..edef2c5 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.access_token import AccessToken # noqa: E501 +from gitea.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 = gitea.models.access_token.AccessToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_task.py b/test/test_action_task.py new file mode 100644 index 0000000..4d0a8ea --- /dev/null +++ b/test/test_action_task.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.action_task import ActionTask # noqa: E501 +from gitea.rest import ApiException + + +class TestActionTask(unittest.TestCase): + """ActionTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionTask(self): + """Test ActionTask""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.action_task.ActionTask() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_task_response.py b/test/test_action_task_response.py new file mode 100644 index 0000000..c00c2f4 --- /dev/null +++ b/test/test_action_task_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.action_task_response import ActionTaskResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestActionTaskResponse(unittest.TestCase): + """ActionTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionTaskResponse(self): + """Test ActionTaskResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.action_task_response.ActionTaskResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_variable.py b/test/test_action_variable.py new file mode 100644 index 0000000..0dce67e --- /dev/null +++ b/test/test_action_variable.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.action_variable import ActionVariable # noqa: E501 +from gitea.rest import ApiException + + +class TestActionVariable(unittest.TestCase): + """ActionVariable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionVariable(self): + """Test ActionVariable""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.action_variable.ActionVariable() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity.py b/test/test_activity.py new file mode 100644 index 0000000..35fc03f --- /dev/null +++ b/test/test_activity.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.activity import Activity # noqa: E501 +from gitea.rest import ApiException + + +class TestActivity(unittest.TestCase): + """Activity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActivity(self): + """Test Activity""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.activity.Activity() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_pub.py b/test/test_activity_pub.py new file mode 100644 index 0000000..ff6ff5e --- /dev/null +++ b/test/test_activity_pub.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.activity_pub import ActivityPub # noqa: E501 +from gitea.rest import ApiException + + +class TestActivityPub(unittest.TestCase): + """ActivityPub unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActivityPub(self): + """Test ActivityPub""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.activity_pub.ActivityPub() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activitypub_api.py b/test/test_activitypub_api.py new file mode 100644 index 0000000..e472abb --- /dev/null +++ b/test/test_activitypub_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.activitypub_api import ActivitypubApi # noqa: E501 +from gitea.rest import ApiException + + +class TestActivitypubApi(unittest.TestCase): + """ActivitypubApi unit test stubs""" + + def setUp(self): + self.api = gitea.api.activitypub_api.ActivitypubApi() # noqa: E501 + + def tearDown(self): + pass + + def test_activitypub_person(self): + """Test case for activitypub_person + + Returns the Person actor for a user # noqa: E501 + """ + pass + + def test_activitypub_person_inbox(self): + """Test case for activitypub_person_inbox + + Send to the inbox # 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..4adcd93 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.add_collaborator_option import AddCollaboratorOption # noqa: E501 +from gitea.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 = gitea.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..74d56d3 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.add_time_option import AddTimeOption # noqa: E501 +from gitea.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 = gitea.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..3572000 --- /dev/null +++ b/test/test_admin_api.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.admin_api import AdminApi # noqa: E501 +from gitea.rest import ApiException + + +class TestAdminApi(unittest.TestCase): + """AdminApi unit test stubs""" + + def setUp(self): + self.api = gitea.api.admin_api.AdminApi() # noqa: E501 + + def tearDown(self): + pass + + def test_admin_add_user_badges(self): + """Test case for admin_add_user_badges + + Add a badge to a user # noqa: E501 + """ + pass + + def test_admin_adopt_repository(self): + """Test case for admin_adopt_repository + + Adopt unadopted files as a repository # noqa: E501 + """ + pass + + def test_admin_create_hook(self): + """Test case for admin_create_hook + + Create a hook # noqa: E501 + """ + 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 of 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_cron_list(self): + """Test case for admin_cron_list + + List cron tasks # noqa: E501 + """ + pass + + def test_admin_cron_run(self): + """Test case for admin_cron_run + + Run cron task # noqa: E501 + """ + pass + + def test_admin_delete_hook(self): + """Test case for admin_delete_hook + + Delete a hook # noqa: E501 + """ + pass + + def test_admin_delete_unadopted_repository(self): + """Test case for admin_delete_unadopted_repository + + Delete unadopted files # 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_badges(self): + """Test case for admin_delete_user_badges + + Remove a badge from 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_hook(self): + """Test case for admin_edit_hook + + Update a hook # noqa: E501 + """ + pass + + def test_admin_edit_user(self): + """Test case for admin_edit_user + + Edit an existing user # noqa: E501 + """ + pass + + def test_admin_get_all_emails(self): + """Test case for admin_get_all_emails + + List all emails # noqa: E501 + """ + pass + + def test_admin_get_all_orgs(self): + """Test case for admin_get_all_orgs + + List all organizations # noqa: E501 + """ + pass + + def test_admin_get_hook(self): + """Test case for admin_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_admin_get_runner_registration_token(self): + """Test case for admin_get_runner_registration_token + + Get an global actions runner registration token # noqa: E501 + """ + pass + + def test_admin_list_hooks(self): + """Test case for admin_list_hooks + + List system's webhooks # noqa: E501 + """ + pass + + def test_admin_list_user_badges(self): + """Test case for admin_list_user_badges + + List a user's badges # noqa: E501 + """ + pass + + def test_admin_rename_user(self): + """Test case for admin_rename_user + + Rename a user # noqa: E501 + """ + pass + + def test_admin_search_emails(self): + """Test case for admin_search_emails + + Search all emails # noqa: E501 + """ + pass + + def test_admin_search_users(self): + """Test case for admin_search_users + + Search users according filter conditions # noqa: E501 + """ + pass + + def test_admin_unadopted_list(self): + """Test case for admin_unadopted_list + + List unadopted repositories # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_annotated_tag.py b/test/test_annotated_tag.py new file mode 100644 index 0000000..caff976 --- /dev/null +++ b/test/test_annotated_tag.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.annotated_tag import AnnotatedTag # noqa: E501 +from gitea.rest import ApiException + + +class TestAnnotatedTag(unittest.TestCase): + """AnnotatedTag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnnotatedTag(self): + """Test AnnotatedTag""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.annotated_tag.AnnotatedTag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_annotated_tag_object.py b/test/test_annotated_tag_object.py new file mode 100644 index 0000000..8a481b2 --- /dev/null +++ b/test/test_annotated_tag_object.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.annotated_tag_object import AnnotatedTagObject # noqa: E501 +from gitea.rest import ApiException + + +class TestAnnotatedTagObject(unittest.TestCase): + """AnnotatedTagObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnnotatedTagObject(self): + """Test AnnotatedTagObject""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.annotated_tag_object.AnnotatedTagObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_error.py b/test/test_api_error.py new file mode 100644 index 0000000..88db5dc --- /dev/null +++ b/test/test_api_error.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.api_error import APIError # noqa: E501 +from gitea.rest import ApiException + + +class TestAPIError(unittest.TestCase): + """APIError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAPIError(self): + """Test APIError""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.api_error.APIError() # 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..b3e361a --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.attachment import Attachment # noqa: E501 +from gitea.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 = gitea.models.attachment.Attachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_badge.py b/test/test_badge.py new file mode 100644 index 0000000..9d5b428 --- /dev/null +++ b/test/test_badge.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.badge import Badge # noqa: E501 +from gitea.rest import ApiException + + +class TestBadge(unittest.TestCase): + """Badge unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBadge(self): + """Test Badge""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.badge.Badge() # 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..670b999 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.branch import Branch # noqa: E501 +from gitea.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 = gitea.models.branch.Branch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_branch_protection.py b/test/test_branch_protection.py new file mode 100644 index 0000000..5ad6b44 --- /dev/null +++ b/test/test_branch_protection.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.branch_protection import BranchProtection # noqa: E501 +from gitea.rest import ApiException + + +class TestBranchProtection(unittest.TestCase): + """BranchProtection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranchProtection(self): + """Test BranchProtection""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.branch_protection.BranchProtection() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_change_file_operation.py b/test/test_change_file_operation.py new file mode 100644 index 0000000..4db420e --- /dev/null +++ b/test/test_change_file_operation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.change_file_operation import ChangeFileOperation # noqa: E501 +from gitea.rest import ApiException + + +class TestChangeFileOperation(unittest.TestCase): + """ChangeFileOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChangeFileOperation(self): + """Test ChangeFileOperation""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.change_file_operation.ChangeFileOperation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_change_files_options.py b/test/test_change_files_options.py new file mode 100644 index 0000000..cf2ca3c --- /dev/null +++ b/test/test_change_files_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.change_files_options import ChangeFilesOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestChangeFilesOptions(unittest.TestCase): + """ChangeFilesOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChangeFilesOptions(self): + """Test ChangeFilesOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.change_files_options.ChangeFilesOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_changed_file.py b/test/test_changed_file.py new file mode 100644 index 0000000..c6a71f8 --- /dev/null +++ b/test/test_changed_file.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.changed_file import ChangedFile # noqa: E501 +from gitea.rest import ApiException + + +class TestChangedFile(unittest.TestCase): + """ChangedFile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChangedFile(self): + """Test ChangedFile""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.changed_file.ChangedFile() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_combined_status.py b/test/test_combined_status.py new file mode 100644 index 0000000..7347aaf --- /dev/null +++ b/test/test_combined_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.combined_status import CombinedStatus # noqa: E501 +from gitea.rest import ApiException + + +class TestCombinedStatus(unittest.TestCase): + """CombinedStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCombinedStatus(self): + """Test CombinedStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.combined_status.CombinedStatus() # 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..dbe8ec1 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.comment import Comment # noqa: E501 +from gitea.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 = gitea.models.comment.Comment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit.py b/test/test_commit.py new file mode 100644 index 0000000..326fff3 --- /dev/null +++ b/test/test_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit import Commit # noqa: E501 +from gitea.rest import ApiException + + +class TestCommit(unittest.TestCase): + """Commit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommit(self): + """Test Commit""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit.Commit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_affected_files.py b/test/test_commit_affected_files.py new file mode 100644 index 0000000..6858935 --- /dev/null +++ b/test/test_commit_affected_files.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit_affected_files import CommitAffectedFiles # noqa: E501 +from gitea.rest import ApiException + + +class TestCommitAffectedFiles(unittest.TestCase): + """CommitAffectedFiles unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitAffectedFiles(self): + """Test CommitAffectedFiles""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit_affected_files.CommitAffectedFiles() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_date_options.py b/test/test_commit_date_options.py new file mode 100644 index 0000000..24c3c37 --- /dev/null +++ b/test/test_commit_date_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit_date_options import CommitDateOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestCommitDateOptions(unittest.TestCase): + """CommitDateOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitDateOptions(self): + """Test CommitDateOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit_date_options.CommitDateOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_meta.py b/test/test_commit_meta.py new file mode 100644 index 0000000..5e781a4 --- /dev/null +++ b/test/test_commit_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit_meta import CommitMeta # noqa: E501 +from gitea.rest import ApiException + + +class TestCommitMeta(unittest.TestCase): + """CommitMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitMeta(self): + """Test CommitMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit_meta.CommitMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_stats.py b/test/test_commit_stats.py new file mode 100644 index 0000000..d867a03 --- /dev/null +++ b/test/test_commit_stats.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit_stats import CommitStats # noqa: E501 +from gitea.rest import ApiException + + +class TestCommitStats(unittest.TestCase): + """CommitStats unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitStats(self): + """Test CommitStats""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit_stats.CommitStats() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_status.py b/test/test_commit_status.py new file mode 100644 index 0000000..ee576b0 --- /dev/null +++ b/test/test_commit_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit_status import CommitStatus # noqa: E501 +from gitea.rest import ApiException + + +class TestCommitStatus(unittest.TestCase): + """CommitStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitStatus(self): + """Test CommitStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit_status.CommitStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_status_state.py b/test/test_commit_status_state.py new file mode 100644 index 0000000..da19cdc --- /dev/null +++ b/test/test_commit_status_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit_status_state import CommitStatusState # noqa: E501 +from gitea.rest import ApiException + + +class TestCommitStatusState(unittest.TestCase): + """CommitStatusState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitStatusState(self): + """Test CommitStatusState""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit_status_state.CommitStatusState() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_user.py b/test/test_commit_user.py new file mode 100644 index 0000000..2eac3b5 --- /dev/null +++ b/test/test_commit_user.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.commit_user import CommitUser # noqa: E501 +from gitea.rest import ApiException + + +class TestCommitUser(unittest.TestCase): + """CommitUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitUser(self): + """Test CommitUser""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.commit_user.CommitUser() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_compare.py b/test/test_compare.py new file mode 100644 index 0000000..81e7fab --- /dev/null +++ b/test/test_compare.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.compare import Compare # noqa: E501 +from gitea.rest import ApiException + + +class TestCompare(unittest.TestCase): + """Compare unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCompare(self): + """Test Compare""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.compare.Compare() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contents_response.py b/test/test_contents_response.py new file mode 100644 index 0000000..b97062f --- /dev/null +++ b/test/test_contents_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.contents_response import ContentsResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestContentsResponse(unittest.TestCase): + """ContentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContentsResponse(self): + """Test ContentsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.contents_response.ContentsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_access_token_option.py b/test/test_create_access_token_option.py new file mode 100644 index 0000000..47a4a74 --- /dev/null +++ b/test/test_create_access_token_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_access_token_option import CreateAccessTokenOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateAccessTokenOption(unittest.TestCase): + """CreateAccessTokenOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateAccessTokenOption(self): + """Test CreateAccessTokenOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_access_token_option.CreateAccessTokenOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_branch_protection_option.py b/test/test_create_branch_protection_option.py new file mode 100644 index 0000000..a678230 --- /dev/null +++ b/test/test_create_branch_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_branch_protection_option import CreateBranchProtectionOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateBranchProtectionOption(unittest.TestCase): + """CreateBranchProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBranchProtectionOption(self): + """Test CreateBranchProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_branch_protection_option.CreateBranchProtectionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_branch_repo_option.py b/test/test_create_branch_repo_option.py new file mode 100644 index 0000000..9c69c98 --- /dev/null +++ b/test/test_create_branch_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_branch_repo_option import CreateBranchRepoOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateBranchRepoOption(unittest.TestCase): + """CreateBranchRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBranchRepoOption(self): + """Test CreateBranchRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_branch_repo_option.CreateBranchRepoOption() # 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..27cc5c7 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_email_option import CreateEmailOption # noqa: E501 +from gitea.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 = gitea.models.create_email_option.CreateEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_file_options.py b/test/test_create_file_options.py new file mode 100644 index 0000000..38c6183 --- /dev/null +++ b/test/test_create_file_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_file_options import CreateFileOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateFileOptions(unittest.TestCase): + """CreateFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateFileOptions(self): + """Test CreateFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_file_options.CreateFileOptions() # 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..598d239 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_fork_option import CreateForkOption # noqa: E501 +from gitea.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 = gitea.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..8ce7828 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_gpg_key_option import CreateGPGKeyOption # noqa: E501 +from gitea.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 = gitea.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..6f017ec --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_hook_option import CreateHookOption # noqa: E501 +from gitea.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 = gitea.models.create_hook_option.CreateHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_hook_option_config.py b/test/test_create_hook_option_config.py new file mode 100644 index 0000000..d5b3529 --- /dev/null +++ b/test/test_create_hook_option_config.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_hook_option_config import CreateHookOptionConfig # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateHookOptionConfig(unittest.TestCase): + """CreateHookOptionConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateHookOptionConfig(self): + """Test CreateHookOptionConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_hook_option_config.CreateHookOptionConfig() # 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..047215f --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_issue_comment_option import CreateIssueCommentOption # noqa: E501 +from gitea.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 = gitea.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..2cb4f1d --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_issue_option import CreateIssueOption # noqa: E501 +from gitea.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 = gitea.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..0b208d7 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_key_option import CreateKeyOption # noqa: E501 +from gitea.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 = gitea.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..1956e6c --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_label_option import CreateLabelOption # noqa: E501 +from gitea.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 = gitea.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..321fa69 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_milestone_option import CreateMilestoneOption # noqa: E501 +from gitea.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 = gitea.models.create_milestone_option.CreateMilestoneOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_o_auth2_application_options.py b/test/test_create_o_auth2_application_options.py new file mode 100644 index 0000000..adf9f91 --- /dev/null +++ b/test/test_create_o_auth2_application_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateOAuth2ApplicationOptions(unittest.TestCase): + """CreateOAuth2ApplicationOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOAuth2ApplicationOptions(self): + """Test CreateOAuth2ApplicationOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_o_auth2_application_options.CreateOAuth2ApplicationOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_or_update_secret_option.py b/test/test_create_or_update_secret_option.py new file mode 100644 index 0000000..459cada --- /dev/null +++ b/test/test_create_or_update_secret_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_or_update_secret_option import CreateOrUpdateSecretOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateOrUpdateSecretOption(unittest.TestCase): + """CreateOrUpdateSecretOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrUpdateSecretOption(self): + """Test CreateOrUpdateSecretOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_or_update_secret_option.CreateOrUpdateSecretOption() # 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..3d62a3e --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_org_option import CreateOrgOption # noqa: E501 +from gitea.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 = gitea.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..cd6d0e5 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_pull_request_option import CreatePullRequestOption # noqa: E501 +from gitea.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 = gitea.models.create_pull_request_option.CreatePullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_review_comment.py b/test/test_create_pull_review_comment.py new file mode 100644 index 0000000..5933814 --- /dev/null +++ b/test/test_create_pull_review_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_pull_review_comment import CreatePullReviewComment # noqa: E501 +from gitea.rest import ApiException + + +class TestCreatePullReviewComment(unittest.TestCase): + """CreatePullReviewComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullReviewComment(self): + """Test CreatePullReviewComment""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_pull_review_comment.CreatePullReviewComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_review_options.py b/test/test_create_pull_review_options.py new file mode 100644 index 0000000..7b3ff3d --- /dev/null +++ b/test/test_create_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_pull_review_options import CreatePullReviewOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestCreatePullReviewOptions(unittest.TestCase): + """CreatePullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullReviewOptions(self): + """Test CreatePullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_pull_review_options.CreatePullReviewOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_push_mirror_option.py b/test/test_create_push_mirror_option.py new file mode 100644 index 0000000..480501e --- /dev/null +++ b/test/test_create_push_mirror_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_push_mirror_option import CreatePushMirrorOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreatePushMirrorOption(unittest.TestCase): + """CreatePushMirrorOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePushMirrorOption(self): + """Test CreatePushMirrorOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_push_mirror_option.CreatePushMirrorOption() # 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..b0e653e --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_release_option import CreateReleaseOption # noqa: E501 +from gitea.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 = gitea.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..cb520c1 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_repo_option import CreateRepoOption # noqa: E501 +from gitea.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 = gitea.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..eb39abd --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_status_option import CreateStatusOption # noqa: E501 +from gitea.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 = gitea.models.create_status_option.CreateStatusOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_tag_option.py b/test/test_create_tag_option.py new file mode 100644 index 0000000..043a17e --- /dev/null +++ b/test/test_create_tag_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_tag_option import CreateTagOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateTagOption(unittest.TestCase): + """CreateTagOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTagOption(self): + """Test CreateTagOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_tag_option.CreateTagOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_tag_protection_option.py b/test/test_create_tag_protection_option.py new file mode 100644 index 0000000..2b491d7 --- /dev/null +++ b/test/test_create_tag_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_tag_protection_option import CreateTagProtectionOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateTagProtectionOption(unittest.TestCase): + """CreateTagProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTagProtectionOption(self): + """Test CreateTagProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_tag_protection_option.CreateTagProtectionOption() # 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..9f53810 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_team_option import CreateTeamOption # noqa: E501 +from gitea.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 = gitea.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..f4d73b9 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_user_option import CreateUserOption # noqa: E501 +from gitea.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 = gitea.models.create_user_option.CreateUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_variable_option.py b/test/test_create_variable_option.py new file mode 100644 index 0000000..b5c763c --- /dev/null +++ b/test/test_create_variable_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_variable_option import CreateVariableOption # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateVariableOption(unittest.TestCase): + """CreateVariableOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateVariableOption(self): + """Test CreateVariableOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_variable_option.CreateVariableOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_wiki_page_options.py b/test/test_create_wiki_page_options.py new file mode 100644 index 0000000..8199ec2 --- /dev/null +++ b/test/test_create_wiki_page_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.create_wiki_page_options import CreateWikiPageOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestCreateWikiPageOptions(unittest.TestCase): + """CreateWikiPageOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateWikiPageOptions(self): + """Test CreateWikiPageOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.create_wiki_page_options.CreateWikiPageOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cron.py b/test/test_cron.py new file mode 100644 index 0000000..6116ab2 --- /dev/null +++ b/test/test_cron.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.cron import Cron # noqa: E501 +from gitea.rest import ApiException + + +class TestCron(unittest.TestCase): + """Cron unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCron(self): + """Test Cron""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.cron.Cron() # 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..e257f88 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.delete_email_option import DeleteEmailOption # noqa: E501 +from gitea.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 = gitea.models.delete_email_option.DeleteEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_file_options.py b/test/test_delete_file_options.py new file mode 100644 index 0000000..46e7a49 --- /dev/null +++ b/test/test_delete_file_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.delete_file_options import DeleteFileOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestDeleteFileOptions(unittest.TestCase): + """DeleteFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteFileOptions(self): + """Test DeleteFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.delete_file_options.DeleteFileOptions() # 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..ebb9a00 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.deploy_key import DeployKey # noqa: E501 +from gitea.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 = gitea.models.deploy_key.DeployKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dismiss_pull_review_options.py b/test/test_dismiss_pull_review_options.py new file mode 100644 index 0000000..4571f24 --- /dev/null +++ b/test/test_dismiss_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.dismiss_pull_review_options import DismissPullReviewOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestDismissPullReviewOptions(unittest.TestCase): + """DismissPullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDismissPullReviewOptions(self): + """Test DismissPullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.dismiss_pull_review_options.DismissPullReviewOptions() # 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..ed0321a --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_attachment_options import EditAttachmentOptions # noqa: E501 +from gitea.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 = gitea.models.edit_attachment_options.EditAttachmentOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_branch_protection_option.py b/test/test_edit_branch_protection_option.py new file mode 100644 index 0000000..060f7e2 --- /dev/null +++ b/test/test_edit_branch_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_branch_protection_option import EditBranchProtectionOption # noqa: E501 +from gitea.rest import ApiException + + +class TestEditBranchProtectionOption(unittest.TestCase): + """EditBranchProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditBranchProtectionOption(self): + """Test EditBranchProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.edit_branch_protection_option.EditBranchProtectionOption() # 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..ace1fe0 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_deadline_option import EditDeadlineOption # noqa: E501 +from gitea.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 = gitea.models.edit_deadline_option.EditDeadlineOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_git_hook_option.py b/test/test_edit_git_hook_option.py new file mode 100644 index 0000000..4098931 --- /dev/null +++ b/test/test_edit_git_hook_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_git_hook_option import EditGitHookOption # noqa: E501 +from gitea.rest import ApiException + + +class TestEditGitHookOption(unittest.TestCase): + """EditGitHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditGitHookOption(self): + """Test EditGitHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.edit_git_hook_option.EditGitHookOption() # 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..f7a7965 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_hook_option import EditHookOption # noqa: E501 +from gitea.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 = gitea.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..b666b9e --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_issue_comment_option import EditIssueCommentOption # noqa: E501 +from gitea.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 = gitea.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..9beac9e --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_issue_option import EditIssueOption # noqa: E501 +from gitea.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 = gitea.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..8fab640 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_label_option import EditLabelOption # noqa: E501 +from gitea.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 = gitea.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..d646dff --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_milestone_option import EditMilestoneOption # noqa: E501 +from gitea.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 = gitea.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..c32495d --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_org_option import EditOrgOption # noqa: E501 +from gitea.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 = gitea.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..7c9f016 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_pull_request_option import EditPullRequestOption # noqa: E501 +from gitea.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 = gitea.models.edit_pull_request_option.EditPullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_reaction_option.py b/test/test_edit_reaction_option.py new file mode 100644 index 0000000..4ae2584 --- /dev/null +++ b/test/test_edit_reaction_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_reaction_option import EditReactionOption # noqa: E501 +from gitea.rest import ApiException + + +class TestEditReactionOption(unittest.TestCase): + """EditReactionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditReactionOption(self): + """Test EditReactionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.edit_reaction_option.EditReactionOption() # 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..8acc1b1 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_release_option import EditReleaseOption # noqa: E501 +from gitea.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 = gitea.models.edit_release_option.EditReleaseOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_repo_option.py b/test/test_edit_repo_option.py new file mode 100644 index 0000000..f648532 --- /dev/null +++ b/test/test_edit_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_repo_option import EditRepoOption # noqa: E501 +from gitea.rest import ApiException + + +class TestEditRepoOption(unittest.TestCase): + """EditRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditRepoOption(self): + """Test EditRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.edit_repo_option.EditRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_tag_protection_option.py b/test/test_edit_tag_protection_option.py new file mode 100644 index 0000000..f4af81c --- /dev/null +++ b/test/test_edit_tag_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_tag_protection_option import EditTagProtectionOption # noqa: E501 +from gitea.rest import ApiException + + +class TestEditTagProtectionOption(unittest.TestCase): + """EditTagProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditTagProtectionOption(self): + """Test EditTagProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.edit_tag_protection_option.EditTagProtectionOption() # 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..aa55900 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_team_option import EditTeamOption # noqa: E501 +from gitea.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 = gitea.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..15b7cf3 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.edit_user_option import EditUserOption # noqa: E501 +from gitea.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 = gitea.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..a60a7e0 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.email import Email # noqa: E501 +from gitea.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 = gitea.models.email.Email() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_tracker.py b/test/test_external_tracker.py new file mode 100644 index 0000000..4704569 --- /dev/null +++ b/test/test_external_tracker.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.external_tracker import ExternalTracker # noqa: E501 +from gitea.rest import ApiException + + +class TestExternalTracker(unittest.TestCase): + """ExternalTracker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExternalTracker(self): + """Test ExternalTracker""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.external_tracker.ExternalTracker() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_wiki.py b/test/test_external_wiki.py new file mode 100644 index 0000000..16daf17 --- /dev/null +++ b/test/test_external_wiki.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.external_wiki import ExternalWiki # noqa: E501 +from gitea.rest import ApiException + + +class TestExternalWiki(unittest.TestCase): + """ExternalWiki unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExternalWiki(self): + """Test ExternalWiki""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.external_wiki.ExternalWiki() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_commit_response.py b/test/test_file_commit_response.py new file mode 100644 index 0000000..e89b3f1 --- /dev/null +++ b/test/test_file_commit_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.file_commit_response import FileCommitResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestFileCommitResponse(unittest.TestCase): + """FileCommitResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileCommitResponse(self): + """Test FileCommitResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.file_commit_response.FileCommitResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_delete_response.py b/test/test_file_delete_response.py new file mode 100644 index 0000000..9bf8b6f --- /dev/null +++ b/test/test_file_delete_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.file_delete_response import FileDeleteResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestFileDeleteResponse(unittest.TestCase): + """FileDeleteResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileDeleteResponse(self): + """Test FileDeleteResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.file_delete_response.FileDeleteResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_links_response.py b/test/test_file_links_response.py new file mode 100644 index 0000000..46de667 --- /dev/null +++ b/test/test_file_links_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.file_links_response import FileLinksResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestFileLinksResponse(unittest.TestCase): + """FileLinksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileLinksResponse(self): + """Test FileLinksResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.file_links_response.FileLinksResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_response.py b/test/test_file_response.py new file mode 100644 index 0000000..ef3047a --- /dev/null +++ b/test/test_file_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.file_response import FileResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestFileResponse(unittest.TestCase): + """FileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileResponse(self): + """Test FileResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.file_response.FileResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_files_response.py b/test/test_files_response.py new file mode 100644 index 0000000..50ced84 --- /dev/null +++ b/test/test_files_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.files_response import FilesResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestFilesResponse(unittest.TestCase): + """FilesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFilesResponse(self): + """Test FilesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.files_response.FilesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_api_settings.py b/test/test_general_api_settings.py new file mode 100644 index 0000000..7cc73b6 --- /dev/null +++ b/test/test_general_api_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.general_api_settings import GeneralAPISettings # noqa: E501 +from gitea.rest import ApiException + + +class TestGeneralAPISettings(unittest.TestCase): + """GeneralAPISettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralAPISettings(self): + """Test GeneralAPISettings""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.general_api_settings.GeneralAPISettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_attachment_settings.py b/test/test_general_attachment_settings.py new file mode 100644 index 0000000..d346072 --- /dev/null +++ b/test/test_general_attachment_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.general_attachment_settings import GeneralAttachmentSettings # noqa: E501 +from gitea.rest import ApiException + + +class TestGeneralAttachmentSettings(unittest.TestCase): + """GeneralAttachmentSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralAttachmentSettings(self): + """Test GeneralAttachmentSettings""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.general_attachment_settings.GeneralAttachmentSettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_repo_settings.py b/test/test_general_repo_settings.py new file mode 100644 index 0000000..e6adc57 --- /dev/null +++ b/test/test_general_repo_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.general_repo_settings import GeneralRepoSettings # noqa: E501 +from gitea.rest import ApiException + + +class TestGeneralRepoSettings(unittest.TestCase): + """GeneralRepoSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralRepoSettings(self): + """Test GeneralRepoSettings""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.general_repo_settings.GeneralRepoSettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_ui_settings.py b/test/test_general_ui_settings.py new file mode 100644 index 0000000..d8342d2 --- /dev/null +++ b/test/test_general_ui_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.general_ui_settings import GeneralUISettings # noqa: E501 +from gitea.rest import ApiException + + +class TestGeneralUISettings(unittest.TestCase): + """GeneralUISettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralUISettings(self): + """Test GeneralUISettings""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.general_ui_settings.GeneralUISettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_generate_repo_option.py b/test/test_generate_repo_option.py new file mode 100644 index 0000000..1d9a9b1 --- /dev/null +++ b/test/test_generate_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.generate_repo_option import GenerateRepoOption # noqa: E501 +from gitea.rest import ApiException + + +class TestGenerateRepoOption(unittest.TestCase): + """GenerateRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateRepoOption(self): + """Test GenerateRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.generate_repo_option.GenerateRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_blob_response.py b/test/test_git_blob_response.py new file mode 100644 index 0000000..3e70c78 --- /dev/null +++ b/test/test_git_blob_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.git_blob_response import GitBlobResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestGitBlobResponse(unittest.TestCase): + """GitBlobResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitBlobResponse(self): + """Test GitBlobResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.git_blob_response.GitBlobResponse() # 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..b7eb8b3 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.git_entry import GitEntry # noqa: E501 +from gitea.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 = gitea.models.git_entry.GitEntry() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_hook.py b/test/test_git_hook.py new file mode 100644 index 0000000..c2bf83f --- /dev/null +++ b/test/test_git_hook.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.git_hook import GitHook # noqa: E501 +from gitea.rest import ApiException + + +class TestGitHook(unittest.TestCase): + """GitHook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitHook(self): + """Test GitHook""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.git_hook.GitHook() # 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..386041a --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.git_object import GitObject # noqa: E501 +from gitea.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 = gitea.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..db2374b --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.git_tree_response import GitTreeResponse # noqa: E501 +from gitea.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 = gitea.models.git_tree_response.GitTreeResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gitignore_template_info.py b/test/test_gitignore_template_info.py new file mode 100644 index 0000000..91e9cb7 --- /dev/null +++ b/test/test_gitignore_template_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.gitignore_template_info import GitignoreTemplateInfo # noqa: E501 +from gitea.rest import ApiException + + +class TestGitignoreTemplateInfo(unittest.TestCase): + """GitignoreTemplateInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitignoreTemplateInfo(self): + """Test GitignoreTemplateInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.gitignore_template_info.GitignoreTemplateInfo() # 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..9fdbdec --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.gpg_key import GPGKey # noqa: E501 +from gitea.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 = gitea.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..f5ce6a6 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.gpg_key_email import GPGKeyEmail # noqa: E501 +from gitea.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 = gitea.models.gpg_key_email.GPGKeyEmail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hook.py b/test/test_hook.py new file mode 100644 index 0000000..a126cf9 --- /dev/null +++ b/test/test_hook.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.hook import Hook # noqa: E501 +from gitea.rest import ApiException + + +class TestHook(unittest.TestCase): + """Hook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHook(self): + """Test Hook""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.hook.Hook() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_identity.py b/test/test_identity.py new file mode 100644 index 0000000..ad6ea57 --- /dev/null +++ b/test/test_identity.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.identity import Identity # noqa: E501 +from gitea.rest import ApiException + + +class TestIdentity(unittest.TestCase): + """Identity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIdentity(self): + """Test Identity""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.identity.Identity() # 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..4d9ab63 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.inline_response200 import InlineResponse200 # noqa: E501 +from gitea.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 = gitea.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response2001.py b/test/test_inline_response2001.py new file mode 100644 index 0000000..7467504 --- /dev/null +++ b/test/test_inline_response2001.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.inline_response2001 import InlineResponse2001 # noqa: E501 +from gitea.rest import ApiException + + +class TestInlineResponse2001(unittest.TestCase): + """InlineResponse2001 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2001(self): + """Test InlineResponse2001""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.inline_response2001.InlineResponse2001() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_tracker.py b/test/test_internal_tracker.py new file mode 100644 index 0000000..5c32387 --- /dev/null +++ b/test/test_internal_tracker.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.internal_tracker import InternalTracker # noqa: E501 +from gitea.rest import ApiException + + +class TestInternalTracker(unittest.TestCase): + """InternalTracker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInternalTracker(self): + """Test InternalTracker""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.internal_tracker.InternalTracker() # 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..cfa47ca --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue import Issue # noqa: E501 +from gitea.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 = gitea.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..5858b4e --- /dev/null +++ b/test/test_issue_api.py @@ -0,0 +1,503 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.issue_api import IssueApi # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueApi(unittest.TestCase): + """IssueApi unit test stubs""" + + def setUp(self): + self.api = gitea.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_subscription(self): + """Test case for issue_add_subscription + + Subscribe user to issue # noqa: E501 + """ + pass + + def test_issue_add_time(self): + """Test case for issue_add_time + + Add tracked time to a issue # noqa: E501 + """ + pass + + def test_issue_check_subscription(self): + """Test case for issue_check_subscription + + Check if user is subscribed to an 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_issue_attachment(self): + """Test case for issue_create_issue_attachment + + Create an issue attachment # noqa: E501 + """ + pass + + def test_issue_create_issue_blocking(self): + """Test case for issue_create_issue_blocking + + Block the issue given in the body by the issue in path # noqa: E501 + """ + pass + + def test_issue_create_issue_comment_attachment(self): + """Test case for issue_create_issue_comment_attachment + + Create a comment attachment # noqa: E501 + """ + pass + + def test_issue_create_issue_dependencies(self): + """Test case for issue_create_issue_dependencies + + Make the issue in the url depend on the issue in the form. # 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(self): + """Test case for issue_delete + + Delete an issue # 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_comment_reaction(self): + """Test case for issue_delete_comment_reaction + + Remove a reaction from a comment of an issue # noqa: E501 + """ + pass + + def test_issue_delete_issue_attachment(self): + """Test case for issue_delete_issue_attachment + + Delete an issue attachment # noqa: E501 + """ + pass + + def test_issue_delete_issue_comment_attachment(self): + """Test case for issue_delete_issue_comment_attachment + + Delete a comment attachment # noqa: E501 + """ + pass + + def test_issue_delete_issue_reaction(self): + """Test case for issue_delete_issue_reaction + + Remove a reaction from an issue # 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_delete_stop_watch(self): + """Test case for issue_delete_stop_watch + + Delete an issue's existing stopwatch. # noqa: E501 + """ + pass + + def test_issue_delete_subscription(self): + """Test case for issue_delete_subscription + + Unsubscribe user from issue # noqa: E501 + """ + pass + + def test_issue_delete_time(self): + """Test case for issue_delete_time + + Delete specific tracked time # 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_attachment(self): + """Test case for issue_edit_issue_attachment + + Edit an issue attachment # noqa: E501 + """ + pass + + def test_issue_edit_issue_comment_attachment(self): + """Test case for issue_edit_issue_comment_attachment + + Edit a comment attachment # 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_comment(self): + """Test case for issue_get_comment + + Get a comment # noqa: E501 + """ + pass + + def test_issue_get_comment_reactions(self): + """Test case for issue_get_comment_reactions + + Get a list of reactions from a comment of an issue # 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_comments_and_timeline(self): + """Test case for issue_get_comments_and_timeline + + List all comments and events 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_issue_attachment(self): + """Test case for issue_get_issue_attachment + + Get an issue attachment # noqa: E501 + """ + pass + + def test_issue_get_issue_comment_attachment(self): + """Test case for issue_get_issue_comment_attachment + + Get a comment attachment # noqa: E501 + """ + pass + + def test_issue_get_issue_reactions(self): + """Test case for issue_get_issue_reactions + + Get a list reactions of 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_blocks(self): + """Test case for issue_list_blocks + + List issues that are blocked by this issue # noqa: E501 + """ + pass + + def test_issue_list_issue_attachments(self): + """Test case for issue_list_issue_attachments + + List issue's attachments # noqa: E501 + """ + pass + + def test_issue_list_issue_comment_attachments(self): + """Test case for issue_list_issue_comment_attachments + + List comment's attachments # noqa: E501 + """ + pass + + def test_issue_list_issue_dependencies(self): + """Test case for issue_list_issue_dependencies + + List an issue's dependencies, i.e all issues that block this issue. # 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_post_comment_reaction(self): + """Test case for issue_post_comment_reaction + + Add a reaction to a comment of an issue # noqa: E501 + """ + pass + + def test_issue_post_issue_reaction(self): + """Test case for issue_post_issue_reaction + + Add a reaction to an issue # noqa: E501 + """ + pass + + def test_issue_remove_issue_blocking(self): + """Test case for issue_remove_issue_blocking + + Unblock the issue given in the body by the issue in path # noqa: E501 + """ + pass + + def test_issue_remove_issue_dependencies(self): + """Test case for issue_remove_issue_dependencies + + Remove an issue dependency # 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_reset_time(self): + """Test case for issue_reset_time + + Reset a tracked time of an issue # noqa: E501 + """ + pass + + def test_issue_search_issues(self): + """Test case for issue_search_issues + + Search for issues across the repositories that the user has access to # noqa: E501 + """ + pass + + def test_issue_start_stop_watch(self): + """Test case for issue_start_stop_watch + + Start stopwatch on an issue. # noqa: E501 + """ + pass + + def test_issue_stop_stop_watch(self): + """Test case for issue_stop_stop_watch + + Stop an issue's existing stopwatch. # noqa: E501 + """ + pass + + def test_issue_subscriptions(self): + """Test case for issue_subscriptions + + Get users who subscribed on an issue. # noqa: E501 + """ + pass + + def test_issue_tracked_times(self): + """Test case for issue_tracked_times + + List an issue's tracked times # noqa: E501 + """ + pass + + def test_move_issue_pin(self): + """Test case for move_issue_pin + + Moves the Pin to the given Position # noqa: E501 + """ + pass + + def test_pin_issue(self): + """Test case for pin_issue + + Pin an Issue # noqa: E501 + """ + pass + + def test_unpin_issue(self): + """Test case for unpin_issue + + Unpin an Issue # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_config.py b/test/test_issue_config.py new file mode 100644 index 0000000..13fc627 --- /dev/null +++ b/test/test_issue_config.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_config import IssueConfig # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueConfig(unittest.TestCase): + """IssueConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueConfig(self): + """Test IssueConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_config.IssueConfig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_config_contact_link.py b/test/test_issue_config_contact_link.py new file mode 100644 index 0000000..99d9440 --- /dev/null +++ b/test/test_issue_config_contact_link.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_config_contact_link import IssueConfigContactLink # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueConfigContactLink(unittest.TestCase): + """IssueConfigContactLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueConfigContactLink(self): + """Test IssueConfigContactLink""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_config_contact_link.IssueConfigContactLink() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_config_validation.py b/test/test_issue_config_validation.py new file mode 100644 index 0000000..6636516 --- /dev/null +++ b/test/test_issue_config_validation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_config_validation import IssueConfigValidation # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueConfigValidation(unittest.TestCase): + """IssueConfigValidation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueConfigValidation(self): + """Test IssueConfigValidation""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_config_validation.IssueConfigValidation() # 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..028bd4f --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_deadline import IssueDeadline # noqa: E501 +from gitea.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 = gitea.models.issue_deadline.IssueDeadline() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_form_field.py b/test/test_issue_form_field.py new file mode 100644 index 0000000..c5fd8b0 --- /dev/null +++ b/test/test_issue_form_field.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_form_field import IssueFormField # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueFormField(unittest.TestCase): + """IssueFormField unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueFormField(self): + """Test IssueFormField""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_form_field.IssueFormField() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_form_field_type.py b/test/test_issue_form_field_type.py new file mode 100644 index 0000000..8762c10 --- /dev/null +++ b/test/test_issue_form_field_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_form_field_type import IssueFormFieldType # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueFormFieldType(unittest.TestCase): + """IssueFormFieldType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueFormFieldType(self): + """Test IssueFormFieldType""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_form_field_type.IssueFormFieldType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_form_field_visible.py b/test/test_issue_form_field_visible.py new file mode 100644 index 0000000..d1acb9a --- /dev/null +++ b/test/test_issue_form_field_visible.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_form_field_visible import IssueFormFieldVisible # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueFormFieldVisible(unittest.TestCase): + """IssueFormFieldVisible unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueFormFieldVisible(self): + """Test IssueFormFieldVisible""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_form_field_visible.IssueFormFieldVisible() # 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..fda181f --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_labels_option import IssueLabelsOption # noqa: E501 +from gitea.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 = gitea.models.issue_labels_option.IssueLabelsOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_meta.py b/test/test_issue_meta.py new file mode 100644 index 0000000..10ec797 --- /dev/null +++ b/test/test_issue_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_meta import IssueMeta # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueMeta(unittest.TestCase): + """IssueMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueMeta(self): + """Test IssueMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_meta.IssueMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_template.py b/test/test_issue_template.py new file mode 100644 index 0000000..f7bb7dd --- /dev/null +++ b/test/test_issue_template.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_template import IssueTemplate # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueTemplate(unittest.TestCase): + """IssueTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueTemplate(self): + """Test IssueTemplate""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_template.IssueTemplate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_template_string_slice.py b/test/test_issue_template_string_slice.py new file mode 100644 index 0000000..15534e2 --- /dev/null +++ b/test/test_issue_template_string_slice.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.issue_template_string_slice import IssueTemplateStringSlice # noqa: E501 +from gitea.rest import ApiException + + +class TestIssueTemplateStringSlice(unittest.TestCase): + """IssueTemplateStringSlice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueTemplateStringSlice(self): + """Test IssueTemplateStringSlice""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.issue_template_string_slice.IssueTemplateStringSlice() # 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..d69d538 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.label import Label # noqa: E501 +from gitea.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 = gitea.models.label.Label() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_label_template.py b/test/test_label_template.py new file mode 100644 index 0000000..5665da6 --- /dev/null +++ b/test/test_label_template.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.label_template import LabelTemplate # noqa: E501 +from gitea.rest import ApiException + + +class TestLabelTemplate(unittest.TestCase): + """LabelTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLabelTemplate(self): + """Test LabelTemplate""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.label_template.LabelTemplate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_license_template_info.py b/test/test_license_template_info.py new file mode 100644 index 0000000..fc610dd --- /dev/null +++ b/test/test_license_template_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.license_template_info import LicenseTemplateInfo # noqa: E501 +from gitea.rest import ApiException + + +class TestLicenseTemplateInfo(unittest.TestCase): + """LicenseTemplateInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLicenseTemplateInfo(self): + """Test LicenseTemplateInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.license_template_info.LicenseTemplateInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_licenses_template_list_entry.py b/test/test_licenses_template_list_entry.py new file mode 100644 index 0000000..837f737 --- /dev/null +++ b/test/test_licenses_template_list_entry.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.licenses_template_list_entry import LicensesTemplateListEntry # noqa: E501 +from gitea.rest import ApiException + + +class TestLicensesTemplateListEntry(unittest.TestCase): + """LicensesTemplateListEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLicensesTemplateListEntry(self): + """Test LicensesTemplateListEntry""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.licenses_template_list_entry.LicensesTemplateListEntry() # 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..9fa77f5 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.markdown_option import MarkdownOption # noqa: E501 +from gitea.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 = gitea.models.markdown_option.MarkdownOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_markup_option.py b/test/test_markup_option.py new file mode 100644 index 0000000..8315d05 --- /dev/null +++ b/test/test_markup_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.markup_option import MarkupOption # noqa: E501 +from gitea.rest import ApiException + + +class TestMarkupOption(unittest.TestCase): + """MarkupOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMarkupOption(self): + """Test MarkupOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.markup_option.MarkupOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_merge_pull_request_option.py b/test/test_merge_pull_request_option.py new file mode 100644 index 0000000..3732682 --- /dev/null +++ b/test/test_merge_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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.merge_pull_request_option import MergePullRequestOption # noqa: E501 +from gitea.rest import ApiException + + +class TestMergePullRequestOption(unittest.TestCase): + """MergePullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergePullRequestOption(self): + """Test MergePullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.merge_pull_request_option.MergePullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_merge_upstream_request.py b/test/test_merge_upstream_request.py new file mode 100644 index 0000000..f5bc837 --- /dev/null +++ b/test/test_merge_upstream_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.merge_upstream_request import MergeUpstreamRequest # noqa: E501 +from gitea.rest import ApiException + + +class TestMergeUpstreamRequest(unittest.TestCase): + """MergeUpstreamRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergeUpstreamRequest(self): + """Test MergeUpstreamRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.merge_upstream_request.MergeUpstreamRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_merge_upstream_response.py b/test/test_merge_upstream_response.py new file mode 100644 index 0000000..c933f94 --- /dev/null +++ b/test/test_merge_upstream_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.merge_upstream_response import MergeUpstreamResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestMergeUpstreamResponse(unittest.TestCase): + """MergeUpstreamResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergeUpstreamResponse(self): + """Test MergeUpstreamResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.merge_upstream_response.MergeUpstreamResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_migrate_repo_options.py b/test/test_migrate_repo_options.py new file mode 100644 index 0000000..ab5a7b8 --- /dev/null +++ b/test/test_migrate_repo_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.migrate_repo_options import MigrateRepoOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestMigrateRepoOptions(unittest.TestCase): + """MigrateRepoOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMigrateRepoOptions(self): + """Test MigrateRepoOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.migrate_repo_options.MigrateRepoOptions() # 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..829240a --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.milestone import Milestone # noqa: E501 +from gitea.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 = gitea.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..df289fb --- /dev/null +++ b/test/test_miscellaneous_api.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.miscellaneous_api import MiscellaneousApi # noqa: E501 +from gitea.rest import ApiException + + +class TestMiscellaneousApi(unittest.TestCase): + """MiscellaneousApi unit test stubs""" + + def setUp(self): + self.api = gitea.api.miscellaneous_api.MiscellaneousApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_gitignore_template_info(self): + """Test case for get_gitignore_template_info + + Returns information about a gitignore template # noqa: E501 + """ + pass + + def test_get_label_template_info(self): + """Test case for get_label_template_info + + Returns all labels in a template # noqa: E501 + """ + pass + + def test_get_license_template_info(self): + """Test case for get_license_template_info + + Returns information about a license template # noqa: E501 + """ + pass + + def test_get_node_info(self): + """Test case for get_node_info + + Returns the nodeinfo of the Gitea application # noqa: E501 + """ + pass + + def test_get_signing_key(self): + """Test case for get_signing_key + + Get default signing-key.gpg # noqa: E501 + """ + pass + + def test_get_version(self): + """Test case for get_version + + Returns the version of the Gitea application # noqa: E501 + """ + pass + + def test_list_gitignores_templates(self): + """Test case for list_gitignores_templates + + Returns a list of all gitignore templates # noqa: E501 + """ + pass + + def test_list_label_templates(self): + """Test case for list_label_templates + + Returns a list of all label templates # noqa: E501 + """ + pass + + def test_list_license_templates(self): + """Test case for list_license_templates + + Returns a list of all license templates # 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 + + def test_render_markup(self): + """Test case for render_markup + + Render a markup document as HTML # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_new_issue_pins_allowed.py b/test/test_new_issue_pins_allowed.py new file mode 100644 index 0000000..7207138 --- /dev/null +++ b/test/test_new_issue_pins_allowed.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.new_issue_pins_allowed import NewIssuePinsAllowed # noqa: E501 +from gitea.rest import ApiException + + +class TestNewIssuePinsAllowed(unittest.TestCase): + """NewIssuePinsAllowed unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNewIssuePinsAllowed(self): + """Test NewIssuePinsAllowed""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.new_issue_pins_allowed.NewIssuePinsAllowed() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info.py b/test/test_node_info.py new file mode 100644 index 0000000..db08f47 --- /dev/null +++ b/test/test_node_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.node_info import NodeInfo # noqa: E501 +from gitea.rest import ApiException + + +class TestNodeInfo(unittest.TestCase): + """NodeInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfo(self): + """Test NodeInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.node_info.NodeInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_services.py b/test/test_node_info_services.py new file mode 100644 index 0000000..d87e095 --- /dev/null +++ b/test/test_node_info_services.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.node_info_services import NodeInfoServices # noqa: E501 +from gitea.rest import ApiException + + +class TestNodeInfoServices(unittest.TestCase): + """NodeInfoServices unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoServices(self): + """Test NodeInfoServices""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.node_info_services.NodeInfoServices() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_software.py b/test/test_node_info_software.py new file mode 100644 index 0000000..20450b9 --- /dev/null +++ b/test/test_node_info_software.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.node_info_software import NodeInfoSoftware # noqa: E501 +from gitea.rest import ApiException + + +class TestNodeInfoSoftware(unittest.TestCase): + """NodeInfoSoftware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoSoftware(self): + """Test NodeInfoSoftware""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.node_info_software.NodeInfoSoftware() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_usage.py b/test/test_node_info_usage.py new file mode 100644 index 0000000..e5b4fce --- /dev/null +++ b/test/test_node_info_usage.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.node_info_usage import NodeInfoUsage # noqa: E501 +from gitea.rest import ApiException + + +class TestNodeInfoUsage(unittest.TestCase): + """NodeInfoUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoUsage(self): + """Test NodeInfoUsage""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.node_info_usage.NodeInfoUsage() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_usage_users.py b/test/test_node_info_usage_users.py new file mode 100644 index 0000000..af988d5 --- /dev/null +++ b/test/test_node_info_usage_users.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.node_info_usage_users import NodeInfoUsageUsers # noqa: E501 +from gitea.rest import ApiException + + +class TestNodeInfoUsageUsers(unittest.TestCase): + """NodeInfoUsageUsers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoUsageUsers(self): + """Test NodeInfoUsageUsers""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.node_info_usage_users.NodeInfoUsageUsers() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_note.py b/test/test_note.py new file mode 100644 index 0000000..56d6a60 --- /dev/null +++ b/test/test_note.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.note import Note # noqa: E501 +from gitea.rest import ApiException + + +class TestNote(unittest.TestCase): + """Note unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNote(self): + """Test Note""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.note.Note() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_api.py b/test/test_notification_api.py new file mode 100644 index 0000000..22416b3 --- /dev/null +++ b/test/test_notification_api.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.notification_api import NotificationApi # noqa: E501 +from gitea.rest import ApiException + + +class TestNotificationApi(unittest.TestCase): + """NotificationApi unit test stubs""" + + def setUp(self): + self.api = gitea.api.notification_api.NotificationApi() # noqa: E501 + + def tearDown(self): + pass + + def test_notify_get_list(self): + """Test case for notify_get_list + + List users's notification threads # noqa: E501 + """ + pass + + def test_notify_get_repo_list(self): + """Test case for notify_get_repo_list + + List users's notification threads on a specific repo # noqa: E501 + """ + pass + + def test_notify_get_thread(self): + """Test case for notify_get_thread + + Get notification thread by ID # noqa: E501 + """ + pass + + def test_notify_new_available(self): + """Test case for notify_new_available + + Check if unread notifications exist # noqa: E501 + """ + pass + + def test_notify_read_list(self): + """Test case for notify_read_list + + Mark notification threads as read, pinned or unread # noqa: E501 + """ + pass + + def test_notify_read_repo_list(self): + """Test case for notify_read_repo_list + + Mark notification threads as read, pinned or unread on a specific repo # noqa: E501 + """ + pass + + def test_notify_read_thread(self): + """Test case for notify_read_thread + + Mark notification thread as read by ID # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_count.py b/test/test_notification_count.py new file mode 100644 index 0000000..82d29ef --- /dev/null +++ b/test/test_notification_count.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.notification_count import NotificationCount # noqa: E501 +from gitea.rest import ApiException + + +class TestNotificationCount(unittest.TestCase): + """NotificationCount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationCount(self): + """Test NotificationCount""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.notification_count.NotificationCount() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_subject.py b/test/test_notification_subject.py new file mode 100644 index 0000000..3ffcf67 --- /dev/null +++ b/test/test_notification_subject.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.notification_subject import NotificationSubject # noqa: E501 +from gitea.rest import ApiException + + +class TestNotificationSubject(unittest.TestCase): + """NotificationSubject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationSubject(self): + """Test NotificationSubject""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.notification_subject.NotificationSubject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_thread.py b/test/test_notification_thread.py new file mode 100644 index 0000000..b67cd4d --- /dev/null +++ b/test/test_notification_thread.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.notification_thread import NotificationThread # noqa: E501 +from gitea.rest import ApiException + + +class TestNotificationThread(unittest.TestCase): + """NotificationThread unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationThread(self): + """Test NotificationThread""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.notification_thread.NotificationThread() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notify_subject_type.py b/test/test_notify_subject_type.py new file mode 100644 index 0000000..46d5144 --- /dev/null +++ b/test/test_notify_subject_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.notify_subject_type import NotifySubjectType # noqa: E501 +from gitea.rest import ApiException + + +class TestNotifySubjectType(unittest.TestCase): + """NotifySubjectType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotifySubjectType(self): + """Test NotifySubjectType""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.notify_subject_type.NotifySubjectType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_application.py b/test/test_o_auth2_application.py new file mode 100644 index 0000000..5904354 --- /dev/null +++ b/test/test_o_auth2_application.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.o_auth2_application import OAuth2Application # noqa: E501 +from gitea.rest import ApiException + + +class TestOAuth2Application(unittest.TestCase): + """OAuth2Application unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2Application(self): + """Test OAuth2Application""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.o_auth2_application.OAuth2Application() # 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..485cad2 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.organization import Organization # noqa: E501 +from gitea.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 = gitea.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..5e682b7 --- /dev/null +++ b/test/test_organization_api.py @@ -0,0 +1,447 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.organization_api import OrganizationApi # noqa: E501 +from gitea.rest import ApiException + + +class TestOrganizationApi(unittest.TestCase): + """OrganizationApi unit test stubs""" + + def setUp(self): + self.api = gitea.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_create_org_repo_deprecated(self): + """Test case for create_org_repo_deprecated + + Create a repository in an organization # noqa: E501 + """ + pass + + def test_create_org_variable(self): + """Test case for create_org_variable + + Create an org-level variable # noqa: E501 + """ + pass + + def test_delete_org_secret(self): + """Test case for delete_org_secret + + Delete a secret in an organization # noqa: E501 + """ + pass + + def test_delete_org_variable(self): + """Test case for delete_org_variable + + Delete an org-level variable # noqa: E501 + """ + pass + + def test_get_org_variable(self): + """Test case for get_org_variable + + Get an org-level variable # noqa: E501 + """ + pass + + def test_get_org_variables_list(self): + """Test case for get_org_variables_list + + Get an org-level variables list # 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_label(self): + """Test case for org_create_label + + Create a label for an organization # 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_avatar(self): + """Test case for org_delete_avatar + + Delete Avatar # 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_label(self): + """Test case for org_delete_label + + Delete a label # 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_label(self): + """Test case for org_edit_label + + Update a label # 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_all(self): + """Test case for org_get_all + + Get list of organizations # 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_label(self): + """Test case for org_get_label + + Get a single label # noqa: E501 + """ + pass + + def test_org_get_runner_registration_token(self): + """Test case for org_get_runner_registration_token + + Get an organization's actions runner registration token # noqa: E501 + """ + pass + + def test_org_get_team(self): + """Test case for org_get_team + + Get a team # noqa: E501 + """ + pass + + def test_org_get_user_permissions(self): + """Test case for org_get_user_permissions + + Get user permissions in organization # 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_actions_secrets(self): + """Test case for org_list_actions_secrets + + List an organization's actions secrets # noqa: E501 + """ + pass + + def test_org_list_activity_feeds(self): + """Test case for org_list_activity_feeds + + List an organization's activity feeds # 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_labels(self): + """Test case for org_list_labels + + List an organization's labels # 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_activity_feeds(self): + """Test case for org_list_team_activity_feeds + + List a team's activity feeds # noqa: E501 + """ + pass + + def test_org_list_team_member(self): + """Test case for org_list_team_member + + List a particular member of team # 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_repo(self): + """Test case for org_list_team_repo + + List a particular repo of team # 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 + + def test_org_update_avatar(self): + """Test case for org_update_avatar + + Update Avatar # noqa: E501 + """ + pass + + def test_organization_block_user(self): + """Test case for organization_block_user + + Block a user # noqa: E501 + """ + pass + + def test_organization_check_user_block(self): + """Test case for organization_check_user_block + + Check if a user is blocked by the organization # noqa: E501 + """ + pass + + def test_organization_list_blocks(self): + """Test case for organization_list_blocks + + List users blocked by the organization # noqa: E501 + """ + pass + + def test_organization_unblock_user(self): + """Test case for organization_unblock_user + + Unblock a user # noqa: E501 + """ + pass + + def test_team_search(self): + """Test case for team_search + + Search for teams within an organization # noqa: E501 + """ + pass + + def test_update_org_secret(self): + """Test case for update_org_secret + + Create or Update a secret value in an organization # noqa: E501 + """ + pass + + def test_update_org_variable(self): + """Test case for update_org_variable + + Update an org-level variable # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_permissions.py b/test/test_organization_permissions.py new file mode 100644 index 0000000..9904d2b --- /dev/null +++ b/test/test_organization_permissions.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.organization_permissions import OrganizationPermissions # noqa: E501 +from gitea.rest import ApiException + + +class TestOrganizationPermissions(unittest.TestCase): + """OrganizationPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationPermissions(self): + """Test OrganizationPermissions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.organization_permissions.OrganizationPermissions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_package.py b/test/test_package.py new file mode 100644 index 0000000..e17685b --- /dev/null +++ b/test/test_package.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.package import Package # noqa: E501 +from gitea.rest import ApiException + + +class TestPackage(unittest.TestCase): + """Package unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPackage(self): + """Test Package""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.package.Package() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_package_api.py b/test/test_package_api.py new file mode 100644 index 0000000..0b01a68 --- /dev/null +++ b/test/test_package_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.package_api import PackageApi # noqa: E501 +from gitea.rest import ApiException + + +class TestPackageApi(unittest.TestCase): + """PackageApi unit test stubs""" + + def setUp(self): + self.api = gitea.api.package_api.PackageApi() # noqa: E501 + + def tearDown(self): + pass + + def test_delete_package(self): + """Test case for delete_package + + Delete a package # noqa: E501 + """ + pass + + def test_get_package(self): + """Test case for get_package + + Gets a package # noqa: E501 + """ + pass + + def test_list_package_files(self): + """Test case for list_package_files + + Gets all files of a package # noqa: E501 + """ + pass + + def test_list_packages(self): + """Test case for list_packages + + Gets all packages of an owner # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_package_file.py b/test/test_package_file.py new file mode 100644 index 0000000..95826c2 --- /dev/null +++ b/test/test_package_file.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.package_file import PackageFile # noqa: E501 +from gitea.rest import ApiException + + +class TestPackageFile(unittest.TestCase): + """PackageFile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPackageFile(self): + """Test PackageFile""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.package_file.PackageFile() # 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..bff7cd8 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.payload_commit import PayloadCommit # noqa: E501 +from gitea.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 = gitea.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..f6f35c9 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.payload_commit_verification import PayloadCommitVerification # noqa: E501 +from gitea.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 = gitea.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..a6605e6 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.payload_user import PayloadUser # noqa: E501 +from gitea.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 = gitea.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..240e7a0 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.permission import Permission # noqa: E501 +from gitea.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 = gitea.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..b28bbeb --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.pr_branch_info import PRBranchInfo # noqa: E501 +from gitea.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 = gitea.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..e408cf0 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.public_key import PublicKey # noqa: E501 +from gitea.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 = gitea.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..dfc9be5 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.pull_request import PullRequest # noqa: E501 +from gitea.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 = gitea.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..ae47c79 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.pull_request_meta import PullRequestMeta # noqa: E501 +from gitea.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 = gitea.models.pull_request_meta.PullRequestMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review.py b/test/test_pull_review.py new file mode 100644 index 0000000..3c0a51b --- /dev/null +++ b/test/test_pull_review.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.pull_review import PullReview # noqa: E501 +from gitea.rest import ApiException + + +class TestPullReview(unittest.TestCase): + """PullReview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReview(self): + """Test PullReview""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.pull_review.PullReview() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review_comment.py b/test/test_pull_review_comment.py new file mode 100644 index 0000000..49b358e --- /dev/null +++ b/test/test_pull_review_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.pull_review_comment import PullReviewComment # noqa: E501 +from gitea.rest import ApiException + + +class TestPullReviewComment(unittest.TestCase): + """PullReviewComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReviewComment(self): + """Test PullReviewComment""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.pull_review_comment.PullReviewComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review_request_options.py b/test/test_pull_review_request_options.py new file mode 100644 index 0000000..16193be --- /dev/null +++ b/test/test_pull_review_request_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.pull_review_request_options import PullReviewRequestOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestPullReviewRequestOptions(unittest.TestCase): + """PullReviewRequestOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReviewRequestOptions(self): + """Test PullReviewRequestOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.pull_review_request_options.PullReviewRequestOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_push_mirror.py b/test/test_push_mirror.py new file mode 100644 index 0000000..195e58d --- /dev/null +++ b/test/test_push_mirror.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.push_mirror import PushMirror # noqa: E501 +from gitea.rest import ApiException + + +class TestPushMirror(unittest.TestCase): + """PushMirror unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPushMirror(self): + """Test PushMirror""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.push_mirror.PushMirror() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reaction.py b/test/test_reaction.py new file mode 100644 index 0000000..6844676 --- /dev/null +++ b/test/test_reaction.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.reaction import Reaction # noqa: E501 +from gitea.rest import ApiException + + +class TestReaction(unittest.TestCase): + """Reaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReaction(self): + """Test Reaction""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.reaction.Reaction() # 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..eeef5e0 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.reference import Reference # noqa: E501 +from gitea.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 = gitea.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..6944dcd --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.release import Release # noqa: E501 +from gitea.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 = gitea.models.release.Release() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rename_user_option.py b/test/test_rename_user_option.py new file mode 100644 index 0000000..cc2320f --- /dev/null +++ b/test/test_rename_user_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.rename_user_option import RenameUserOption # noqa: E501 +from gitea.rest import ApiException + + +class TestRenameUserOption(unittest.TestCase): + """RenameUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRenameUserOption(self): + """Test RenameUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.rename_user_option.RenameUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_collaborator_permission.py b/test/test_repo_collaborator_permission.py new file mode 100644 index 0000000..7c0ece4 --- /dev/null +++ b/test/test_repo_collaborator_permission.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.repo_collaborator_permission import RepoCollaboratorPermission # noqa: E501 +from gitea.rest import ApiException + + +class TestRepoCollaboratorPermission(unittest.TestCase): + """RepoCollaboratorPermission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoCollaboratorPermission(self): + """Test RepoCollaboratorPermission""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.repo_collaborator_permission.RepoCollaboratorPermission() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_commit.py b/test/test_repo_commit.py new file mode 100644 index 0000000..37e1081 --- /dev/null +++ b/test/test_repo_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.repo_commit import RepoCommit # noqa: E501 +from gitea.rest import ApiException + + +class TestRepoCommit(unittest.TestCase): + """RepoCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoCommit(self): + """Test RepoCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.repo_commit.RepoCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_topic_options.py b/test/test_repo_topic_options.py new file mode 100644 index 0000000..1ffec27 --- /dev/null +++ b/test/test_repo_topic_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.repo_topic_options import RepoTopicOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestRepoTopicOptions(unittest.TestCase): + """RepoTopicOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoTopicOptions(self): + """Test RepoTopicOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.repo_topic_options.RepoTopicOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_transfer.py b/test/test_repo_transfer.py new file mode 100644 index 0000000..f0d133f --- /dev/null +++ b/test/test_repo_transfer.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.repo_transfer import RepoTransfer # noqa: E501 +from gitea.rest import ApiException + + +class TestRepoTransfer(unittest.TestCase): + """RepoTransfer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoTransfer(self): + """Test RepoTransfer""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.repo_transfer.RepoTransfer() # 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..ac7c264 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.repository import Repository # noqa: E501 +from gitea.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 = gitea.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..16c9e15 --- /dev/null +++ b/test/test_repository_api.py @@ -0,0 +1,1196 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.repository_api import RepositoryApi # noqa: E501 +from gitea.rest import ApiException + + +class TestRepositoryApi(unittest.TestCase): + """RepositoryApi unit test stubs""" + + def setUp(self): + self.api = gitea.api.repository_api.RepositoryApi() # noqa: E501 + + def tearDown(self): + pass + + def test_accept_repo_transfer(self): + """Test case for accept_repo_transfer + + Accept a repo transfer # noqa: E501 + """ + 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_create_repo_variable(self): + """Test case for create_repo_variable + + Create a repo-level variable # noqa: E501 + """ + pass + + def test_delete_repo_secret(self): + """Test case for delete_repo_secret + + Delete a secret in a repository # noqa: E501 + """ + pass + + def test_delete_repo_variable(self): + """Test case for delete_repo_variable + + Delete a repo-level variable # noqa: E501 + """ + pass + + def test_generate_repo(self): + """Test case for generate_repo + + Create a repository using a template # noqa: E501 + """ + pass + + def test_get_annotated_tag(self): + """Test case for get_annotated_tag + + Gets the tag object of an annotated tag (not lightweight tags) # noqa: E501 + """ + pass + + def test_get_blob(self): + """Test case for get_blob + + Gets the blob of a repository. # noqa: E501 + """ + pass + + def test_get_repo_variable(self): + """Test case for get_repo_variable + + Get a repo-level variable # noqa: E501 + """ + pass + + def test_get_repo_variables_list(self): + """Test case for get_repo_variables_list + + Get repo-level variables list # 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_action_tasks(self): + """Test case for list_action_tasks + + List a repository's action tasks # noqa: E501 + """ + pass + + def test_list_forks(self): + """Test case for list_forks + + List a repository's forks # noqa: E501 + """ + pass + + def test_reject_repo_transfer(self): + """Test case for reject_repo_transfer + + Reject a repo transfer # noqa: E501 + """ + pass + + def test_repo_add_collaborator(self): + """Test case for repo_add_collaborator + + Add or Update a collaborator to a repository # noqa: E501 + """ + pass + + def test_repo_add_push_mirror(self): + """Test case for repo_add_push_mirror + + add a push mirror to the repository # noqa: E501 + """ + pass + + def test_repo_add_team(self): + """Test case for repo_add_team + + Add a team to a repository # noqa: E501 + """ + pass + + def test_repo_add_topic(self): + """Test case for repo_add_topic + + Add a topic to a repository # noqa: E501 + """ + pass + + def test_repo_apply_diff_patch(self): + """Test case for repo_apply_diff_patch + + Apply diff patch to repository # noqa: E501 + """ + pass + + def test_repo_cancel_scheduled_auto_merge(self): + """Test case for repo_cancel_scheduled_auto_merge + + Cancel the scheduled auto merge for the given pull request # noqa: E501 + """ + pass + + def test_repo_change_files(self): + """Test case for repo_change_files + + Modify multiple files in 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_check_team(self): + """Test case for repo_check_team + + Check if a team is assigned to a repository # noqa: E501 + """ + pass + + def test_repo_compare_diff(self): + """Test case for repo_compare_diff + + Get commit comparison information # noqa: E501 + """ + pass + + def test_repo_create_branch(self): + """Test case for repo_create_branch + + Create a branch # noqa: E501 + """ + pass + + def test_repo_create_branch_protection(self): + """Test case for repo_create_branch_protection + + Create a branch protections for a repository # noqa: E501 + """ + pass + + def test_repo_create_file(self): + """Test case for repo_create_file + + Create a file in 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_pull_review(self): + """Test case for repo_create_pull_review + + Create a review to an pull request # noqa: E501 + """ + pass + + def test_repo_create_pull_review_requests(self): + """Test case for repo_create_pull_review_requests + + create review requests for 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_create_tag(self): + """Test case for repo_create_tag + + Create a new git tag in a repository # noqa: E501 + """ + pass + + def test_repo_create_tag_protection(self): + """Test case for repo_create_tag_protection + + Create a tag protections for a repository # noqa: E501 + """ + pass + + def test_repo_create_wiki_page(self): + """Test case for repo_create_wiki_page + + Create a wiki page # noqa: E501 + """ + pass + + def test_repo_delete(self): + """Test case for repo_delete + + Delete a repository # noqa: E501 + """ + pass + + def test_repo_delete_avatar(self): + """Test case for repo_delete_avatar + + Delete avatar # noqa: E501 + """ + pass + + def test_repo_delete_branch(self): + """Test case for repo_delete_branch + + Delete a specific branch from a repository # noqa: E501 + """ + pass + + def test_repo_delete_branch_protection(self): + """Test case for repo_delete_branch_protection + + Delete a specific branch protection for the 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_file(self): + """Test case for repo_delete_file + + Delete a file in a repository # noqa: E501 + """ + pass + + def test_repo_delete_git_hook(self): + """Test case for repo_delete_git_hook + + Delete a Git hook in 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_pull_review(self): + """Test case for repo_delete_pull_review + + Delete a specific review from a pull request # noqa: E501 + """ + pass + + def test_repo_delete_pull_review_requests(self): + """Test case for repo_delete_pull_review_requests + + cancel review requests for a pull request # noqa: E501 + """ + pass + + def test_repo_delete_push_mirror(self): + """Test case for repo_delete_push_mirror + + deletes a push mirror from a repository by remoteName # 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_delete_release_by_tag(self): + """Test case for repo_delete_release_by_tag + + Delete a release by tag name # noqa: E501 + """ + pass + + def test_repo_delete_tag(self): + """Test case for repo_delete_tag + + Delete a repository's tag by name # noqa: E501 + """ + pass + + def test_repo_delete_tag_protection(self): + """Test case for repo_delete_tag_protection + + Delete a specific tag protection for the repository # noqa: E501 + """ + pass + + def test_repo_delete_team(self): + """Test case for repo_delete_team + + Delete a team from a repository # noqa: E501 + """ + pass + + def test_repo_delete_topic(self): + """Test case for repo_delete_topic + + Delete a topic from a repository # noqa: E501 + """ + pass + + def test_repo_delete_wiki_page(self): + """Test case for repo_delete_wiki_page + + Delete a wiki page # noqa: E501 + """ + pass + + def test_repo_dismiss_pull_review(self): + """Test case for repo_dismiss_pull_review + + Dismiss a review for a pull request # noqa: E501 + """ + pass + + def test_repo_download_commit_diff_or_patch(self): + """Test case for repo_download_commit_diff_or_patch + + Get a commit's diff or patch # noqa: E501 + """ + pass + + def test_repo_download_pull_diff_or_patch(self): + """Test case for repo_download_pull_diff_or_patch + + Get a pull request diff or patch # noqa: E501 + """ + pass + + def test_repo_edit(self): + """Test case for repo_edit + + Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 + """ + pass + + def test_repo_edit_branch_protection(self): + """Test case for repo_edit_branch_protection + + Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 + """ + pass + + def test_repo_edit_git_hook(self): + """Test case for repo_edit_git_hook + + Edit a Git hook in a repository # 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. If using deadline only the date will be taken into account, and time of day ignored. # 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_edit_tag_protection(self): + """Test case for repo_edit_tag_protection + + Edit a tag protections for a repository. Only fields that are set will be changed # noqa: E501 + """ + pass + + def test_repo_edit_wiki_page(self): + """Test case for repo_edit_wiki_page + + Edit a wiki page # noqa: E501 + """ + pass + + def test_repo_get(self): + """Test case for repo_get + + Get a repository # noqa: E501 + """ + pass + + def test_repo_get_all_commits(self): + """Test case for repo_get_all_commits + + Get a list of all commits from 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_assignees(self): + """Test case for repo_get_assignees + + Return all users that have write access and can be assigned to issues # noqa: E501 + """ + pass + + def test_repo_get_branch(self): + """Test case for repo_get_branch + + Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 + """ + pass + + def test_repo_get_branch_protection(self): + """Test case for repo_get_branch_protection + + Get a specific branch protection for the 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_commit_pull_request(self): + """Test case for repo_get_commit_pull_request + + Get the merged pull request of the commit # noqa: E501 + """ + pass + + def test_repo_get_contents(self): + """Test case for repo_get_contents + + Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # noqa: E501 + """ + pass + + def test_repo_get_contents_list(self): + """Test case for repo_get_contents_list + + Gets the metadata of all the entries of the root dir # 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_git_hook(self): + """Test case for repo_get_git_hook + + Get a Git hook # 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_issue_config(self): + """Test case for repo_get_issue_config + + Returns the issue config for a repo # noqa: E501 + """ + pass + + def test_repo_get_issue_templates(self): + """Test case for repo_get_issue_templates + + Get available issue templates for a repository # 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_languages(self): + """Test case for repo_get_languages + + Get languages and number of bytes of code written # noqa: E501 + """ + pass + + def test_repo_get_latest_release(self): + """Test case for repo_get_latest_release + + Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # noqa: E501 + """ + pass + + def test_repo_get_licenses(self): + """Test case for repo_get_licenses + + Get repo licenses # noqa: E501 + """ + pass + + def test_repo_get_note(self): + """Test case for repo_get_note + + Get a note corresponding to a single commit from a repository # 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_pull_request_by_base_head(self): + """Test case for repo_get_pull_request_by_base_head + + Get a pull request by base and head # noqa: E501 + """ + pass + + def test_repo_get_pull_request_commits(self): + """Test case for repo_get_pull_request_commits + + Get commits for a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_request_files(self): + """Test case for repo_get_pull_request_files + + Get changed files for a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_review(self): + """Test case for repo_get_pull_review + + Get a specific review for a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_review_comments(self): + """Test case for repo_get_pull_review_comments + + Get a specific review for a pull request # noqa: E501 + """ + pass + + def test_repo_get_push_mirror_by_remote_name(self): + """Test case for repo_get_push_mirror_by_remote_name + + Get push mirror of the repository by remoteName # 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_raw_file_or_lfs(self): + """Test case for repo_get_raw_file_or_lfs + + Get a file or it's LFS object 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_get_release_by_tag(self): + """Test case for repo_get_release_by_tag + + Get a release by tag name # noqa: E501 + """ + pass + + def test_repo_get_repo_permissions(self): + """Test case for repo_get_repo_permissions + + Get repository permissions for a user # noqa: E501 + """ + pass + + def test_repo_get_reviewers(self): + """Test case for repo_get_reviewers + + Return all users that can be requested to review in this repo # noqa: E501 + """ + pass + + def test_repo_get_runner_registration_token(self): + """Test case for repo_get_runner_registration_token + + Get a repository's actions runner registration token # noqa: E501 + """ + pass + + def test_repo_get_single_commit(self): + """Test case for repo_get_single_commit + + Get a single commit from a repository # noqa: E501 + """ + pass + + def test_repo_get_tag(self): + """Test case for repo_get_tag + + Get the tag of a repository by tag name # noqa: E501 + """ + pass + + def test_repo_get_tag_protection(self): + """Test case for repo_get_tag_protection + + Get a specific tag protection for the repository # noqa: E501 + """ + pass + + def test_repo_get_wiki_page(self): + """Test case for repo_get_wiki_page + + Get a wiki page # noqa: E501 + """ + pass + + def test_repo_get_wiki_page_revisions(self): + """Test case for repo_get_wiki_page_revisions + + Get revisions of a wiki page # noqa: E501 + """ + pass + + def test_repo_get_wiki_pages(self): + """Test case for repo_get_wiki_pages + + Get all wiki pages # noqa: E501 + """ + pass + + def test_repo_list_actions_secrets(self): + """Test case for repo_list_actions_secrets + + List an repo's actions secrets # noqa: E501 + """ + pass + + def test_repo_list_activity_feeds(self): + """Test case for repo_list_activity_feeds + + List a repository's activity feeds # 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_branch_protection(self): + """Test case for repo_list_branch_protection + + List branch protections for a repository # 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_hooks(self): + """Test case for repo_list_git_hooks + + List the Git hooks in a repository # 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_pinned_issues(self): + """Test case for repo_list_pinned_issues + + List a repo's pinned issues # noqa: E501 + """ + pass + + def test_repo_list_pinned_pull_requests(self): + """Test case for repo_list_pinned_pull_requests + + List a repo's pinned pull requests # 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_pull_reviews(self): + """Test case for repo_list_pull_reviews + + List all reviews for a pull request # noqa: E501 + """ + pass + + def test_repo_list_push_mirrors(self): + """Test case for repo_list_push_mirrors + + Get all push mirrors of the repository # 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_statuses_by_ref(self): + """Test case for repo_list_statuses_by_ref + + Get a commit's statuses, by branch/tag/commit reference # 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_list_tag_protection(self): + """Test case for repo_list_tag_protection + + List tag protections for a repository # noqa: E501 + """ + pass + + def test_repo_list_tags(self): + """Test case for repo_list_tags + + List a repository's tags # noqa: E501 + """ + pass + + def test_repo_list_teams(self): + """Test case for repo_list_teams + + List a repository's teams # noqa: E501 + """ + pass + + def test_repo_list_topics(self): + """Test case for repo_list_topics + + Get list of topics that a repository has # 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_merge_upstream(self): + """Test case for repo_merge_upstream + + Merge a branch from upstream # 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_new_pin_allowed(self): + """Test case for repo_new_pin_allowed + + Returns if new Issue Pins are allowed # 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_push_mirror_sync(self): + """Test case for repo_push_mirror_sync + + Sync all push mirrored repository # noqa: E501 + """ + pass + + def test_repo_search(self): + """Test case for repo_search + + Search for repositories # noqa: E501 + """ + pass + + def test_repo_signing_key(self): + """Test case for repo_signing_key + + Get signing-key.gpg for given repository # noqa: E501 + """ + pass + + def test_repo_submit_pull_review(self): + """Test case for repo_submit_pull_review + + Submit a pending review to an pull request # 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_repo_transfer(self): + """Test case for repo_transfer + + Transfer a repo ownership # noqa: E501 + """ + pass + + def test_repo_un_dismiss_pull_review(self): + """Test case for repo_un_dismiss_pull_review + + Cancel to dismiss a review for a pull request # noqa: E501 + """ + pass + + def test_repo_update_avatar(self): + """Test case for repo_update_avatar + + Update avatar # noqa: E501 + """ + pass + + def test_repo_update_branch(self): + """Test case for repo_update_branch + + Update a branch # noqa: E501 + """ + pass + + def test_repo_update_branch_protection_priories(self): + """Test case for repo_update_branch_protection_priories + + Update the priorities of branch protections for a repository. # noqa: E501 + """ + pass + + def test_repo_update_file(self): + """Test case for repo_update_file + + Update a file in a repository # noqa: E501 + """ + pass + + def test_repo_update_pull_request(self): + """Test case for repo_update_pull_request + + Merge PR's baseBranch into headBranch # noqa: E501 + """ + pass + + def test_repo_update_topics(self): + """Test case for repo_update_topics + + Replace list of topics for a repository # noqa: E501 + """ + pass + + def test_repo_validate_issue_config(self): + """Test case for repo_validate_issue_config + + Returns the validation information for a issue config # noqa: E501 + """ + pass + + def test_topic_search(self): + """Test case for topic_search + + search topics via keyword # noqa: E501 + """ + pass + + def test_update_repo_secret(self): + """Test case for update_repo_secret + + Create or Update a secret value in a repository # noqa: E501 + """ + pass + + def test_update_repo_variable(self): + """Test case for update_repo_variable + + Update a repo-level variable # 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 + + 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_repository_meta.py b/test/test_repository_meta.py new file mode 100644 index 0000000..ec70ad0 --- /dev/null +++ b/test/test_repository_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.repository_meta import RepositoryMeta # noqa: E501 +from gitea.rest import ApiException + + +class TestRepositoryMeta(unittest.TestCase): + """RepositoryMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepositoryMeta(self): + """Test RepositoryMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.repository_meta.RepositoryMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_review_state_type.py b/test/test_review_state_type.py new file mode 100644 index 0000000..651b184 --- /dev/null +++ b/test/test_review_state_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.review_state_type import ReviewStateType # noqa: E501 +from gitea.rest import ApiException + + +class TestReviewStateType(unittest.TestCase): + """ReviewStateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReviewStateType(self): + """Test ReviewStateType""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.review_state_type.ReviewStateType() # 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..f780671 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.search_results import SearchResults # noqa: E501 +from gitea.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 = gitea.models.search_results.SearchResults() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_secret.py b/test/test_secret.py new file mode 100644 index 0000000..a1bf347 --- /dev/null +++ b/test/test_secret.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.secret import Secret # noqa: E501 +from gitea.rest import ApiException + + +class TestSecret(unittest.TestCase): + """Secret unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSecret(self): + """Test Secret""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.secret.Secret() # 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..768f179 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.server_version import ServerVersion # noqa: E501 +from gitea.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 = gitea.models.server_version.ServerVersion() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_settings_api.py b/test/test_settings_api.py new file mode 100644 index 0000000..95bcf23 --- /dev/null +++ b/test/test_settings_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.settings_api import SettingsApi # noqa: E501 +from gitea.rest import ApiException + + +class TestSettingsApi(unittest.TestCase): + """SettingsApi unit test stubs""" + + def setUp(self): + self.api = gitea.api.settings_api.SettingsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_general_api_settings(self): + """Test case for get_general_api_settings + + Get instance's global settings for api # noqa: E501 + """ + pass + + def test_get_general_attachment_settings(self): + """Test case for get_general_attachment_settings + + Get instance's global settings for Attachment # noqa: E501 + """ + pass + + def test_get_general_repository_settings(self): + """Test case for get_general_repository_settings + + Get instance's global settings for repositories # noqa: E501 + """ + pass + + def test_get_general_ui_settings(self): + """Test case for get_general_ui_settings + + Get instance's global settings for ui # 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..aefa132 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.state_type import StateType # noqa: E501 +from gitea.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 = gitea.models.state_type.StateType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stop_watch.py b/test/test_stop_watch.py new file mode 100644 index 0000000..02e5a41 --- /dev/null +++ b/test/test_stop_watch.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.stop_watch import StopWatch # noqa: E501 +from gitea.rest import ApiException + + +class TestStopWatch(unittest.TestCase): + """StopWatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStopWatch(self): + """Test StopWatch""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.stop_watch.StopWatch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_submit_pull_review_options.py b/test/test_submit_pull_review_options.py new file mode 100644 index 0000000..f2caa8a --- /dev/null +++ b/test/test_submit_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.submit_pull_review_options import SubmitPullReviewOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestSubmitPullReviewOptions(unittest.TestCase): + """SubmitPullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSubmitPullReviewOptions(self): + """Test SubmitPullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.submit_pull_review_options.SubmitPullReviewOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tag.py b/test/test_tag.py new file mode 100644 index 0000000..52fe82f --- /dev/null +++ b/test/test_tag.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.tag import Tag # noqa: E501 +from gitea.rest import ApiException + + +class TestTag(unittest.TestCase): + """Tag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTag(self): + """Test Tag""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.tag.Tag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tag_protection.py b/test/test_tag_protection.py new file mode 100644 index 0000000..e902aeb --- /dev/null +++ b/test/test_tag_protection.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.tag_protection import TagProtection # noqa: E501 +from gitea.rest import ApiException + + +class TestTagProtection(unittest.TestCase): + """TagProtection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTagProtection(self): + """Test TagProtection""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.tag_protection.TagProtection() # 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..c87b923 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.team import Team # noqa: E501 +from gitea.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 = gitea.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..b3a7457 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.time_stamp import TimeStamp # noqa: E501 +from gitea.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 = gitea.models.time_stamp.TimeStamp() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_timeline_comment.py b/test/test_timeline_comment.py new file mode 100644 index 0000000..0256a4f --- /dev/null +++ b/test/test_timeline_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.timeline_comment import TimelineComment # noqa: E501 +from gitea.rest import ApiException + + +class TestTimelineComment(unittest.TestCase): + """TimelineComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTimelineComment(self): + """Test TimelineComment""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.timeline_comment.TimelineComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_topic_name.py b/test/test_topic_name.py new file mode 100644 index 0000000..8f35cc3 --- /dev/null +++ b/test/test_topic_name.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.topic_name import TopicName # noqa: E501 +from gitea.rest import ApiException + + +class TestTopicName(unittest.TestCase): + """TopicName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTopicName(self): + """Test TopicName""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.topic_name.TopicName() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_topic_response.py b/test/test_topic_response.py new file mode 100644 index 0000000..f828346 --- /dev/null +++ b/test/test_topic_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.topic_response import TopicResponse # noqa: E501 +from gitea.rest import ApiException + + +class TestTopicResponse(unittest.TestCase): + """TopicResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTopicResponse(self): + """Test TopicResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.topic_response.TopicResponse() # 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..9a109a8 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.tracked_time import TrackedTime # noqa: E501 +from gitea.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 = gitea.models.tracked_time.TrackedTime() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_transfer_repo_option.py b/test/test_transfer_repo_option.py new file mode 100644 index 0000000..92d09db --- /dev/null +++ b/test/test_transfer_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.transfer_repo_option import TransferRepoOption # noqa: E501 +from gitea.rest import ApiException + + +class TestTransferRepoOption(unittest.TestCase): + """TransferRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransferRepoOption(self): + """Test TransferRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.transfer_repo_option.TransferRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_branch_protection_priories.py b/test/test_update_branch_protection_priories.py new file mode 100644 index 0000000..b516ed9 --- /dev/null +++ b/test/test_update_branch_protection_priories.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.update_branch_protection_priories import UpdateBranchProtectionPriories # noqa: E501 +from gitea.rest import ApiException + + +class TestUpdateBranchProtectionPriories(unittest.TestCase): + """UpdateBranchProtectionPriories unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateBranchProtectionPriories(self): + """Test UpdateBranchProtectionPriories""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.update_branch_protection_priories.UpdateBranchProtectionPriories() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_branch_repo_option.py b/test/test_update_branch_repo_option.py new file mode 100644 index 0000000..bd1f0b4 --- /dev/null +++ b/test/test_update_branch_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.update_branch_repo_option import UpdateBranchRepoOption # noqa: E501 +from gitea.rest import ApiException + + +class TestUpdateBranchRepoOption(unittest.TestCase): + """UpdateBranchRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateBranchRepoOption(self): + """Test UpdateBranchRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.update_branch_repo_option.UpdateBranchRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_file_options.py b/test/test_update_file_options.py new file mode 100644 index 0000000..2411e66 --- /dev/null +++ b/test/test_update_file_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.update_file_options import UpdateFileOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestUpdateFileOptions(unittest.TestCase): + """UpdateFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateFileOptions(self): + """Test UpdateFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.update_file_options.UpdateFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_repo_avatar_option.py b/test/test_update_repo_avatar_option.py new file mode 100644 index 0000000..c093b5b --- /dev/null +++ b/test/test_update_repo_avatar_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.update_repo_avatar_option import UpdateRepoAvatarOption # noqa: E501 +from gitea.rest import ApiException + + +class TestUpdateRepoAvatarOption(unittest.TestCase): + """UpdateRepoAvatarOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateRepoAvatarOption(self): + """Test UpdateRepoAvatarOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.update_repo_avatar_option.UpdateRepoAvatarOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_user_avatar_option.py b/test/test_update_user_avatar_option.py new file mode 100644 index 0000000..b846ca0 --- /dev/null +++ b/test/test_update_user_avatar_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.update_user_avatar_option import UpdateUserAvatarOption # noqa: E501 +from gitea.rest import ApiException + + +class TestUpdateUserAvatarOption(unittest.TestCase): + """UpdateUserAvatarOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateUserAvatarOption(self): + """Test UpdateUserAvatarOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.update_user_avatar_option.UpdateUserAvatarOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_variable_option.py b/test/test_update_variable_option.py new file mode 100644 index 0000000..4ce3455 --- /dev/null +++ b/test/test_update_variable_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.update_variable_option import UpdateVariableOption # noqa: E501 +from gitea.rest import ApiException + + +class TestUpdateVariableOption(unittest.TestCase): + """UpdateVariableOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateVariableOption(self): + """Test UpdateVariableOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.update_variable_option.UpdateVariableOption() # 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..39484f3 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.user import User # noqa: E501 +from gitea.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 = gitea.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..dbea5b4 --- /dev/null +++ b/test/test_user_api.py @@ -0,0 +1,524 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.api.user_api import UserApi # noqa: E501 +from gitea.rest import ApiException + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self): + self.api = gitea.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_create_user_variable(self): + """Test case for create_user_variable + + Create a user-level variable # noqa: E501 + """ + pass + + def test_delete_user_secret(self): + """Test case for delete_user_secret + + Delete a secret in a user scope # noqa: E501 + """ + pass + + def test_delete_user_variable(self): + """Test case for delete_user_variable + + Delete a user-level variable which is created by current doer # noqa: E501 + """ + pass + + def test_get_user_settings(self): + """Test case for get_user_settings + + Get user settings # noqa: E501 + """ + pass + + def test_get_user_variable(self): + """Test case for get_user_variable + + Get a user-level variable which is created by current doer # noqa: E501 + """ + pass + + def test_get_user_variables_list(self): + """Test case for get_user_variables_list + + Get the user-level list of variables which is created by current doer # noqa: E501 + """ + pass + + def test_get_verification_token(self): + """Test case for get_verification_token + + Get a Token to verify # noqa: E501 + """ + pass + + def test_update_user_secret(self): + """Test case for update_user_secret + + Create or Update a secret value in a user scope # noqa: E501 + """ + pass + + def test_update_user_settings(self): + """Test case for update_user_settings + + Update user settings # noqa: E501 + """ + pass + + def test_update_user_variable(self): + """Test case for update_user_variable + + Update a user-level variable which is created by current doer # noqa: E501 + """ + pass + + def test_user_add_email(self): + """Test case for user_add_email + + Add email addresses # noqa: E501 + """ + pass + + def test_user_block_user(self): + """Test case for user_block_user + + Block a user # 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_check_user_block(self): + """Test case for user_check_user_block + + Check if a user is blocked by the authenticated user # noqa: E501 + """ + pass + + def test_user_create_hook(self): + """Test case for user_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_user_create_o_auth2_application(self): + """Test case for user_create_o_auth2_application + + creates a new OAuth2 application # 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 # 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_avatar(self): + """Test case for user_delete_avatar + + Delete Avatar # noqa: E501 + """ + pass + + def test_user_delete_email(self): + """Test case for user_delete_email + + Delete email addresses # noqa: E501 + """ + pass + + def test_user_delete_hook(self): + """Test case for user_delete_hook + + Delete a hook # noqa: E501 + """ + pass + + def test_user_delete_o_auth2_application(self): + """Test case for user_delete_o_auth2_application + + delete an OAuth2 Application # noqa: E501 + """ + pass + + def test_user_edit_hook(self): + """Test case for user_edit_hook + + Update a hook # 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_hook(self): + """Test case for user_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_user_get_o_auth2_application(self): + """Test case for user_get_o_auth2_application + + get an OAuth2 Application # noqa: E501 + """ + pass + + def test_user_get_oauth2_application(self): + """Test case for user_get_oauth2_application + + List the authenticated user's oauth2 applications # noqa: E501 + """ + pass + + def test_user_get_runner_registration_token(self): + """Test case for user_get_runner_registration_token + + Get an user's actions runner registration token # noqa: E501 + """ + pass + + def test_user_get_stop_watches(self): + """Test case for user_get_stop_watches + + Get list of all existing stopwatches # 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_activity_feeds(self): + """Test case for user_list_activity_feeds + + List a user's activity feeds # noqa: E501 + """ + pass + + def test_user_list_blocks(self): + """Test case for user_list_blocks + + List users blocked by the authenticated user # 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_hooks(self): + """Test case for user_list_hooks + + List the authenticated user's webhooks # 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_list_teams(self): + """Test case for user_list_teams + + List all the teams a user belongs to # noqa: E501 + """ + pass + + def test_user_search(self): + """Test case for user_search + + Search for users # noqa: E501 + """ + pass + + def test_user_unblock_user(self): + """Test case for user_unblock_user + + Unblock a user # noqa: E501 + """ + pass + + def test_user_update_avatar(self): + """Test case for user_update_avatar + + Update Avatar # noqa: E501 + """ + pass + + def test_user_update_o_auth2_application(self): + """Test case for user_update_o_auth2_application + + update an OAuth2 Application, this includes regenerating the client secret # noqa: E501 + """ + pass + + def test_user_verify_gpg_key(self): + """Test case for user_verify_gpg_key + + Verify a GPG key # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_badge_option.py b/test/test_user_badge_option.py new file mode 100644 index 0000000..2147c7c --- /dev/null +++ b/test/test_user_badge_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.user_badge_option import UserBadgeOption # noqa: E501 +from gitea.rest import ApiException + + +class TestUserBadgeOption(unittest.TestCase): + """UserBadgeOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserBadgeOption(self): + """Test UserBadgeOption""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.user_badge_option.UserBadgeOption() # 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..6fce993 --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.user_heatmap_data import UserHeatmapData # noqa: E501 +from gitea.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 = gitea.models.user_heatmap_data.UserHeatmapData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_settings.py b/test/test_user_settings.py new file mode 100644 index 0000000..c109190 --- /dev/null +++ b/test/test_user_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.user_settings import UserSettings # noqa: E501 +from gitea.rest import ApiException + + +class TestUserSettings(unittest.TestCase): + """UserSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserSettings(self): + """Test UserSettings""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.user_settings.UserSettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_settings_options.py b/test/test_user_settings_options.py new file mode 100644 index 0000000..d312716 --- /dev/null +++ b/test/test_user_settings_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.user_settings_options import UserSettingsOptions # noqa: E501 +from gitea.rest import ApiException + + +class TestUserSettingsOptions(unittest.TestCase): + """UserSettingsOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserSettingsOptions(self): + """Test UserSettingsOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.user_settings_options.UserSettingsOptions() # 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..2f9850a --- /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.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.watch_info import WatchInfo # noqa: E501 +from gitea.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 = gitea.models.watch_info.WatchInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_commit.py b/test/test_wiki_commit.py new file mode 100644 index 0000000..bca19c3 --- /dev/null +++ b/test/test_wiki_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.wiki_commit import WikiCommit # noqa: E501 +from gitea.rest import ApiException + + +class TestWikiCommit(unittest.TestCase): + """WikiCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiCommit(self): + """Test WikiCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.wiki_commit.WikiCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_commit_list.py b/test/test_wiki_commit_list.py new file mode 100644 index 0000000..5efadc3 --- /dev/null +++ b/test/test_wiki_commit_list.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.wiki_commit_list import WikiCommitList # noqa: E501 +from gitea.rest import ApiException + + +class TestWikiCommitList(unittest.TestCase): + """WikiCommitList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiCommitList(self): + """Test WikiCommitList""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.wiki_commit_list.WikiCommitList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_page.py b/test/test_wiki_page.py new file mode 100644 index 0000000..6432c95 --- /dev/null +++ b/test/test_wiki_page.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.wiki_page import WikiPage # noqa: E501 +from gitea.rest import ApiException + + +class TestWikiPage(unittest.TestCase): + """WikiPage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiPage(self): + """Test WikiPage""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.wiki_page.WikiPage() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_page_meta_data.py b/test/test_wiki_page_meta_data.py new file mode 100644 index 0000000..d8190ea --- /dev/null +++ b/test/test_wiki_page_meta_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.23.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import gitea +from gitea.models.wiki_page_meta_data import WikiPageMetaData # noqa: E501 +from gitea.rest import ApiException + + +class TestWikiPageMetaData(unittest.TestCase): + """WikiPageMetaData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiPageMetaData(self): + """Test WikiPageMetaData""" + # FIXME: construct object with mandatory attributes with example values + # model = gitea.models.wiki_page_meta_data.WikiPageMetaData() # 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 \ + []