Browse Source

Merge branch 'version_upgrade' of vasek/gitea-swagger-client into master

master
Vašek Šraier 5 years ago
committed by Gitea
parent
commit
ed03b192ca
  1. 15
      README.md
  2. 146
      docs/AdminApi.md
  3. 16
      docs/Commit.md
  4. 11
      docs/CommitMeta.md
  5. 12
      docs/CommitUser.md
  6. 1
      docs/CreateUserOption.md
  7. 1
      docs/EditUserOption.md
  8. 2
      docs/GitTreeResponse.md
  9. 166
      docs/IssueApi.md
  10. 12
      docs/MergePullRequestOption.md
  11. 79
      docs/OrganizationApi.md
  12. 3
      docs/PayloadCommit.md
  13. 14
      docs/RepoCommit.md
  14. 184
      docs/RepositoryApi.md
  15. 13
      docs/Tag.md
  16. 11
      docs/TagCommit.md
  17. 1
      docs/Team.md
  18. 1
      docs/User.md
  19. 73
      docs/UserApi.md
  20. 7
      swagger_client/__init__.py
  21. 178
      swagger_client/api/admin_api.py
  22. 232
      swagger_client/api/issue_api.py
  23. 105
      swagger_client/api/organization_api.py
  24. 248
      swagger_client/api/repository_api.py
  25. 89
      swagger_client/api/user_api.py
  26. 7
      swagger_client/models/__init__.py
  27. 275
      swagger_client/models/commit.py
  28. 141
      swagger_client/models/commit_meta.py
  29. 167
      swagger_client/models/commit_user.py
  30. 28
      swagger_client/models/create_user_option.py
  31. 28
      swagger_client/models/edit_user_option.py
  32. 54
      swagger_client/models/git_tree_response.py
  33. 174
      swagger_client/models/merge_pull_request_option.py
  34. 80
      swagger_client/models/payload_commit.py
  35. 222
      swagger_client/models/repo_commit.py
  36. 195
      swagger_client/models/tag.py
  37. 141
      swagger_client/models/tag_commit.py
  38. 30
      swagger_client/models/team.py
  39. 30
      swagger_client/models/user.py
  40. 40
      test/test_commit.py
  41. 40
      test/test_commit_meta.py
  42. 40
      test/test_commit_user.py
  43. 40
      test/test_merge_pull_request_option.py
  44. 40
      test/test_repo_commit.py
  45. 40
      test/test_tag.py
  46. 40
      test/test_tag_commit.py

15
README.md

