regenerated from newer spec
This commit is contained in:
parent
2a6ff3b1aa
commit
d93e164804
46 changed files with 3454 additions and 18 deletions
15
README.md
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
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
Normal file
16
docs/Commit.md
Normal file
|
@ -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
Normal file
11
docs/CommitMeta.md
Normal file
|
@ -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
Normal file
12
docs/CommitUser.md
Normal file
|
@ -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)
|
||||
|
||||
|
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
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
Normal file
12
docs/MergePullRequestOption.md
Normal file
|
@ -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)
|
||||
|
||||
|
|
@ -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,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
Normal file
14
docs/RepoCommit.md
Normal file
|
@ -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)
|
||||
|
||||
|
|
@ -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
Normal file
13
docs/Tag.md
Normal file
|
@ -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
Normal file
11
docs/TagCommit.md
Normal file
|
@ -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)
|
||||
|
||||
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 = {}
|
||||
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/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_tracked_times(self, owner, repo, id, **kwargs): # noqa: E501
|
||||
"""List an issue's tracked times # noqa: E501
|
||||
|
||||
|
|
|
@ -2461,6 +2461,111 @@ class OrganizationApi(object):
|
|||
_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 ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `org_list_team_member`") # noqa: E501
|
||||
# verify the required parameter 'username' is set
|
||||
if ('username' not in params or
|
||||
params['username'] is None):
|
||||
raise ValueError("Missing the required parameter `username` when calling `org_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', '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
|
||||
|
||||
|
|
|
@ -247,6 +247,9 @@ class RepositoryApi(object):
|
|||
: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; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE
|
||||
:return: GitTreeResponse
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
|
@ -270,12 +273,15 @@ class RepositoryApi(object):
|
|||
: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; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE
|
||||
:return: GitTreeResponse
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'repo', 'sha'] # noqa: E501
|
||||
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')
|
||||
|
@ -314,6 +320,12 @@ class RepositoryApi(object):
|
|||
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 = {}
|
||||
|
||||
|
@ -3855,6 +3867,119 @@ class RepositoryApi(object):
|
|||
_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: the commit hash (required)
|
||||
: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: the commit hash (required)
|
||||
:return: Commit
|
||||
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_single_commit" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if ('owner' not in params or
|
||||
params['owner'] is None):
|
||||
raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit`") # noqa: E501
|
||||
# verify the required parameter 'repo' is set
|
||||
if ('repo' not in params or
|
||||
params['repo'] is None):
|
||||
raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit`") # noqa: E501
|
||||
# verify the required parameter 'sha' is set
|
||||
if ('sha' not in params or
|
||||
params['sha'] is None):
|
||||
raise ValueError("Missing the required parameter `sha` when calling `repo_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 = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/repos/{owner}/{repo}/git/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_list_all_git_refs(self, owner, repo, **kwargs): # noqa: E501
|
||||
"""Get specified ref or filtered repository's refs # noqa: E501
|
||||
|
||||
|
@ -4751,6 +4876,8 @@ class RepositoryApi(object):
|
|||
:param async_req bool
|
||||
:param str owner: owner of the repo (required)
|
||||
:param str repo: name of the repo (required)
|
||||
:param int page: page wants to load
|
||||
:param int per_page: items count every page wants to load
|
||||
:return: list[Release]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
|
@ -4773,12 +4900,14 @@ class RepositoryApi(object):
|
|||
:param async_req bool
|
||||
:param str owner: owner of the repo (required)
|
||||
:param str repo: name of the repo (required)
|
||||
:param int page: page wants to load
|
||||
:param int per_page: items count every page wants to load
|
||||
:return: list[Release]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'repo'] # noqa: E501
|
||||
all_params = ['owner', 'repo', 'page', 'per_page'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
|
@ -4811,6 +4940,10 @@ class RepositoryApi(object):
|
|||
path_params['repo'] = params['repo'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
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 = {}
|
||||
|
||||
|
@ -5168,6 +5301,111 @@ class RepositoryApi(object):
|
|||
_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)
|
||||
: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)
|
||||
:return: list[Tag]
|
||||
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_tags" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if ('owner' not in params or
|
||||
params['owner'] is None):
|
||||
raise ValueError("Missing the required parameter `owner` when calling `repo_list_tags`") # noqa: E501
|
||||
# verify the required parameter 'repo' is set
|
||||
if ('repo' not in params or
|
||||
params['repo'] is None):
|
||||
raise ValueError("Missing the required parameter `repo` when calling `repo_list_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 = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/repos/{owner}/{repo}/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_merge_pull_request(self, owner, repo, index, **kwargs): # noqa: E501
|
||||
"""Merge a pull request # noqa: E501
|
||||
|
||||
|
@ -5180,6 +5418,7 @@ class RepositoryApi(object):
|
|||
: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.
|
||||
|
@ -5203,12 +5442,13 @@ class RepositoryApi(object):
|
|||
: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'] # noqa: E501
|
||||
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')
|
||||
|
@ -5254,6 +5494,8 @@ class RepositoryApi(object):
|
|||
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
|
||||
|
|
|
@ -3671,6 +3671,95 @@ class UserApi(object):
|
|||
_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
|
||||
: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
|
||||
:return: list[Team]
|
||||
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_teams" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/user/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
|
||||
|
||||
|
|
|
@ -21,6 +21,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
|
||||
|
@ -63,6 +66,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
|
||||
|
@ -76,12 +80,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
|
||||
|
|
275
swagger_client/models/commit.py
Normal file
275
swagger_client/models/commit.py
Normal file
|
@ -0,0 +1,275 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
from swagger_client.models.commit_meta import CommitMeta # noqa: F401,E501
|
||||
from swagger_client.models.repo_commit import RepoCommit # noqa: F401,E501
|
||||
from swagger_client.models.user import User # noqa: F401,E501
|
||||
|
||||
|
||||
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',
|
||||
'html_url': 'str',
|
||||
'parents': 'list[CommitMeta]',
|
||||
'sha': 'str',
|
||||
'url': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'author': 'author',
|
||||
'commit': 'commit',
|
||||
'committer': 'committer',
|
||||
'html_url': 'html_url',
|
||||
'parents': 'parents',
|
||||
'sha': 'sha',
|
||||
'url': 'url'
|
||||
}
|
||||
|
||||
def __init__(self, author=None, commit=None, committer=None, html_url=None, parents=None, sha=None, url=None): # noqa: E501
|
||||
"""Commit - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._author = None
|
||||
self._commit = None
|
||||
self._committer = None
|
||||
self._html_url = None
|
||||
self._parents = None
|
||||
self._sha = 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 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 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 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 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.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
141
swagger_client/models/commit_meta.py
Normal file
141
swagger_client/models/commit_meta.py
Normal file
|
@ -0,0 +1,141 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
|
||||
class 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 = {
|
||||
'sha': 'str',
|
||||
'url': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'sha': 'sha',
|
||||
'url': 'url'
|
||||
}
|
||||
|
||||
def __init__(self, sha=None, url=None): # noqa: E501
|
||||
"""CommitMeta - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._sha = None
|
||||
self._url = None
|
||||
self.discriminator = None
|
||||
|
||||
if sha is not None:
|
||||
self.sha = sha
|
||||
if url is not None:
|
||||
self.url = url
|
||||
|
||||
@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.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
167
swagger_client/models/commit_user.py
Normal file
167
swagger_client/models/commit_user.py
Normal file
|
@ -0,0 +1,167 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
|
||||
class 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): # noqa: E501
|
||||
"""CommitUser - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
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.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -34,6 +34,7 @@ class CreateUserOption(object):
|
|||
'email': 'str',
|
||||
'full_name': 'str',
|
||||
'login_name': 'str',
|
||||
'must_change_password': 'bool',
|
||||
'password': 'str',
|
||||
'send_notify': 'bool',
|
||||
'source_id': 'int',
|
||||
|
@ -44,18 +45,20 @@ class CreateUserOption(object):
|
|||
'email': 'email',
|
||||
'full_name': 'full_name',
|
||||
'login_name': 'login_name',
|
||||
'must_change_password': 'must_change_password',
|
||||
'password': 'password',
|
||||
'send_notify': 'send_notify',
|
||||
'source_id': 'source_id',
|
||||
'username': 'username'
|
||||
}
|
||||
|
||||
def __init__(self, email=None, full_name=None, login_name=None, password=None, send_notify=None, source_id=None, username=None): # noqa: E501
|
||||
def __init__(self, email=None, full_name=None, login_name=None, must_change_password=None, password=None, send_notify=None, source_id=None, username=None): # noqa: E501
|
||||
"""CreateUserOption - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._email = None
|
||||
self._full_name = None
|
||||
self._login_name = None
|
||||
self._must_change_password = None
|
||||
self._password = None
|
||||
self._send_notify = None
|
||||
self._source_id = None
|
||||
|
@ -67,6 +70,8 @@ class CreateUserOption(object):
|
|||
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
|
||||
self.password = password
|
||||
if send_notify is not None:
|
||||
self.send_notify = send_notify
|
||||
|
@ -139,6 +144,27 @@ class CreateUserOption(object):
|
|||
|
||||
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
|
||||
|
|
|
@ -41,6 +41,7 @@ class EditUserOption(object):
|
|||
'location': 'str',
|
||||
'login_name': 'str',
|
||||
'max_repo_creation': 'int',
|
||||
'must_change_password': 'bool',
|
||||
'password': 'str',
|
||||
'prohibit_login': 'bool',
|
||||
'source_id': 'int',
|
||||
|
@ -58,13 +59,14 @@ class EditUserOption(object):
|
|||
'location': 'location',
|
||||
'login_name': 'login_name',
|
||||
'max_repo_creation': 'max_repo_creation',
|
||||
'must_change_password': 'must_change_password',
|
||||
'password': 'password',
|
||||
'prohibit_login': 'prohibit_login',
|
||||
'source_id': 'source_id',
|
||||
'website': 'website'
|
||||
}
|
||||
|
||||
def __init__(self, active=None, admin=None, allow_create_organization=None, allow_git_hook=None, allow_import_local=None, email=None, full_name=None, location=None, login_name=None, max_repo_creation=None, password=None, prohibit_login=None, source_id=None, website=None): # noqa: E501
|
||||
def __init__(self, active=None, admin=None, allow_create_organization=None, allow_git_hook=None, allow_import_local=None, email=None, full_name=None, location=None, login_name=None, max_repo_creation=None, must_change_password=None, password=None, prohibit_login=None, source_id=None, website=None): # noqa: E501
|
||||
"""EditUserOption - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._active = None
|
||||
|
@ -77,6 +79,7 @@ class EditUserOption(object):
|
|||
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._source_id = None
|
||||
|
@ -102,6 +105,8 @@ class EditUserOption(object):
|
|||
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:
|
||||
|
@ -323,6 +328,27 @@ class EditUserOption(object):
|
|||
|
||||
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
|
||||
|
|
|
@ -33,30 +33,40 @@ class GitTreeResponse(object):
|
|||
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, sha=None, tree=None, truncated=None, url=None): # noqa: E501
|
||||
def __init__(self, page=None, sha=None, total_count=None, tree=None, truncated=None, url=None): # noqa: E501
|
||||
"""GitTreeResponse - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
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:
|
||||
|
@ -64,6 +74,27 @@ class GitTreeResponse(object):
|
|||
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
|
||||
|
@ -85,6 +116,27 @@ class GitTreeResponse(object):
|
|||
|
||||
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
|
||||
|
|
174
swagger_client/models/merge_pull_request_option.py
Normal file
174
swagger_client/models/merge_pull_request_option.py
Normal file
|
@ -0,0 +1,174 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
|
||||
class 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_message_field': 'str',
|
||||
'merge_title_field': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'do': 'Do',
|
||||
'merge_message_field': 'MergeMessageField',
|
||||
'merge_title_field': 'MergeTitleField'
|
||||
}
|
||||
|
||||
def __init__(self, do=None, merge_message_field=None, merge_title_field=None): # noqa: E501
|
||||
"""MergePullRequestOption - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._do = None
|
||||
self._merge_message_field = None
|
||||
self._merge_title_field = None
|
||||
self.discriminator = None
|
||||
|
||||
self.do = do
|
||||
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
|
||||
|
||||
@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 do is None:
|
||||
raise ValueError("Invalid value for `do`, must not be `None`") # noqa: E501
|
||||
allowed_values = ["merge", "rebase", "rebase-merge", "squash"] # noqa: E501
|
||||
if 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_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
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
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.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -34,37 +34,48 @@ class PayloadCommit(object):
|
|||
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, author=None, committer=None, id=None, message=None, timestamp=None, url=None, verification=None): # noqa: E501
|
||||
def __init__(self, added=None, author=None, committer=None, id=None, message=None, modified=None, removed=None, timestamp=None, url=None, verification=None): # noqa: E501
|
||||
"""PayloadCommit - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
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:
|
||||
|
@ -73,6 +84,10 @@ class PayloadCommit(object):
|
|||
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:
|
||||
|
@ -80,6 +95,27 @@ class PayloadCommit(object):
|
|||
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
|
||||
|
@ -166,6 +202,48 @@ class PayloadCommit(object):
|
|||
|
||||
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
|
||||
|
|
222
swagger_client/models/repo_commit.py
Normal file
222
swagger_client/models/repo_commit.py
Normal file
|
@ -0,0 +1,222 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
from swagger_client.models.commit_meta import CommitMeta # noqa: F401,E501
|
||||
from swagger_client.models.commit_user import CommitUser # noqa: F401,E501
|
||||
|
||||
|
||||
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'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'author': 'author',
|
||||
'committer': 'committer',
|
||||
'message': 'message',
|
||||
'tree': 'tree',
|
||||
'url': 'url'
|
||||
}
|
||||
|
||||
def __init__(self, author=None, committer=None, message=None, tree=None, url=None): # noqa: E501
|
||||
"""RepoCommit - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._author = None
|
||||
self._committer = None
|
||||
self._message = 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 message is not None:
|
||||
self.message = message
|
||||
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 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
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
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.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
195
swagger_client/models/tag.py
Normal file
195
swagger_client/models/tag.py
Normal file
|
@ -0,0 +1,195 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
from swagger_client.models.tag_commit import TagCommit # noqa: F401,E501
|
||||
|
||||
|
||||
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': 'TagCommit',
|
||||
'name': 'str',
|
||||
'tarball_url': 'str',
|
||||
'zipball_url': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'commit': 'commit',
|
||||
'name': 'name',
|
||||
'tarball_url': 'tarball_url',
|
||||
'zipball_url': 'zipball_url'
|
||||
}
|
||||
|
||||
def __init__(self, commit=None, name=None, tarball_url=None, zipball_url=None): # noqa: E501
|
||||
"""Tag - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._commit = None
|
||||
self._name = None
|
||||
self._tarball_url = None
|
||||
self._zipball_url = None
|
||||
self.discriminator = None
|
||||
|
||||
if commit is not None:
|
||||
self.commit = commit
|
||||
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: TagCommit
|
||||
"""
|
||||
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: TagCommit
|
||||
"""
|
||||
|
||||
self._commit = commit
|
||||
|
||||
@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.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
141
swagger_client/models/tag_commit.py
Normal file
141
swagger_client/models/tag_commit.py
Normal file
|
@ -0,0 +1,141 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
|
||||
class TagCommit(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
"""
|
||||
Attributes:
|
||||
swagger_types (dict): The key is attribute name
|
||||
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',
|
||||
'url': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'sha': 'sha',
|
||||
'url': 'url'
|
||||
}
|
||||
|
||||
def __init__(self, sha=None, url=None): # noqa: E501
|
||||
"""TagCommit - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._sha = None
|
||||
self._url = None
|
||||
self.discriminator = None
|
||||
|
||||
if sha is not None:
|
||||
self.sha = sha
|
||||
if url is not None:
|
||||
self.url = url
|
||||
|
||||
@property
|
||||
def sha(self):
|
||||
"""Gets the sha of this TagCommit. # noqa: E501
|
||||
|
||||
|
||||
:return: The sha of this TagCommit. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._sha
|
||||
|
||||
@sha.setter
|
||||
def sha(self, sha):
|
||||
"""Sets the sha of this TagCommit.
|
||||
|
||||
|
||||
:param sha: The sha of this TagCommit. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._sha = sha
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""Gets the url of this TagCommit. # noqa: E501
|
||||
|
||||
|
||||
:return: The url of this TagCommit. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url):
|
||||
"""Sets the url of this TagCommit.
|
||||
|
||||
|
||||
:param url: The url of this TagCommit. # 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(TagCommit, dict):
|
||||
for key, value in self.items():
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""Returns the string representation of the model"""
|
||||
return pprint.pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""For `print` and `pprint`"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, TagCommit):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -16,6 +16,8 @@ import re # noqa: F401
|
|||
|
||||
import six
|
||||
|
||||
from swagger_client.models.organization import Organization # noqa: F401,E501
|
||||
|
||||
|
||||
class Team(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
@ -34,6 +36,7 @@ class Team(object):
|
|||
'description': 'str',
|
||||
'id': 'int',
|
||||
'name': 'str',
|
||||
'organization': 'Organization',
|
||||
'permission': 'str',
|
||||
'units': 'list[str]'
|
||||
}
|
||||
|
@ -42,16 +45,18 @@ class Team(object):
|
|||
'description': 'description',
|
||||
'id': 'id',
|
||||
'name': 'name',
|
||||
'organization': 'organization',
|
||||
'permission': 'permission',
|
||||
'units': 'units'
|
||||
}
|
||||
|
||||
def __init__(self, description=None, id=None, name=None, permission=None, units=None): # noqa: E501
|
||||
def __init__(self, description=None, id=None, name=None, organization=None, permission=None, units=None): # noqa: E501
|
||||
"""Team - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._description = None
|
||||
self._id = None
|
||||
self._name = None
|
||||
self._organization = None
|
||||
self._permission = None
|
||||
self._units = None
|
||||
self.discriminator = None
|
||||
|
@ -62,6 +67,8 @@ class Team(object):
|
|||
self.id = id
|
||||
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:
|
||||
|
@ -130,6 +137,27 @@ class Team(object):
|
|||
|
||||
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
|
||||
|
|
|
@ -35,6 +35,7 @@ class User(object):
|
|||
'email': 'str',
|
||||
'full_name': 'str',
|
||||
'id': 'int',
|
||||
'is_admin': 'bool',
|
||||
'language': 'str',
|
||||
'login': 'str'
|
||||
}
|
||||
|
@ -44,17 +45,19 @@ class User(object):
|
|||
'email': 'email',
|
||||
'full_name': 'full_name',
|
||||
'id': 'id',
|
||||
'is_admin': 'is_admin',
|
||||
'language': 'language',
|
||||
'login': 'login'
|
||||
}
|
||||
|
||||
def __init__(self, avatar_url=None, email=None, full_name=None, id=None, language=None, login=None): # noqa: E501
|
||||
def __init__(self, avatar_url=None, email=None, full_name=None, id=None, is_admin=None, language=None, login=None): # noqa: E501
|
||||
"""User - a model defined in Swagger""" # noqa: E501
|
||||
|
||||
self._avatar_url = None
|
||||
self._email = None
|
||||
self._full_name = None
|
||||
self._id = None
|
||||
self._is_admin = None
|
||||
self._language = None
|
||||
self._login = None
|
||||
self.discriminator = None
|
||||
|
@ -67,6 +70,8 @@ class User(object):
|
|||
self.full_name = full_name
|
||||
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 login is not None:
|
||||
|
@ -162,6 +167,29 @@ class User(object):
|
|||
|
||||
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
|
||||
|
|
40
test/test_commit.py
Normal file
40
test/test_commit.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
from swagger_client.models.commit import Commit # noqa: E501
|
||||
from swagger_client.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 = swagger_client.models.commit.Commit() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
40
test/test_commit_meta.py
Normal file
40
test/test_commit_meta.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
from swagger_client.models.commit_meta import CommitMeta # noqa: E501
|
||||
from swagger_client.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 = swagger_client.models.commit_meta.CommitMeta() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
40
test/test_commit_user.py
Normal file
40
test/test_commit_user.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
from swagger_client.models.commit_user import CommitUser # noqa: E501
|
||||
from swagger_client.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 = swagger_client.models.commit_user.CommitUser() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
40
test/test_merge_pull_request_option.py
Normal file
40
test/test_merge_pull_request_option.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
from swagger_client.models.merge_pull_request_option import MergePullRequestOption # noqa: E501
|
||||
from swagger_client.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 = swagger_client.models.merge_pull_request_option.MergePullRequestOption() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
40
test/test_repo_commit.py
Normal file
40
test/test_repo_commit.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
from swagger_client.models.repo_commit import RepoCommit # noqa: E501
|
||||
from swagger_client.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 = swagger_client.models.repo_commit.RepoCommit() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
40
test/test_tag.py
Normal file
40
test/test_tag.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
from swagger_client.models.tag import Tag # noqa: E501
|
||||
from swagger_client.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 = swagger_client.models.tag.Tag() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
40
test/test_tag_commit.py
Normal file
40
test/test_tag_commit.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API.
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.1.1
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
from swagger_client.models.tag_commit import TagCommit # noqa: E501
|
||||
from swagger_client.rest import ApiException
|
||||
|
||||
|
||||
class TestTagCommit(unittest.TestCase):
|
||||
"""TagCommit unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testTagCommit(self):
|
||||
"""Test TagCommit"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = swagger_client.models.tag_commit.TagCommit() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
Reference in a new issue