@ -108,6 +108,8 @@ Class | Method | HTTP request | Description
*AdminApi* | [**admin_delete_user**](docs/AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user
*AdminApi* | [**admin_delete_user_public_key**](docs/AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key
*AdminApi* | [**admin_edit_user**](docs/AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user
*AdminApi* | [**admin_get_all_orgs**](docs/AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations
*AdminApi* | [**admin_get_all_users**](docs/AdminApi.md#admin_get_all_users) | **GET** /admin/users | List all users
*IssueApi* | [**issue_add_label**](docs/IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue
*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{id}/times | Add a tracked time to a issue
*IssueApi* | [**issue_clear_labels**](docs/IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue
@ -136,6 +138,8 @@ Class | Method | HTTP request | Description
*IssueApi* | [**issue_list_labels**](docs/IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels
*IssueApi* | [**issue_remove_label**](docs/IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue
*IssueApi* | [**issue_replace_labels**](docs/IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels
*IssueApi* | [**issue_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_watch**](docs/IssueApi.md#issue_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch.
*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times
*MiscellaneousApi* | [**get_version**](docs/MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application
*MiscellaneousApi* | [**render_markdown**](docs/MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML
@ -164,6 +168,7 @@ Class | Method | HTTP request | Description
*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_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_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
@ -205,6 +210,7 @@ Class | Method | HTTP request | Description
*RepositoryApi* | [**repo_get_raw_file**](docs/RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository
*RepositoryApi* | [**repo_get_release**](docs/RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release
*RepositoryApi* | [**repo_get_release_attachment**](docs/RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment
*RepositoryApi* | [**repo_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_list_all_git_refs**](docs/RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs
*RepositoryApi* | [**repo_list_branches**](docs/RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches
*RepositoryApi* | [**repo_list_collaborators**](docs/RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators
@ -217,6 +223,7 @@ Class | Method | HTTP request | Description
*RepositoryApi* | [**repo_list_stargazers**](docs/RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers
*RepositoryApi* | [**repo_list_statuses**](docs/RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses
*RepositoryApi* | [**repo_list_subscribers**](docs/RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers
*RepositoryApi* | [**repo_list_tags**](docs/RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags
*RepositoryApi* | [**repo_merge_pull_request**](docs/RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request
*RepositoryApi* | [**repo_migrate**](docs/RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository
*RepositoryApi* | [**repo_mirror_sync**](docs/RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository
@ -266,6 +273,7 @@ Class | Method | HTTP request | Description
*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_tracked_times**](docs/UserApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo
@ -278,6 +286,9 @@ Class | Method | HTTP request | Description
- [Attachment](docs/Attachment.md)
- [Branch](docs/Branch.md)
- [Comment](docs/Comment.md)
- [Commit](docs/Commit.md)
- [CommitMeta](docs/CommitMeta.md)
- [CommitUser](docs/CommitUser.md)
- [CreateEmailOption](docs/CreateEmailOption.md)
- [CreateForkOption](docs/CreateForkOption.md)
- [CreateGPGKeyOption](docs/CreateGPGKeyOption.md)
@ -320,6 +331,7 @@ Class | Method | HTTP request | Description
- [IssueLabelsOption](docs/IssueLabelsOption.md)
- [Label](docs/Label.md)
- [MarkdownOption](docs/MarkdownOption.md)
- [MergePullRequestOption](docs/MergePullRequestOption.md)
- [MigrateRepoForm](docs/MigrateRepoForm.md)
- [Milestone](docs/Milestone.md)
- [Organization](docs/Organization.md)
@ -333,12 +345,15 @@ Class | Method | HTTP request | Description
- [PullRequestMeta](docs/PullRequestMeta.md)
- [Reference](docs/Reference.md)
- [Release](docs/Release.md)
- [RepoCommit](docs/RepoCommit.md)
- [Repository](docs/Repository.md)
- [SearchResults](docs/SearchResults.md)
- [ServerVersion](docs/ServerVersion.md)
- [StateType](docs/StateType.md)
- [Status](docs/Status.md)
- [StatusState](docs/StatusState.md)
- [Tag](docs/Tag.md)
- [TagCommit](docs/TagCommit.md)
- [Team](docs/Team.md)
- [TimeStamp](docs/TimeStamp.md)
- [TrackedTime](docs/TrackedTime.md)

146
docs/AdminApi.md

@ -11,6 +11,8 @@ Method | HTTP request | Description
[**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user
[**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key
[**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user
[**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations
[**admin_get_all_users**](AdminApi.md#admin_get_all_users) | **GET** /admin/users | List all users
# **admin_create_org**
@ -553,3 +555,147 @@ Name | Type | Description | Notes
[[Back to top]](#) [[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()
List all organizations
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration))
try:
# List all organizations
api_response = api_instance.admin_get_all_orgs()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->admin_get_all_orgs: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**list[Organization]**](Organization.md)
### Authorization
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json, text/plain
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **admin_get_all_users**
> list[User] admin_get_all_users()
List all users
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AdminApi(swagger_client.ApiClient(configuration))
try:
# List all users
api_response = api_instance.admin_get_all_users()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->admin_get_all_users: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**list[User]**](User.md)
### Authorization
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json, text/plain
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

16
docs/Commit.md

@ -0,0 +1,16 @@
# Commit
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**author** | [**User**](User.md) | | [optional]
**commit** | [**RepoCommit**](RepoCommit.md) | | [optional]
**committer** | [**User**](User.md) | | [optional]
**html_url** | **str** | | [optional]
**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [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)

11
docs/CommitMeta.md

@ -0,0 +1,11 @@
# CommitMeta
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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)

12
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)

1
docs/CreateUserOption.md

@ -6,6 +6,7 @@ Name | Type | Description | Notes
**email** | **str** | |
**full_name** | **str** | | [optional]
**login_name** | **str** | | [optional]
**must_change_password** | **bool** | | [optional]
**password** | **str** | |
**send_notify** | **bool** | | [optional]
**source_id** | **int** | | [optional]

1
docs/EditUserOption.md

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**location** | **str** | | [optional]
**login_name** | **str** | | [optional]
**max_repo_creation** | **int** | | [optional]
**must_change_password** | **bool** | | [optional]
**password** | **str** | | [optional]
**prohibit_login** | **bool** | | [optional]
**source_id** | **int** | | [optional]

2
docs/GitTreeResponse.md

@ -3,7 +3,9 @@
## 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]

166
docs/IssueApi.md

@ -32,6 +32,8 @@ Method | HTTP request | Description
[**issue_list_labels**](IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels
[**issue_remove_label**](IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue
[**issue_replace_labels**](IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels
[**issue_start_stop_watch**](IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue.
[**issue_stop_watch**](IssueApi.md#issue_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch.
[**issue_tracked_times**](IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times
@ -1973,7 +1975,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **issue_list_issues**
> list[Issue] issue_list_issues(owner, repo, state=state, page=page, q=q)
> list[Issue] issue_list_issues(owner, repo, state=state, labels=labels, page=page, q=q)
List a repository's issues
@ -2020,12 +2022,13 @@ api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration))
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
state = 'state_example' # str | whether issue is open or closed (optional)
labels = 'labels_example' # str | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional)
page = 56 # int | page number of requested issues (optional)
q = 'q_example' # str | search string (optional)
try:
# List a repository's issues
api_response = api_instance.issue_list_issues(owner, repo, state=state, page=page, q=q)
api_response = api_instance.issue_list_issues(owner, repo, state=state, labels=labels, page=page, q=q)
pprint(api_response)
except ApiException as e:
print("Exception when calling IssueApi->issue_list_issues: %s\n" % e)
@ -2038,6 +2041,7 @@ 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]
**page** | **int**| page number of requested issues | [optional]
**q** | **str**| search string | [optional]
@ -2297,6 +2301,164 @@ Name | Type | Description | Notes
[[Back to top]](#) [[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 swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration))
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
index = 789 # int | index of the issue to create 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), [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_watch**
> issue_stop_watch(owner, repo, index)
Stop an issue's existing stopwatch.
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IssueApi(swagger_client.ApiClient(configuration))
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
index = 789 # int | index of the issue to stop the stopwatch on
try:
# Stop an issue's existing stopwatch.
api_instance.issue_stop_watch(owner, repo, index)
except ApiException as e:
print("Exception when calling IssueApi->issue_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), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **issue_tracked_times**
> list[TrackedTime] issue_tracked_times(owner, repo, id)

12
docs/MergePullRequestOption.md

@ -0,0 +1,12 @@
# MergePullRequestOption
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**do** | **str** | |
**merge_message_field** | **str** | | [optional]
**merge_title_field** | **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)

79
docs/OrganizationApi.md

@ -28,6 +28,7 @@ Method | HTTP request | Description
[**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_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_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
@ -1880,6 +1881,84 @@ Name | Type | Description | Notes
[[Back to top]](#) [[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 swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration))
id = 789 # int | id of the team
username = 'username_example' # str | username of the 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), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json, text/plain
- **Accept**: application/json
[[Back to top]](#) [[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)

3
docs/PayloadCommit.md

@ -3,10 +3,13 @@
## 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]

14
docs/RepoCommit.md

@ -0,0 +1,14 @@
# 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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

184
docs/RepositoryApi.md

@ -38,6 +38,7 @@ Method | HTTP request | Description
[**repo_get_raw_file**](RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository
[**repo_get_release**](RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release
[**repo_get_release_attachment**](RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment
[**repo_get_single_commit**](RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository
[**repo_list_all_git_refs**](RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs
[**repo_list_branches**](RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches
[**repo_list_collaborators**](RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators
@ -50,6 +51,7 @@ Method | HTTP request | Description
[**repo_list_stargazers**](RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers
[**repo_list_statuses**](RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses
[**repo_list_subscribers**](RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers
[**repo_list_tags**](RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags
[**repo_merge_pull_request**](RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request
[**repo_migrate**](RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository
[**repo_mirror_sync**](RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository
@ -220,7 +222,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[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)
> GitTreeResponse get_tree(owner, repo, sha, recursive=recursive, page=page, per_page=per_page)
Gets the tree of a repository.
@ -267,10 +269,13 @@ api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configurati
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; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE (optional)
try:
# Gets the tree of a repository.
api_response = api_instance.get_tree(owner, repo, sha)
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)
@ -283,6 +288,9 @@ 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; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE | [optional]
### Return type
@ -2780,6 +2788,86 @@ Name | Type | Description | Notes
[[Back to top]](#) [[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)
Get a single commit from a repository
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration))
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
sha = 'sha_example' # str | the commit hash
try:
# Get a single commit from a repository
api_response = api_instance.repo_get_single_commit(owner, repo, sha)
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**| the commit hash |
### 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), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json, text/plain
- **Accept**: application/json
[[Back to top]](#) [[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)
@ -3423,7 +3511,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **repo_list_releases**
> list[Release] repo_list_releases(owner, repo)
> list[Release] repo_list_releases(owner, repo, page=page, per_page=per_page)
List a repo's releases
@ -3469,10 +3557,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY'
api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration))
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
page = 56 # int | page wants to load (optional)
per_page = 56 # int | items count every page wants to load (optional)
try:
# List a repo's releases
api_response = api_instance.repo_list_releases(owner, repo)
api_response = api_instance.repo_list_releases(owner, repo, page=page, per_page=per_page)
pprint(api_response)
except ApiException as e:
print("Exception when calling RepositoryApi->repo_list_releases: %s\n" % e)
@ -3484,6 +3574,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **str**| owner of the repo |
**repo** | **str**| name of the repo |
**page** | **int**| page wants to load | [optional]
**per_page** | **int**| items count every page wants to load | [optional]
### Return type
@ -3736,8 +3828,86 @@ Name | Type | Description | Notes
[[Back to top]](#) [[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)
List a repository's tags
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configuration))
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
try:
# List a repository's tags
api_response = api_instance.repo_list_tags(owner, repo)
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 |
### 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), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json, text/plain
- **Accept**: application/json
[[Back to top]](#) [[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)
> repo_merge_pull_request(owner, repo, index, body=body)
Merge a pull request
@ -3784,10 +3954,11 @@ api_instance = swagger_client.RepositoryApi(swagger_client.ApiClient(configurati
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 = swagger_client.MergePullRequestOption() # MergePullRequestOption | (optional)
try:
# Merge a pull request
api_instance.repo_merge_pull_request(owner, repo, index)
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)
```
@ -3799,6 +3970,7 @@ 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

13
docs/Tag.md

@ -0,0 +1,13 @@
# Tag
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**commit** | [**TagCommit**](TagCommit.md) | | [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)

11
docs/TagCommit.md

@ -0,0 +1,11 @@
# TagCommit
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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)

1
docs/Team.md

@ -6,6 +6,7 @@ Name | Type | Description | Notes
**description** | **str** | | [optional]
**id** | **int** | | [optional]
**name** | **str** | | [optional]
**organization** | [**Organization**](Organization.md) | | [optional]
**permission** | **str** | | [optional]
**units** | **list[str]** | | [optional]

1
docs/User.md

@ -7,6 +7,7 @@ Name | Type | Description | Notes
**email** | **str** | | [optional]
**full_name** | **str** | the user's full name | [optional]
**id** | **int** | the user's id | [optional]
**is_admin** | **bool** | Is the user an administrator | [optional]
**language** | **str** | User locale | [optional]
**login** | **str** | the user's username | [optional]

73
docs/UserApi.md

@ -42,6 +42,7 @@ Method | HTTP request | Description
[**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_tracked_times**](UserApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo
@ -2899,6 +2900,78 @@ Name | Type | Description | Notes
[[Back to top]](#) [[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()
List all the teams a user belongs to
### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = swagger_client.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = swagger_client.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = swagger_client.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: Token
configuration = swagger_client.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
try:
# List all the teams a user belongs to
api_response = api_instance.user_list_teams()
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_list_teams: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**list[Team]**](Team.md)
### Authorization
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json, text/plain
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **user_search**
> InlineResponse200 user_search(q=q, uid=uid, limit=limit)

7
swagger_client/__init__.py

@ -33,6 +33,9 @@ from swagger_client.models.add_time_option import AddTimeOption
from swagger_client.models.attachment import Attachment
from swagger_client.models.branch import Branch
from swagger_client.models.comment import Comment
from swagger_client.models.commit import Commit
from swagger_client.models.commit_meta import CommitMeta
from swagger_client.models.commit_user import CommitUser
from swagger_client.models.create_email_option import CreateEmailOption
from swagger_client.models.create_fork_option import CreateForkOption
from swagger_client.models.create_gpg_key_option import CreateGPGKeyOption
@ -75,6 +78,7 @@ from swagger_client.models.issue_deadline import IssueDeadline
from swagger_client.models.issue_labels_option import IssueLabelsOption
from swagger_client.models.label import Label
from swagger_client.models.markdown_option import MarkdownOption
from swagger_client.models.merge_pull_request_option import MergePullRequestOption
from swagger_client.models.migrate_repo_form import MigrateRepoForm
from swagger_client.models.milestone import Milestone
from swagger_client.models.organization import Organization
@ -88,12 +92,15 @@ from swagger_client.models.pull_request import PullRequest
from swagger_client.models.pull_request_meta import PullRequestMeta
from swagger_client.models.reference import Reference
from swagger_client.models.release import Release
from swagger_client.models.repo_commit import RepoCommit
from swagger_client.models.repository import Repository
from swagger_client.models.search_results import SearchResults
from swagger_client.models.server_version import ServerVersion
from swagger_client.models.state_type import StateType
from swagger_client.models.status import Status
from swagger_client.models.status_state import StatusState
from swagger_client.models.tag import Tag
from swagger_client.models.tag_commit import TagCommit
from swagger_client.models.team import Team
from swagger_client.models.time_stamp import TimeStamp
from swagger_client.models.tracked_time import TrackedTime

178
swagger_client/api/admin_api.py

@ -739,3 +739,181 @@ class AdminApi(object):
_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
: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
:return: list[Organization]
If the method is called asynchronously,
returns the request thread.
"""
all_params = [] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method admin_get_all_orgs" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'text/plain']) # noqa: E501
# Authentication setting
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
return self.api_client.call_api(
'/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_all_users(self, **kwargs): # noqa: E501
"""List all 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.admin_get_all_users(async_req=True)
>>> result = thread.get()
:param async_req bool
:return: list[User]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.admin_get_all_users_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.admin_get_all_users_with_http_info(**kwargs) # noqa: E501
return data
def admin_get_all_users_with_http_info(self, **kwargs): # noqa: E501
"""List all 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.admin_get_all_users_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:return: list[User]
If the method is called asynchronously,
returns the request thread.
"""
all_params = [] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method admin_get_all_users" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'text/plain']) # noqa: E501
# Authentication setting
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
return self.api_client.call_api(
'/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)

232
swagger_client/api/issue_api.py

<
@ -2789,6 +2789,7 @@ class IssueApi(object):
: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 int page: page number of requested issues
:param str q: search string
:return: list[Issue]
@ -2814,6 +2815,7 @@ class IssueApi(object):
: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 int page: page number of requested issues
:param str q: search string
:return: list[Issue]
@ -2821,7 +2823,7 @@ class IssueApi(object):
returns the request thread.
"""
all_params = ['owner', 'repo', 'state', 'page', 'q'] # noqa: E501
all_params = ['owner', 'repo', 'state', 'labels', 'page', 'q'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@ -2856,6 +2858,8 @@ class IssueApi(object):
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 'page' in params:
query_params.append(('page', params['page'])) # noqa: E501
if 'q' in params:
@ -3237,6 +3241,232 @@ class IssueApi(object):
_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 ('owner' not in params or
params['owner'] is None):
raise ValueError("Missing the required parameter `owner` when calling `issue_start_stop_watch`") # noqa: E501
# verify the required parameter 'repo' is set
if ('repo' not in params or
params['repo'] is None):
raise ValueError("Missing the required parameter `repo` when calling `issue_start_stop_watch`") # noqa: E501
# verify the required parameter 'index' is set
if ('index' not in params or
params['index'] is None):
raise ValueError("Missing the required parameter `index` when calling `issue_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', '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_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_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_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501
else:
(data) = self.issue_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501
return data
def issue_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_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_watch" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'owner' is set
if ('owner' not in params or
params['owner'] is None):
raise ValueError("Missing the required parameter `owner` when calling `issue_stop_watch`") # noqa: E501
# verify the required parameter 'repo' is set
if ('repo' not in params or
params['repo'] is None):
raise ValueError("Missing the required parameter `repo` when calling `issue_stop_watch`") # noqa: E501
# verify the required parameter 'index' is set
if ('index' not in params or
params['index'] is None):
raise ValueError("Missing the required parameter `index` when calling `issue_stop_watch`") # noqa: E501
collection_formats = {}
path_params = {}