Update API (#1)
* Update to Gitea 1.10.0+dev-427-gf9aba9ba0 * Add swagger-codegen-maven-plugin to automate code generation * Regenerate swagger classes * Fix tests compilation caused by API changes * Drop Java 7 support It is EOL and not supported on Travis anymore. Intead, test against Java 11 * Fix Gradle script using nonexistent 'configurations.compileClasspath' * Update Gradle to 5.6.2 to add support for Java 11 * Add missing javax.annotation-api to build.gradle to fix compilation on Java 11
This commit is contained in:
parent
59b3d0f054
commit
c59420e9a8
|
|
@ -1 +1 @@
|
|||
2.3.1
|
||||
2.4.8
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
language: java
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
- oraclejdk7
|
||||
- openjdk8
|
||||
- openjdk11
|
||||
before_install:
|
||||
# ensure gradlew has proper permission
|
||||
- chmod a+x ./gradlew
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ if(hasProperty('target') && target == 'android') {
|
|||
|
||||
javadoc {
|
||||
source = sourceSets.main.allJava
|
||||
classpath = configurations.compileClasspath
|
||||
classpath = sourceSets.main.compileClasspath
|
||||
|
||||
options
|
||||
{
|
||||
|
|
@ -115,5 +115,6 @@ dependencies {
|
|||
compile 'com.google.code.gson:gson:2.8.1'
|
||||
compile 'io.gsonfire:gson-fire:1.8.0'
|
||||
compile 'org.threeten:threetenbp:1.3.5'
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# APIError
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -4,9 +4,7 @@
|
|||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**sha1** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
164
docs/AdminApi.md
164
docs/AdminApi.md
|
|
@ -11,6 +11,8 @@ Method | HTTP request | Description
|
|||
[**adminDeleteUser**](AdminApi.md#adminDeleteUser) | **DELETE** /admin/users/{username} | Delete a user
|
||||
[**adminDeleteUserPublicKey**](AdminApi.md#adminDeleteUserPublicKey) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key
|
||||
[**adminEditUser**](AdminApi.md#adminEditUser) | **PATCH** /admin/users/{username} | Edit an existing user
|
||||
[**adminGetAllOrgs**](AdminApi.md#adminGetAllOrgs) | **GET** /admin/orgs | List all organizations
|
||||
[**adminGetAllUsers**](AdminApi.md#adminGetAllUsers) | **GET** /admin/users | List all users
|
||||
|
||||
|
||||
<a name="adminCreateOrg"></a>
|
||||
|
|
@ -595,3 +597,165 @@ Name | Type | Description | Notes
|
|||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="adminGetAllOrgs"></a>
|
||||
# **adminGetAllOrgs**
|
||||
> List<Organization> adminGetAllOrgs(page, limit)
|
||||
|
||||
List all organizations
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.AdminApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
AdminApi apiInstance = new AdminApi();
|
||||
Integer page = 56; // Integer | page number of results to return (1-based)
|
||||
Integer limit = 56; // Integer | page size of results, maximum page size is 50
|
||||
try {
|
||||
List<Organization> result = apiInstance.adminGetAllOrgs(page, limit);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling AdminApi#adminGetAllOrgs");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
||||
**limit** | **Integer**| page size of results, maximum page size is 50 | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Organization>**](Organization.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, text/plain
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="adminGetAllUsers"></a>
|
||||
# **adminGetAllUsers**
|
||||
> List<User> adminGetAllUsers()
|
||||
|
||||
List all users
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.AdminApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
AdminApi apiInstance = new AdminApi();
|
||||
try {
|
||||
List<User> result = apiInstance.adminGetAllUsers();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling AdminApi#adminGetAllUsers");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
# AnnotatedTag
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **String** | | [optional]
|
||||
**object** | [**AnnotatedTagObject**](AnnotatedTagObject.md) | | [optional]
|
||||
**sha** | **String** | | [optional]
|
||||
**tag** | **String** | | [optional]
|
||||
**tagger** | [**CommitUser**](CommitUser.md) | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# AnnotatedTagObject
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sha** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -9,6 +9,8 @@ Name | Type | Description | Notes
|
|||
**htmlUrl** | **String** | | [optional]
|
||||
**id** | **Long** | | [optional]
|
||||
**issueUrl** | **String** | | [optional]
|
||||
**originalAuthor** | **String** | | [optional]
|
||||
**originalAuthorId** | **Long** | | [optional]
|
||||
**pullRequestUrl** | **String** | | [optional]
|
||||
**updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**user** | [**User**](User.md) | | [optional]
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
**htmlUrl** | **String** | | [optional]
|
||||
**parents** | [**List<CommitMeta>**](CommitMeta.md) | | [optional]
|
||||
**sha** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# CommitMeta
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sha** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# CommitUser
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**date** | **String** | | [optional]
|
||||
**email** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
# ContentsResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**links** | [**FileLinksResponse**](FileLinksResponse.md) | | [optional]
|
||||
**content** | **String** | `content` is populated when `type` is `file`, otherwise null | [optional]
|
||||
**downloadUrl** | **String** | | [optional]
|
||||
**encoding** | **String** | `encoding` is populated when `type` is `file`, otherwise null | [optional]
|
||||
**gitUrl** | **String** | | [optional]
|
||||
**htmlUrl** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**path** | **String** | | [optional]
|
||||
**sha** | **String** | | [optional]
|
||||
**size** | **Long** | | [optional]
|
||||
**submoduleGitUrl** | **String** | `submodule_git_url` is populated when `type` is `submodule`, otherwise null | [optional]
|
||||
**target** | **String** | `target` is populated when `type` is `symlink`, otherwise null | [optional]
|
||||
**type** | **String** | `type` will be `file`, `dir`, `symlink`, or `submodule` | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
# CreateFileOptions
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**author** | [**Identity**](Identity.md) | | [optional]
|
||||
**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional]
|
||||
**committer** | [**Identity**](Identity.md) | | [optional]
|
||||
**content** | **String** | content must be base64 encoded |
|
||||
**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional]
|
||||
**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**active** | **Boolean** | | [optional]
|
||||
**branchFilter** | **String** | | [optional]
|
||||
**config** | **Map<String, String>** | |
|
||||
**events** | **List<String>** | | [optional]
|
||||
**type** | [**TypeEnum**](#TypeEnum) | |
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**color** | **String** | |
|
||||
**description** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,19 @@ Name | Type | Description | Notes
|
|||
**description** | **String** | | [optional]
|
||||
**fullName** | **String** | | [optional]
|
||||
**location** | **String** | | [optional]
|
||||
**repoAdminChangeTeamAccess** | **Boolean** | | [optional]
|
||||
**username** | **String** | |
|
||||
**visibility** | [**VisibilityEnum**](#VisibilityEnum) | possible values are `public` (default), `limited` or `private` | [optional]
|
||||
**website** | **String** | | [optional]
|
||||
|
||||
|
||||
<a name="VisibilityEnum"></a>
|
||||
## Enum: VisibilityEnum
|
||||
Name | Value
|
||||
---- | -----
|
||||
PUBLIC | "public"
|
||||
LIMITED | "limited"
|
||||
PRIVATE | "private"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|||
**autoInit** | **Boolean** | Whether the repository should be auto-intialized? | [optional]
|
||||
**description** | **String** | Description of the repository to create | [optional]
|
||||
**gitignores** | **String** | Gitignores to use | [optional]
|
||||
**issueLabels** | **String** | Issue Label set to use | [optional]
|
||||
**license** | **String** | License to use | [optional]
|
||||
**name** | **String** | Name of the repository to create |
|
||||
**_private** | **Boolean** | Whether the repository is private | [optional]
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|||
**description** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
**permission** | [**PermissionEnum**](#PermissionEnum) | | [optional]
|
||||
**units** | **List<String>** | | [optional]
|
||||
|
||||
|
||||
<a name="PermissionEnum"></a>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|||
**email** | **String** | |
|
||||
**fullName** | **String** | | [optional]
|
||||
**loginName** | **String** | | [optional]
|
||||
**mustChangePassword** | **Boolean** | | [optional]
|
||||
**password** | **String** | |
|
||||
**sendNotify** | **Boolean** | | [optional]
|
||||
**sourceId** | **Long** | | [optional]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
# DeleteFileOptions
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**author** | [**Identity**](Identity.md) | | [optional]
|
||||
**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional]
|
||||
**committer** | [**Identity**](Identity.md) | | [optional]
|
||||
**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional]
|
||||
**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional]
|
||||
**sha** | **String** | sha is the SHA for the file that already exists |
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
# AccessTokenName
|
||||
# EditGitHookOption
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | |
|
||||
**content** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**active** | **Boolean** | | [optional]
|
||||
**branchFilter** | **String** | | [optional]
|
||||
**config** | **Map<String, String>** | | [optional]
|
||||
**events** | **List<String>** | | [optional]
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**color** | **String** | | [optional]
|
||||
**description** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,18 @@ Name | Type | Description | Notes
|
|||
**description** | **String** | | [optional]
|
||||
**fullName** | **String** | | [optional]
|
||||
**location** | **String** | | [optional]
|
||||
**repoAdminChangeTeamAccess** | **Boolean** | | [optional]
|
||||
**visibility** | [**VisibilityEnum**](#VisibilityEnum) | possible values are `public`, `limited` or `private` | [optional]
|
||||
**website** | **String** | | [optional]
|
||||
|
||||
|
||||
<a name="VisibilityEnum"></a>
|
||||
## Enum: VisibilityEnum
|
||||
Name | Value
|
||||
---- | -----
|
||||
PUBLIC | "public"
|
||||
LIMITED | "limited"
|
||||
PRIVATE | "private"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
# EditRepoOption
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**allowMergeCommits** | **Boolean** | either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`. | [optional]
|
||||
**allowRebase** | **Boolean** | either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. | [optional]
|
||||
**allowRebaseExplicit** | **Boolean** | either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`. | [optional]
|
||||
**allowSquashMerge** | **Boolean** | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. | [optional]
|
||||
**archived** | **Boolean** | set to `true` to archive this repository. | [optional]
|
||||
**defaultBranch** | **String** | sets the default branch for this repository. | [optional]
|
||||
**description** | **String** | a short description of the repository. | [optional]
|
||||
**externalTracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional]
|
||||
**externalWiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional]
|
||||
**hasIssues** | **Boolean** | either `true` to enable issues for this repository or `false` to disable them. | [optional]
|
||||
**hasPullRequests** | **Boolean** | either `true` to allow pull requests, or `false` to prevent pull request. | [optional]
|
||||
**hasWiki** | **Boolean** | either `true` to enable the wiki for this repository or `false` to disable it. | [optional]
|
||||
**ignoreWhitespaceConflicts** | **Boolean** | either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`. | [optional]
|
||||
**internalTracker** | [**InternalTracker**](InternalTracker.md) | | [optional]
|
||||
**name** | **String** | name of the repository | [optional]
|
||||
**_private** | **Boolean** | either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. | [optional]
|
||||
**website** | **String** | a URL with more information about the repository. | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|||
**description** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
**permission** | [**PermissionEnum**](#PermissionEnum) | | [optional]
|
||||
**units** | **List<String>** | | [optional]
|
||||
|
||||
|
||||
<a name="PermissionEnum"></a>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|||
**location** | **String** | | [optional]
|
||||
**loginName** | **String** | | [optional]
|
||||
**maxRepoCreation** | **Long** | | [optional]
|
||||
**mustChangePassword** | **Boolean** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**prohibitLogin** | **Boolean** | | [optional]
|
||||
**sourceId** | **Long** | | [optional]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# ExternalTracker
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**externalTrackerFormat** | **String** | External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. | [optional]
|
||||
**externalTrackerStyle** | **String** | External Issue Tracker Number Format, either `numeric` or `alphanumeric` | [optional]
|
||||
**externalTrackerUrl** | **String** | URL of external issue tracker. | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
# ExternalWiki
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**externalWikiUrl** | **String** | URL of external wiki. | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
# FileCommitResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**author** | [**CommitUser**](CommitUser.md) | | [optional]
|
||||
**committer** | [**CommitUser**](CommitUser.md) | | [optional]
|
||||
**htmlUrl** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
**parents** | [**List<CommitMeta>**](CommitMeta.md) | | [optional]
|
||||
**sha** | **String** | | [optional]
|
||||
**tree** | [**CommitMeta**](CommitMeta.md) | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# FileDeleteResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional]
|
||||
**content** | **Object** | | [optional]
|
||||
**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# FileLinksResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**git** | **String** | | [optional]
|
||||
**html** | **String** | | [optional]
|
||||
**self** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# FileResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional]
|
||||
**content** | [**ContentsResponse**](ContentsResponse.md) | | [optional]
|
||||
**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
# GitBlobResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**content** | **String** | | [optional]
|
||||
**encoding** | **String** | | [optional]
|
||||
**sha** | **String** | | [optional]
|
||||
**size** | **Long** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
# GitEntry
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mode** | **String** | | [optional]
|
||||
**path** | **String** | | [optional]
|
||||
**sha** | **String** | | [optional]
|
||||
**size** | **Long** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# GitHook
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**content** | **String** | | [optional]
|
||||
**isActive** | **Boolean** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# GitObject
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sha** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
# GitTreeResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**page** | **Long** | | [optional]
|
||||
**sha** | **String** | | [optional]
|
||||
**totalCount** | **Long** | | [optional]
|
||||
**tree** | [**List<GitEntry>**](GitEntry.md) | | [optional]
|
||||
**truncated** | **Boolean** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
# Hook
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**active** | **Boolean** | | [optional]
|
||||
**config** | **Map<String, String>** | | [optional]
|
||||
**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**events** | **List<String>** | | [optional]
|
||||
**id** | **Long** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# Identity
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**email** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# InlineResponse200
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**List<Team>**](Team.md) | | [optional]
|
||||
**ok** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# UserSearchList
|
||||
# InlineResponse2001
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# InternalTracker
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**allowOnlyContributorsToTrackTime** | **Boolean** | Let only contributors track time (Built-in issue tracker) | [optional]
|
||||
**enableIssueDependencies** | **Boolean** | Enable dependencies for issues and pull requests (Built-in issue tracker) | [optional]
|
||||
**enableTimeTracker** | **Boolean** | Enable time tracking (Built-in issue tracker) | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -15,6 +15,8 @@ Name | Type | Description | Notes
|
|||
**labels** | [**List<Label>**](Label.md) | | [optional]
|
||||
**milestone** | [**Milestone**](Milestone.md) | | [optional]
|
||||
**number** | **Long** | | [optional]
|
||||
**originalAuthor** | **String** | | [optional]
|
||||
**originalAuthorId** | **Long** | | [optional]
|
||||
**pullRequest** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional]
|
||||
**state** | **String** | | [optional]
|
||||
**title** | **String** | | [optional]
|
||||
|
|
|
|||
200
docs/IssueApi.md
200
docs/IssueApi.md
|
|
@ -8,7 +8,7 @@ Method | HTTP request | Description
|
|||
[**issueAddTime**](IssueApi.md#issueAddTime) | **POST** /repos/{owner}/{repo}/issues/{id}/times | Add a tracked time to a issue
|
||||
[**issueClearLabels**](IssueApi.md#issueClearLabels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue
|
||||
[**issueCreateComment**](IssueApi.md#issueCreateComment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue
|
||||
[**issueCreateIssue**](IssueApi.md#issueCreateIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue
|
||||
[**issueCreateIssue**](IssueApi.md#issueCreateIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
[**issueCreateLabel**](IssueApi.md#issueCreateLabel) | **POST** /repos/{owner}/{repo}/labels | Create a label
|
||||
[**issueCreateMilestone**](IssueApi.md#issueCreateMilestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone
|
||||
[**issueDeleteComment**](IssueApi.md#issueDeleteComment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment
|
||||
|
|
@ -17,8 +17,8 @@ Method | HTTP request | Description
|
|||
[**issueDeleteMilestone**](IssueApi.md#issueDeleteMilestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone
|
||||
[**issueEditComment**](IssueApi.md#issueEditComment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment
|
||||
[**issueEditCommentDeprecated**](IssueApi.md#issueEditCommentDeprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment
|
||||
[**issueEditIssue**](IssueApi.md#issueEditIssue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue
|
||||
[**issueEditIssueDeadline**](IssueApi.md#issueEditIssueDeadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted.
|
||||
[**issueEditIssue**](IssueApi.md#issueEditIssue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
[**issueEditIssueDeadline**](IssueApi.md#issueEditIssueDeadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
[**issueEditLabel**](IssueApi.md#issueEditLabel) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label
|
||||
[**issueEditMilestone**](IssueApi.md#issueEditMilestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone
|
||||
[**issueGetComments**](IssueApi.md#issueGetComments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue
|
||||
|
|
@ -26,12 +26,14 @@ Method | HTTP request | Description
|
|||
[**issueGetLabel**](IssueApi.md#issueGetLabel) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label
|
||||
[**issueGetLabels**](IssueApi.md#issueGetLabels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels
|
||||
[**issueGetMilestone**](IssueApi.md#issueGetMilestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone
|
||||
[**issueGetMilestonesList**](IssueApi.md#issueGetMilestonesList) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's milestones
|
||||
[**issueGetMilestonesList**](IssueApi.md#issueGetMilestonesList) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones
|
||||
[**issueGetRepoComments**](IssueApi.md#issueGetRepoComments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository
|
||||
[**issueListIssues**](IssueApi.md#issueListIssues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues
|
||||
[**issueListLabels**](IssueApi.md#issueListLabels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels
|
||||
[**issueRemoveLabel**](IssueApi.md#issueRemoveLabel) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue
|
||||
[**issueReplaceLabels**](IssueApi.md#issueReplaceLabels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels
|
||||
[**issueStartStopWatch**](IssueApi.md#issueStartStopWatch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue.
|
||||
[**issueStopWatch**](IssueApi.md#issueStopWatch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch.
|
||||
[**issueTrackedTimes**](IssueApi.md#issueTrackedTimes) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times
|
||||
|
||||
|
||||
|
|
@ -388,7 +390,7 @@ Name | Type | Description | Notes
|
|||
# **issueCreateIssue**
|
||||
> Issue issueCreateIssue(owner, repo, body)
|
||||
|
||||
Create an issue
|
||||
Create an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
|
||||
### Example
|
||||
```java
|
||||
|
|
@ -1166,7 +1168,7 @@ Name | Type | Description | Notes
|
|||
# **issueEditIssue**
|
||||
> Issue issueEditIssue(owner, repo, index, body)
|
||||
|
||||
Edit an issue
|
||||
Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
|
||||
### Example
|
||||
```java
|
||||
|
|
@ -1254,7 +1256,7 @@ Name | Type | Description | Notes
|
|||
# **issueEditIssueDeadline**
|
||||
> IssueDeadline issueEditIssueDeadline(owner, repo, index, body)
|
||||
|
||||
Set an issue deadline. If set to null, the deadline is deleted.
|
||||
Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
|
||||
### Example
|
||||
```java
|
||||
|
|
@ -1948,9 +1950,9 @@ Name | Type | Description | Notes
|
|||
|
||||
<a name="issueGetMilestonesList"></a>
|
||||
# **issueGetMilestonesList**
|
||||
> List<Milestone> issueGetMilestonesList(owner, repo)
|
||||
> List<Milestone> issueGetMilestonesList(owner, repo, state)
|
||||
|
||||
Get all of a repository's milestones
|
||||
Get all of a repository's opened milestones
|
||||
|
||||
### Example
|
||||
```java
|
||||
|
|
@ -2001,8 +2003,9 @@ Token.setApiKey("YOUR API KEY");
|
|||
IssueApi apiInstance = new IssueApi();
|
||||
String owner = "owner_example"; // String | owner of the repo
|
||||
String repo = "repo_example"; // String | name of the repo
|
||||
String state = "state_example"; // String | Milestone state, Recognised values are open, closed and all. Defaults to \"open\"
|
||||
try {
|
||||
List<Milestone> result = apiInstance.issueGetMilestonesList(owner, repo);
|
||||
List<Milestone> result = apiInstance.issueGetMilestonesList(owner, repo, state);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling IssueApi#issueGetMilestonesList");
|
||||
|
|
@ -2016,6 +2019,7 @@ Name | Type | Description | Notes
|
|||
------------- | ------------- | ------------- | -------------
|
||||
**owner** | **String**| owner of the repo |
|
||||
**repo** | **String**| name of the repo |
|
||||
**state** | **String**| Milestone state, Recognised values are open, closed and all. Defaults to \"open\" | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
|
@ -2118,7 +2122,7 @@ Name | Type | Description | Notes
|
|||
|
||||
<a name="issueListIssues"></a>
|
||||
# **issueListIssues**
|
||||
> List<Issue> issueListIssues(owner, repo, state, page, q)
|
||||
> List<Issue> issueListIssues(owner, repo, state, labels, page, q)
|
||||
|
||||
List a repository's issues
|
||||
|
||||
|
|
@ -2172,10 +2176,11 @@ IssueApi apiInstance = new IssueApi();
|
|||
String owner = "owner_example"; // String | owner of the repo
|
||||
String repo = "repo_example"; // String | name of the repo
|
||||
String state = "state_example"; // String | whether issue is open or closed
|
||||
String labels = "labels_example"; // String | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded
|
||||
Integer page = 56; // Integer | page number of requested issues
|
||||
String q = "q_example"; // String | search string
|
||||
try {
|
||||
List<Issue> result = apiInstance.issueListIssues(owner, repo, state, page, q);
|
||||
List<Issue> result = apiInstance.issueListIssues(owner, repo, state, labels, page, q);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling IssueApi#issueListIssues");
|
||||
|
|
@ -2190,6 +2195,7 @@ Name | Type | Description | Notes
|
|||
**owner** | **String**| owner of the repo |
|
||||
**repo** | **String**| name of the repo |
|
||||
**state** | **String**| whether issue is open or closed | [optional]
|
||||
**labels** | **String**| comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | [optional]
|
||||
**page** | **Integer**| page number of requested issues | [optional]
|
||||
**q** | **String**| search string | [optional]
|
||||
|
||||
|
|
@ -2460,6 +2466,176 @@ Name | Type | Description | Notes
|
|||
|
||||
[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
|
||||
|
||||
<a name="issueStartStopWatch"></a>
|
||||
# **issueStartStopWatch**
|
||||
> issueStartStopWatch(owner, repo, index)
|
||||
|
||||
Start stopwatch on an issue.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.IssueApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
IssueApi apiInstance = new IssueApi();
|
||||
String owner = "owner_example"; // String | owner of the repo
|
||||
String repo = "repo_example"; // String | name of the repo
|
||||
Long index = 789L; // Long | index of the issue to create the stopwatch on
|
||||
try {
|
||||
apiInstance.issueStartStopWatch(owner, repo, index);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling IssueApi#issueStartStopWatch");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**owner** | **String**| owner of the repo |
|
||||
**repo** | **String**| name of the repo |
|
||||
**index** | **Long**| index of the issue to create the stopwatch on |
|
||||
|
||||
### Return type
|
||||
|
||||
null (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
|
||||
|
||||
<a name="issueStopWatch"></a>
|
||||
# **issueStopWatch**
|
||||
> issueStopWatch(owner, repo, index)
|
||||
|
||||
Stop an issue's existing stopwatch.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.IssueApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
IssueApi apiInstance = new IssueApi();
|
||||
String owner = "owner_example"; // String | owner of the repo
|
||||
String repo = "repo_example"; // String | name of the repo
|
||||
Long index = 789L; // Long | index of the issue to stop the stopwatch on
|
||||
try {
|
||||
apiInstance.issueStopWatch(owner, repo, index);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling IssueApi#issueStopWatch");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**owner** | **String**| owner of the repo |
|
||||
**repo** | **String**| name of the repo |
|
||||
**index** | **Long**| index of the issue to stop the stopwatch on |
|
||||
|
||||
### Return type
|
||||
|
||||
null (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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**color** | **String** | | [optional]
|
||||
**description** | **String** | | [optional]
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
# MergePullRequestOption
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_do** | [**DoEnum**](#DoEnum) | |
|
||||
**mergeMessageField** | **String** | | [optional]
|
||||
**mergeTitleField** | **String** | | [optional]
|
||||
|
||||
|
||||
<a name="DoEnum"></a>
|
||||
## Enum: DoEnum
|
||||
Name | Value
|
||||
---- | -----
|
||||
MERGE | "merge"
|
||||
REBASE | "rebase"
|
||||
REBASE_MERGE | "rebase-merge"
|
||||
SQUASH | "squash"
|
||||
|
||||
|
||||
|
||||
|
|
@ -8,10 +8,16 @@ Name | Type | Description | Notes
|
|||
**authUsername** | **String** | | [optional]
|
||||
**cloneAddr** | **String** | |
|
||||
**description** | **String** | | [optional]
|
||||
**issues** | **Boolean** | | [optional]
|
||||
**labels** | **Boolean** | | [optional]
|
||||
**milestones** | **Boolean** | | [optional]
|
||||
**mirror** | **Boolean** | | [optional]
|
||||
**_private** | **Boolean** | | [optional]
|
||||
**pullRequests** | **Boolean** | | [optional]
|
||||
**releases** | **Boolean** | | [optional]
|
||||
**repoName** | **String** | |
|
||||
**uid** | **Long** | |
|
||||
**wiki** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ This endpoint does not need any parameter.
|
|||
|
||||
<a name="renderMarkdown"></a>
|
||||
# **renderMarkdown**
|
||||
> renderMarkdown(body)
|
||||
> String renderMarkdown(body)
|
||||
|
||||
Render a markdown document as HTML
|
||||
|
||||
|
|
@ -142,7 +142,8 @@ Token.setApiKey("YOUR API KEY");
|
|||
MiscellaneousApi apiInstance = new MiscellaneousApi();
|
||||
MarkdownOption body = new MarkdownOption(); // MarkdownOption |
|
||||
try {
|
||||
apiInstance.renderMarkdown(body);
|
||||
String result = apiInstance.renderMarkdown(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MiscellaneousApi#renderMarkdown");
|
||||
e.printStackTrace();
|
||||
|
|
@ -157,7 +158,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
@ -170,7 +171,7 @@ null (empty response body)
|
|||
|
||||
<a name="renderMarkdownRaw"></a>
|
||||
# **renderMarkdownRaw**
|
||||
> renderMarkdownRaw(body)
|
||||
> String renderMarkdownRaw(body)
|
||||
|
||||
Render raw markdown as HTML
|
||||
|
||||
|
|
@ -223,7 +224,8 @@ Token.setApiKey("YOUR API KEY");
|
|||
MiscellaneousApi apiInstance = new MiscellaneousApi();
|
||||
String body = "body_example"; // String | Request body to render
|
||||
try {
|
||||
apiInstance.renderMarkdownRaw(body);
|
||||
String result = apiInstance.renderMarkdownRaw(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MiscellaneousApi#renderMarkdownRaw");
|
||||
e.printStackTrace();
|
||||
|
|
@ -238,7 +240,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ Name | Type | Description | Notes
|
|||
**fullName** | **String** | | [optional]
|
||||
**id** | **Long** | | [optional]
|
||||
**location** | **String** | | [optional]
|
||||
**repoAdminChangeTeamAccess** | **Boolean** | | [optional]
|
||||
**username** | **String** | | [optional]
|
||||
**visibility** | **String** | | [optional]
|
||||
**website** | **String** | | [optional]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ Method | HTTP request | Description
|
|||
[**orgAddTeamMember**](OrganizationApi.md#orgAddTeamMember) | **PUT** /teams/{id}/members/{username} | Add a team member
|
||||
[**orgAddTeamRepository**](OrganizationApi.md#orgAddTeamRepository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team
|
||||
[**orgConcealMember**](OrganizationApi.md#orgConcealMember) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership
|
||||
[**orgCreate**](OrganizationApi.md#orgCreate) | **POST** /orgs | Create an organization
|
||||
[**orgCreateHook**](OrganizationApi.md#orgCreateHook) | **POST** /orgs/{org}/hooks/ | Create a hook
|
||||
[**orgCreateTeam**](OrganizationApi.md#orgCreateTeam) | **POST** /orgs/{org}/teams | Create a team
|
||||
[**orgDelete**](OrganizationApi.md#orgDelete) | **DELETE** /orgs/{org} | Delete an organization
|
||||
[**orgDeleteHook**](OrganizationApi.md#orgDeleteHook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook
|
||||
[**orgDeleteMember**](OrganizationApi.md#orgDeleteMember) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization
|
||||
[**orgDeleteTeam**](OrganizationApi.md#orgDeleteTeam) | **DELETE** /teams/{id} | Delete a team
|
||||
|
|
@ -26,13 +28,15 @@ Method | HTTP request | Description
|
|||
[**orgListMembers**](OrganizationApi.md#orgListMembers) | **GET** /orgs/{org}/members | List an organization's members
|
||||
[**orgListPublicMembers**](OrganizationApi.md#orgListPublicMembers) | **GET** /orgs/{org}/public_members | List an organization's public members
|
||||
[**orgListRepos**](OrganizationApi.md#orgListRepos) | **GET** /orgs/{org}/repos | List an organization's repos
|
||||
[**orgListTeamMember**](OrganizationApi.md#orgListTeamMember) | **GET** /teams/{id}/members/{username} | List a particular member of team
|
||||
[**orgListTeamMembers**](OrganizationApi.md#orgListTeamMembers) | **GET** /teams/{id}/members | List a team's members
|
||||
[**orgListTeamRepos**](OrganizationApi.md#orgListTeamRepos) | **GET** /teams/{id}/repos | List a team's repos
|
||||
[**orgListTeams**](OrganizationApi.md#orgListTeams) | **GET** /orgs/{org}/teams | List an organization's teams
|
||||
[**orgListUserOrgs**](OrganizationApi.md#orgListUserOrgs) | **GET** /user/{username}/orgs | List a user's organizations
|
||||
[**orgListUserOrgs**](OrganizationApi.md#orgListUserOrgs) | **GET** /users/{username}/orgs | List a user's organizations
|
||||
[**orgPublicizeMember**](OrganizationApi.md#orgPublicizeMember) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership
|
||||
[**orgRemoveTeamMember**](OrganizationApi.md#orgRemoveTeamMember) | **DELETE** /teams/{id}/members/{username} | Remove a team member
|
||||
[**orgRemoveTeamRepository**](OrganizationApi.md#orgRemoveTeamRepository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team
|
||||
[**teamSearch**](OrganizationApi.md#teamSearch) | **GET** /orgs/{org}/teams/search | Search for teams within an organization
|
||||
|
||||
|
||||
<a name="createOrgRepo"></a>
|
||||
|
|
@ -370,9 +374,91 @@ null (empty response body)
|
|||
- **Content-Type**: application/json, text/plain
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="orgCreate"></a>
|
||||
# **orgCreate**
|
||||
> Organization orgCreate(organization)
|
||||
|
||||
Create an organization
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.OrganizationApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
OrganizationApi apiInstance = new OrganizationApi();
|
||||
CreateOrgOption organization = new CreateOrgOption(); // CreateOrgOption |
|
||||
try {
|
||||
Organization result = apiInstance.orgCreate(organization);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#orgCreate");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**organization** | [**CreateOrgOption**](CreateOrgOption.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Organization**](Organization.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="orgCreateHook"></a>
|
||||
# **orgCreateHook**
|
||||
> List<Branch> orgCreateHook(org, body)
|
||||
> Hook orgCreateHook(org, body)
|
||||
|
||||
Create a hook
|
||||
|
||||
|
|
@ -426,7 +512,7 @@ OrganizationApi apiInstance = new OrganizationApi();
|
|||
String org = "org_example"; // String | name of the organization
|
||||
CreateHookOption body = new CreateHookOption(); // CreateHookOption |
|
||||
try {
|
||||
List<Branch> result = apiInstance.orgCreateHook(org, body);
|
||||
Hook result = apiInstance.orgCreateHook(org, body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#orgCreateHook");
|
||||
|
|
@ -443,7 +529,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
[**List<Branch>**](Branch.md)
|
||||
[**Hook**](Hook.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
@ -538,6 +624,87 @@ Name | Type | Description | Notes
|
|||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="orgDelete"></a>
|
||||
# **orgDelete**
|
||||
> orgDelete(org)
|
||||
|
||||
Delete an organization
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.OrganizationApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
OrganizationApi apiInstance = new OrganizationApi();
|
||||
String org = "org_example"; // String | organization that is to be deleted
|
||||
try {
|
||||
apiInstance.orgDelete(org);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#orgDelete");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**org** | **String**| organization that is to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, text/plain
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="orgDeleteHook"></a>
|
||||
# **orgDeleteHook**
|
||||
> orgDeleteHook(org, id)
|
||||
|
|
@ -854,7 +1021,7 @@ try {
|
|||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**org** | **String**| name of the organization to edit |
|
||||
**body** | [**EditOrgOption**](EditOrgOption.md)| | [optional]
|
||||
**body** | [**EditOrgOption**](EditOrgOption.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
|
|
@ -871,7 +1038,7 @@ Name | Type | Description | Notes
|
|||
|
||||
<a name="orgEditHook"></a>
|
||||
# **orgEditHook**
|
||||
> List<Branch> orgEditHook(org, id, body)
|
||||
> Hook orgEditHook(org, id, body)
|
||||
|
||||
Update a hook
|
||||
|
||||
|
|
@ -926,7 +1093,7 @@ String org = "org_example"; // String | name of the organization
|
|||
Long id = 789L; // Long | id of the hook to update
|
||||
EditHookOption body = new EditHookOption(); // EditHookOption |
|
||||
try {
|
||||
List<Branch> result = apiInstance.orgEditHook(org, id, body);
|
||||
Hook result = apiInstance.orgEditHook(org, id, body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#orgEditHook");
|
||||
|
|
@ -944,7 +1111,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
[**List<Branch>**](Branch.md)
|
||||
[**Hook**](Hook.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
@ -1123,7 +1290,7 @@ Name | Type | Description | Notes
|
|||
|
||||
<a name="orgGetHook"></a>
|
||||
# **orgGetHook**
|
||||
> List<Branch> orgGetHook(org, id)
|
||||
> Hook orgGetHook(org, id)
|
||||
|
||||
Get a hook
|
||||
|
||||
|
|
@ -1177,7 +1344,7 @@ OrganizationApi apiInstance = new OrganizationApi();
|
|||
String org = "org_example"; // String | name of the organization
|
||||
Long id = 789L; // Long | id of the hook to get
|
||||
try {
|
||||
List<Branch> result = apiInstance.orgGetHook(org, id);
|
||||
Hook result = apiInstance.orgGetHook(org, id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#orgGetHook");
|
||||
|
|
@ -1194,7 +1361,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
[**List<Branch>**](Branch.md)
|
||||
[**Hook**](Hook.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
@ -1533,7 +1700,7 @@ This endpoint does not need any parameter.
|
|||
|
||||
<a name="orgListHooks"></a>
|
||||
# **orgListHooks**
|
||||
> List<Branch> orgListHooks(org)
|
||||
> List<Hook> orgListHooks(org)
|
||||
|
||||
List an organization's webhooks
|
||||
|
||||
|
|
@ -1586,7 +1753,7 @@ Token.setApiKey("YOUR API KEY");
|
|||
OrganizationApi apiInstance = new OrganizationApi();
|
||||
String org = "org_example"; // String | name of the organization
|
||||
try {
|
||||
List<Branch> result = apiInstance.orgListHooks(org);
|
||||
List<Hook> result = apiInstance.orgListHooks(org);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#orgListHooks");
|
||||
|
|
@ -1602,7 +1769,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
[**List<Branch>**](Branch.md)
|
||||
[**List<Hook>**](Hook.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
@ -1854,6 +2021,90 @@ Name | Type | Description | Notes
|
|||
|
||||
[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
|
||||
|
||||
<a name="orgListTeamMember"></a>
|
||||
# **orgListTeamMember**
|
||||
> User orgListTeamMember(id, username)
|
||||
|
||||
List a particular member of team
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.OrganizationApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
OrganizationApi apiInstance = new OrganizationApi();
|
||||
Long id = 789L; // Long | id of the team
|
||||
String username = "username_example"; // String | username of the member to list
|
||||
try {
|
||||
User result = apiInstance.orgListTeamMember(id, username);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#orgListTeamMember");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Long**| id of the team |
|
||||
**username** | **String**| 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
|
||||
|
|
@ -2440,3 +2691,93 @@ null (empty response body)
|
|||
- **Content-Type**: application/json, text/plain
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="teamSearch"></a>
|
||||
# **teamSearch**
|
||||
> InlineResponse200 teamSearch(org, q, includeDesc, limit, page)
|
||||
|
||||
Search for teams within an organization
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.OrganizationApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
OrganizationApi apiInstance = new OrganizationApi();
|
||||
String org = "org_example"; // String | name of the organization
|
||||
String q = "q_example"; // String | keywords to search
|
||||
Boolean includeDesc = true; // Boolean | include search within team description (defaults to true)
|
||||
Integer limit = 56; // Integer | limit size of results
|
||||
Integer page = 56; // Integer | page number of results to return (1-based)
|
||||
try {
|
||||
InlineResponse200 result = apiInstance.teamSearch(org, q, includeDesc, limit, page);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling OrganizationApi#teamSearch");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**org** | **String**| name of the organization |
|
||||
**q** | **String**| keywords to search | [optional]
|
||||
**includeDesc** | **Boolean**| include search within team description (defaults to true) | [optional]
|
||||
**limit** | **Integer**| limit size of results | [optional]
|
||||
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, text/plain
|
||||
- **Accept**: application/json
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,13 @@
|
|||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**added** | **List<String>** | | [optional]
|
||||
**author** | [**PayloadUser**](PayloadUser.md) | | [optional]
|
||||
**committer** | [**PayloadUser**](PayloadUser.md) | | [optional]
|
||||
**id** | **String** | sha1 hash of the commit | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
**modified** | **List<String>** | | [optional]
|
||||
**removed** | **List<String>** | | [optional]
|
||||
**timestamp** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# Reference
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**object** | [**GitObject**](GitObject.md) | | [optional]
|
||||
**ref** | **String** | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
# RepoCommit
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**author** | [**CommitUser**](CommitUser.md) | | [optional]
|
||||
**committer** | [**CommitUser**](CommitUser.md) | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
**tree** | [**CommitMeta**](CommitMeta.md) | | [optional]
|
||||
**url** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
# RepoTopicOptions
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**topics** | **List<String>** | list of topic names | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -4,20 +4,33 @@
|
|||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**allowMergeCommits** | **Boolean** | | [optional]
|
||||
**allowRebase** | **Boolean** | | [optional]
|
||||
**allowRebaseExplicit** | **Boolean** | | [optional]
|
||||
**allowSquashMerge** | **Boolean** | | [optional]
|
||||
**archived** | **Boolean** | | [optional]
|
||||
**avatarUrl** | **String** | | [optional]
|
||||
**cloneUrl** | **String** | | [optional]
|
||||
**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**defaultBranch** | **String** | | [optional]
|
||||
**description** | **String** | | [optional]
|
||||
**empty** | **Boolean** | | [optional]
|
||||
**externalTracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional]
|
||||
**externalWiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional]
|
||||
**fork** | **Boolean** | | [optional]
|
||||
**forksCount** | **Long** | | [optional]
|
||||
**fullName** | **String** | | [optional]
|
||||
**hasIssues** | **Boolean** | | [optional]
|
||||
**hasPullRequests** | **Boolean** | | [optional]
|
||||
**hasWiki** | **Boolean** | | [optional]
|
||||
**htmlUrl** | **String** | | [optional]
|
||||
**id** | **Long** | | [optional]
|
||||
**ignoreWhitespaceConflicts** | **Boolean** | | [optional]
|
||||
**internalTracker** | [**InternalTracker**](InternalTracker.md) | | [optional]
|
||||
**mirror** | **Boolean** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**openIssuesCount** | **Long** | | [optional]
|
||||
**originalUrl** | **String** | | [optional]
|
||||
**owner** | [**User**](User.md) | | [optional]
|
||||
**parent** | [**Repository**](Repository.md) | | [optional]
|
||||
**permissions** | [**Permission**](Permission.md) | | [optional]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
# Tag
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**commit** | [**CommitMeta**](CommitMeta.md) | | [optional]
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**tarballUrl** | **String** | | [optional]
|
||||
**zipballUrl** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -7,7 +7,9 @@ Name | Type | Description | Notes
|
|||
**description** | **String** | | [optional]
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**organization** | [**Organization**](Organization.md) | | [optional]
|
||||
**permission** | [**PermissionEnum**](#PermissionEnum) | | [optional]
|
||||
**units** | **List<String>** | | [optional]
|
||||
|
||||
|
||||
<a name="PermissionEnum"></a>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
# TopicName
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**topics** | **List<String>** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
# TopicResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**created** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**id** | **Long** | | [optional]
|
||||
**repoCount** | **Long** | | [optional]
|
||||
**topicName** | **String** | | [optional]
|
||||
**updated** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
# UpdateFileOptions
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**author** | [**Identity**](Identity.md) | | [optional]
|
||||
**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional]
|
||||
**committer** | [**Identity**](Identity.md) | | [optional]
|
||||
**content** | **String** | content must be base64 encoded |
|
||||
**fromPath** | **String** | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional]
|
||||
**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional]
|
||||
**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional]
|
||||
**sha** | **String** | sha is the SHA for the file that already exists |
|
||||
|
||||
|
||||
|
||||
|
|
@ -5,10 +5,13 @@
|
|||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**avatarUrl** | **String** | URL to the user's avatar | [optional]
|
||||
**created** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**email** | **String** | | [optional]
|
||||
**fullName** | **String** | the user's full name | [optional]
|
||||
**id** | **Long** | the user's id | [optional]
|
||||
**isAdmin** | **Boolean** | Is the user an administrator | [optional]
|
||||
**language** | **String** | User locale | [optional]
|
||||
**lastLogin** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**login** | **String** | the user's username | [optional]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ Method | HTTP request | Description
|
|||
[**userListRepos**](UserApi.md#userListRepos) | **GET** /users/{username}/repos | List the repos owned by the given user
|
||||
[**userListStarred**](UserApi.md#userListStarred) | **GET** /users/{username}/starred | The repos that the given user has starred
|
||||
[**userListSubscriptions**](UserApi.md#userListSubscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user
|
||||
[**userListTeams**](UserApi.md#userListTeams) | **GET** /user/teams | List all the teams a user belongs to
|
||||
[**userSearch**](UserApi.md#userSearch) | **GET** /users/search | Search for users
|
||||
[**userTrackedTimes**](UserApi.md#userTrackedTimes) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo
|
||||
|
||||
|
|
@ -295,7 +296,7 @@ null (empty response body)
|
|||
|
||||
<a name="userCreateToken"></a>
|
||||
# **userCreateToken**
|
||||
> AccessToken userCreateToken(username, accessTokenName)
|
||||
> userCreateToken(username, accessToken)
|
||||
|
||||
Create an access token
|
||||
|
||||
|
|
@ -347,10 +348,9 @@ Token.setApiKey("YOUR API KEY");
|
|||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | username of user
|
||||
AccessTokenName accessTokenName = new AccessTokenName(); // AccessTokenName |
|
||||
AccessToken accessToken = new AccessToken(); // AccessToken |
|
||||
try {
|
||||
AccessToken result = apiInstance.userCreateToken(username, accessTokenName);
|
||||
System.out.println(result);
|
||||
apiInstance.userCreateToken(username, accessToken);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#userCreateToken");
|
||||
e.printStackTrace();
|
||||
|
|
@ -362,11 +362,11 @@ try {
|
|||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| username of user |
|
||||
**accessTokenName** | [**AccessTokenName**](AccessTokenName.md)| | [optional]
|
||||
**accessToken** | [**AccessToken**](AccessToken.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**AccessToken**](AccessToken.md)
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
@ -3124,6 +3124,84 @@ Name | Type | Description | Notes
|
|||
|
||||
[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
|
||||
|
||||
<a name="userListTeams"></a>
|
||||
# **userListTeams**
|
||||
> List<Team> userListTeams()
|
||||
|
||||
List all the teams a user belongs to
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.gitea.ApiClient;
|
||||
//import io.gitea.ApiException;
|
||||
//import io.gitea.Configuration;
|
||||
//import io.gitea.auth.*;
|
||||
//import io.gitea.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
try {
|
||||
List<Team> result = apiInstance.userListTeams();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#userListTeams");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### 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
|
||||
|
|
@ -3131,7 +3209,7 @@ Name | Type | Description | Notes
|
|||
|
||||
<a name="userSearch"></a>
|
||||
# **userSearch**
|
||||
> UserSearchList userSearch(q, uid, limit)
|
||||
> InlineResponse2001 userSearch(q, uid, limit)
|
||||
|
||||
Search for users
|
||||
|
||||
|
|
@ -3186,7 +3264,7 @@ String q = "q_example"; // String | keyword
|
|||
Long uid = 789L; // Long | ID of the user to search for
|
||||
Integer limit = 56; // Integer | maximum number of users to return
|
||||
try {
|
||||
UserSearchList result = apiInstance.userSearch(q, uid, limit);
|
||||
InlineResponse2001 result = apiInstance.userSearch(q, uid, limit);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#userSearch");
|
||||
|
|
@ -3204,7 +3282,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
[**UserSearchList**](UserSearchList.md)
|
||||
[**InlineResponse2001**](InlineResponse2001.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,5 @@
|
|||
#Tue May 17 23:08:05 CST 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
|
||||
|
|
|
|||
|
|
@ -1,4 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
|
|
@ -6,42 +22,6 @@
|
|||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
|
|
@ -60,6 +40,46 @@ cd "`dirname \"$PRG\"`/" >/dev/null
|
|||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
|
|
@ -85,7 +105,7 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
|
|
@ -105,8 +125,8 @@ if $darwin; then
|
|||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
|
@ -150,11 +170,19 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
|||
|
|
@ -1,90 +1,100 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
|
|
|||
21
pom.xml
21
pom.xml
|
|
@ -31,6 +31,25 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
||||
<version>2.4.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<output>${project.basedir}</output>
|
||||
<inputSpec>${project.basedir}/swagger.v1.json</inputSpec>
|
||||
<language>java</language>
|
||||
<apiPackage>io.gitea.api</apiPackage>
|
||||
<modelPackage>io.gitea.model</modelPackage>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
|
|
@ -307,7 +326,7 @@
|
|||
</repository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<java.version>1.7</java.version>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ package io.gitea;
|
|||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class ApiException extends Exception {
|
||||
private int code = 0;
|
||||
private Map<String, List<String>> responseHeaders = null;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
package io.gitea;
|
||||
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class Configuration {
|
||||
private static ApiClient defaultApiClient = new ApiClient();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import org.threeten.bp.OffsetDateTime;
|
|||
import org.threeten.bp.format.DateTimeFormatter;
|
||||
|
||||
import io.gitea.model.*;
|
||||
import okio.ByteString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
|
|
@ -46,11 +47,13 @@ public class JSON {
|
|||
private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
|
||||
private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
|
||||
private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
|
||||
private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
|
||||
|
||||
public static GsonBuilder createGson() {
|
||||
GsonFireBuilder fireBuilder = new GsonFireBuilder()
|
||||
;
|
||||
return fireBuilder.createGsonBuilder();
|
||||
GsonBuilder builder = fireBuilder.createGsonBuilder();
|
||||
return builder;
|
||||
}
|
||||
|
||||
private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
|
||||
|
|
@ -75,6 +78,7 @@ public class JSON {
|
|||
.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
|
||||
.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
|
||||
.registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
|
||||
.registerTypeAdapter(byte[].class, byteArrayAdapter)
|
||||
.create();
|
||||
}
|
||||
|
||||
|
|
@ -141,6 +145,34 @@ public class JSON {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gson TypeAdapter for Byte Array type
|
||||
*/
|
||||
public class ByteArrayAdapter extends TypeAdapter<byte[]> {
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, byte[] value) throws IOException {
|
||||
if (value == null) {
|
||||
out.nullValue();
|
||||
} else {
|
||||
out.value(ByteString.of(value).base64());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] read(JsonReader in) throws IOException {
|
||||
switch (in.peek()) {
|
||||
case NULL:
|
||||
in.nextNull();
|
||||
return null;
|
||||
default:
|
||||
String bytesAsBase64 = in.nextString();
|
||||
ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
|
||||
return byteString.toByteArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gson TypeAdapter for JSR310 OffsetDateTime type
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
package io.gitea;
|
||||
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class Pair {
|
||||
private String name = "";
|
||||
private String value = "";
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
package io.gitea;
|
||||
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
|
|
|||
|
|
@ -945,4 +945,242 @@ public class AdminApi {
|
|||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for adminGetAllOrgs
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results, maximum page size is 50 (optional)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call adminGetAllOrgsCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/admin/orgs";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
if (page != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
|
||||
if (limit != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "text/plain"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call adminGetAllOrgsValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = adminGetAllOrgsCall(page, limit, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* List all organizations
|
||||
*
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results, maximum page size is 50 (optional)
|
||||
* @return List<Organization>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Organization> adminGetAllOrgs(Integer page, Integer limit) throws ApiException {
|
||||
ApiResponse<List<Organization>> resp = adminGetAllOrgsWithHttpInfo(page, limit);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* List all organizations
|
||||
*
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results, maximum page size is 50 (optional)
|
||||
* @return ApiResponse<List<Organization>>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Organization>> adminGetAllOrgsWithHttpInfo(Integer page, Integer limit) throws ApiException {
|
||||
com.squareup.okhttp.Call call = adminGetAllOrgsValidateBeforeCall(page, limit, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Organization>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* List all organizations (asynchronously)
|
||||
*
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results, maximum page size is 50 (optional)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call adminGetAllOrgsAsync(Integer page, Integer limit, final ApiCallback<List<Organization>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = adminGetAllOrgsValidateBeforeCall(page, limit, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Organization>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for adminGetAllUsers
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call adminGetAllUsersCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/admin/users";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "text/plain"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call adminGetAllUsersValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = adminGetAllUsersCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* List all users
|
||||
*
|
||||
* @return List<User>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<User> adminGetAllUsers() throws ApiException {
|
||||
ApiResponse<List<User>> resp = adminGetAllUsersWithHttpInfo();
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* List all users
|
||||
*
|
||||
* @return ApiResponse<List<User>>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<User>> adminGetAllUsersWithHttpInfo() throws ApiException {
|
||||
com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(null, null);
|
||||
Type localVarReturnType = new TypeToken<List<User>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* List all users (asynchronously)
|
||||
*
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call adminGetAllUsersAsync(final ApiCallback<List<User>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<User>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -723,7 +723,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an issue
|
||||
* Create an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -737,7 +737,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an issue
|
||||
* Create an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -752,7 +752,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an issue (asynchronously)
|
||||
* Create an issue. If using deadline only the date will be taken into account, and time of day ignored. (asynchronously)
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -2029,7 +2029,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Edit an issue
|
||||
* Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -2044,7 +2044,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Edit an issue
|
||||
* Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -2060,7 +2060,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Edit an issue (asynchronously)
|
||||
* Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. (asynchronously)
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -2176,7 +2176,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set an issue deadline. If set to null, the deadline is deleted.
|
||||
* Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -2191,7 +2191,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set an issue deadline. If set to null, the deadline is deleted.
|
||||
* Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -2207,7 +2207,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set an issue deadline. If set to null, the deadline is deleted. (asynchronously)
|
||||
* Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. (asynchronously)
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
|
|
@ -3262,12 +3262,13 @@ public class IssueApi {
|
|||
* Build call for issueGetMilestonesList
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueGetMilestonesListCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public com.squareup.okhttp.Call issueGetMilestonesListCall(String owner, String repo, String state, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
|
|
@ -3277,6 +3278,8 @@ public class IssueApi {
|
|||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
if (state != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("state", state));
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
|
|
@ -3311,7 +3314,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call issueGetMilestonesListValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private com.squareup.okhttp.Call issueGetMilestonesListValidateBeforeCall(String owner, String repo, String state, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'owner' is set
|
||||
if (owner == null) {
|
||||
|
|
@ -3324,48 +3327,51 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = issueGetMilestonesListCall(owner, repo, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = issueGetMilestonesListCall(owner, repo, state, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of a repository's milestones
|
||||
* Get all of a repository's opened milestones
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional)
|
||||
* @return List<Milestone>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Milestone> issueGetMilestonesList(String owner, String repo) throws ApiException {
|
||||
ApiResponse<List<Milestone>> resp = issueGetMilestonesListWithHttpInfo(owner, repo);
|
||||
public List<Milestone> issueGetMilestonesList(String owner, String repo, String state) throws ApiException {
|
||||
ApiResponse<List<Milestone>> resp = issueGetMilestonesListWithHttpInfo(owner, repo, state);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of a repository's milestones
|
||||
* Get all of a repository's opened milestones
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional)
|
||||
* @return ApiResponse<List<Milestone>>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Milestone>> issueGetMilestonesListWithHttpInfo(String owner, String repo) throws ApiException {
|
||||
com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, null, null);
|
||||
public ApiResponse<List<Milestone>> issueGetMilestonesListWithHttpInfo(String owner, String repo, String state) throws ApiException {
|
||||
com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, state, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Milestone>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of a repository's milestones (asynchronously)
|
||||
* Get all of a repository's opened milestones (asynchronously)
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueGetMilestonesListAsync(String owner, String repo, final ApiCallback<List<Milestone>> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call issueGetMilestonesListAsync(String owner, String repo, String state, final ApiCallback<List<Milestone>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -3386,7 +3392,7 @@ public class IssueApi {
|
|||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, state, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Milestone>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
|
|
@ -3535,6 +3541,7 @@ public class IssueApi {
|
|||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state whether issue is open or closed (optional)
|
||||
* @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional)
|
||||
* @param page page number of requested issues (optional)
|
||||
* @param q search string (optional)
|
||||
* @param progressListener Progress listener
|
||||
|
|
@ -3542,7 +3549,7 @@ public class IssueApi {
|
|||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueListIssuesCall(String owner, String repo, String state, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public com.squareup.okhttp.Call issueListIssuesCall(String owner, String repo, String state, String labels, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
|
|
@ -3554,6 +3561,8 @@ public class IssueApi {
|
|||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
if (state != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("state", state));
|
||||
if (labels != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("labels", labels));
|
||||
if (page != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
|
||||
if (q != null)
|
||||
|
|
@ -3592,7 +3601,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call issueListIssuesValidateBeforeCall(String owner, String repo, String state, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private com.squareup.okhttp.Call issueListIssuesValidateBeforeCall(String owner, String repo, String state, String labels, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'owner' is set
|
||||
if (owner == null) {
|
||||
|
|
@ -3605,7 +3614,7 @@ public class IssueApi {
|
|||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = issueListIssuesCall(owner, repo, state, page, q, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = issueListIssuesCall(owner, repo, state, labels, page, q, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
|
@ -3616,13 +3625,14 @@ public class IssueApi {
|
|||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state whether issue is open or closed (optional)
|
||||
* @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional)
|
||||
* @param page page number of requested issues (optional)
|
||||
* @param q search string (optional)
|
||||
* @return List<Issue>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Issue> issueListIssues(String owner, String repo, String state, Integer page, String q) throws ApiException {
|
||||
ApiResponse<List<Issue>> resp = issueListIssuesWithHttpInfo(owner, repo, state, page, q);
|
||||
public List<Issue> issueListIssues(String owner, String repo, String state, String labels, Integer page, String q) throws ApiException {
|
||||
ApiResponse<List<Issue>> resp = issueListIssuesWithHttpInfo(owner, repo, state, labels, page, q);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
|
|
@ -3632,13 +3642,14 @@ public class IssueApi {
|
|||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state whether issue is open or closed (optional)
|
||||
* @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional)
|
||||
* @param page page number of requested issues (optional)
|
||||
* @param q search string (optional)
|
||||
* @return ApiResponse<List<Issue>>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Issue>> issueListIssuesWithHttpInfo(String owner, String repo, String state, Integer page, String q) throws ApiException {
|
||||
com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, page, q, null, null);
|
||||
public ApiResponse<List<Issue>> issueListIssuesWithHttpInfo(String owner, String repo, String state, String labels, Integer page, String q) throws ApiException {
|
||||
com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, labels, page, q, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Issue>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
|
@ -3649,13 +3660,14 @@ public class IssueApi {
|
|||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param state whether issue is open or closed (optional)
|
||||
* @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional)
|
||||
* @param page page number of requested issues (optional)
|
||||
* @param q search string (optional)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueListIssuesAsync(String owner, String repo, String state, Integer page, String q, final ApiCallback<List<Issue>> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call issueListIssuesAsync(String owner, String repo, String state, String labels, Integer page, String q, final ApiCallback<List<Issue>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -3676,7 +3688,7 @@ public class IssueApi {
|
|||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, page, q, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, labels, page, q, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Issue>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
|
|
@ -4110,6 +4122,284 @@ public class IssueApi {
|
|||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for issueStartStopWatch
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to create the stopwatch on (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueStartStopWatchCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/repos/{owner}/{repo}/issues/{index}/stopwatch/start"
|
||||
.replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString()))
|
||||
.replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString()))
|
||||
.replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call issueStartStopWatchValidateBeforeCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'owner' is set
|
||||
if (owner == null) {
|
||||
throw new ApiException("Missing the required parameter 'owner' when calling issueStartStopWatch(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'repo' is set
|
||||
if (repo == null) {
|
||||
throw new ApiException("Missing the required parameter 'repo' when calling issueStartStopWatch(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'index' is set
|
||||
if (index == null) {
|
||||
throw new ApiException("Missing the required parameter 'index' when calling issueStartStopWatch(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = issueStartStopWatchCall(owner, repo, index, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Start stopwatch on an issue.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to create the stopwatch on (required)
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void issueStartStopWatch(String owner, String repo, Long index) throws ApiException {
|
||||
issueStartStopWatchWithHttpInfo(owner, repo, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start stopwatch on an issue.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to create the stopwatch on (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> issueStartStopWatchWithHttpInfo(String owner, String repo, Long index) throws ApiException {
|
||||
com.squareup.okhttp.Call call = issueStartStopWatchValidateBeforeCall(owner, repo, index, null, null);
|
||||
return apiClient.execute(call);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start stopwatch on an issue. (asynchronously)
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to create the stopwatch on (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueStartStopWatchAsync(String owner, String repo, Long index, final ApiCallback<Void> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = issueStartStopWatchValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for issueStopWatch
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to stop the stopwatch on (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueStopWatchCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop"
|
||||
.replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString()))
|
||||
.replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString()))
|
||||
.replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call issueStopWatchValidateBeforeCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'owner' is set
|
||||
if (owner == null) {
|
||||
throw new ApiException("Missing the required parameter 'owner' when calling issueStopWatch(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'repo' is set
|
||||
if (repo == null) {
|
||||
throw new ApiException("Missing the required parameter 'repo' when calling issueStopWatch(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'index' is set
|
||||
if (index == null) {
|
||||
throw new ApiException("Missing the required parameter 'index' when calling issueStopWatch(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = issueStopWatchCall(owner, repo, index, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop an issue's existing stopwatch.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to stop the stopwatch on (required)
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void issueStopWatch(String owner, String repo, Long index) throws ApiException {
|
||||
issueStopWatchWithHttpInfo(owner, repo, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop an issue's existing stopwatch.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to stop the stopwatch on (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> issueStopWatchWithHttpInfo(String owner, String repo, Long index) throws ApiException {
|
||||
com.squareup.okhttp.Call call = issueStopWatchValidateBeforeCall(owner, repo, index, null, null);
|
||||
return apiClient.execute(call);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop an issue's existing stopwatch. (asynchronously)
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue to stop the stopwatch on (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call issueStopWatchAsync(String owner, String repo, Long index, final ApiCallback<Void> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = issueStopWatchValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for issueTrackedTimes
|
||||
* @param owner owner of the repo (required)
|
||||
|
|
|
|||
|
|
@ -230,22 +230,25 @@ public class MiscellaneousApi {
|
|||
* Render a markdown document as HTML
|
||||
*
|
||||
* @param body (optional)
|
||||
* @return String
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void renderMarkdown(MarkdownOption body) throws ApiException {
|
||||
renderMarkdownWithHttpInfo(body);
|
||||
public String renderMarkdown(MarkdownOption body) throws ApiException {
|
||||
ApiResponse<String> resp = renderMarkdownWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a markdown document as HTML
|
||||
*
|
||||
* @param body (optional)
|
||||
* @return ApiResponse<Void>
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> renderMarkdownWithHttpInfo(MarkdownOption body) throws ApiException {
|
||||
public ApiResponse<String> renderMarkdownWithHttpInfo(MarkdownOption body) throws ApiException {
|
||||
com.squareup.okhttp.Call call = renderMarkdownValidateBeforeCall(body, null, null);
|
||||
return apiClient.execute(call);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -256,7 +259,7 @@ public class MiscellaneousApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call renderMarkdownAsync(MarkdownOption body, final ApiCallback<Void> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call renderMarkdownAsync(MarkdownOption body, final ApiCallback<String> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -278,7 +281,8 @@ public class MiscellaneousApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = renderMarkdownValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
|
|
@ -348,22 +352,25 @@ public class MiscellaneousApi {
|
|||
* Render raw markdown as HTML
|
||||
*
|
||||
* @param body Request body to render (required)
|
||||
* @return String
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void renderMarkdownRaw(String body) throws ApiException {
|
||||
renderMarkdownRawWithHttpInfo(body);
|
||||
public String renderMarkdownRaw(String body) throws ApiException {
|
||||
ApiResponse<String> resp = renderMarkdownRawWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render raw markdown as HTML
|
||||
*
|
||||
* @param body Request body to render (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> renderMarkdownRawWithHttpInfo(String body) throws ApiException {
|
||||
public ApiResponse<String> renderMarkdownRawWithHttpInfo(String body) throws ApiException {
|
||||
com.squareup.okhttp.Call call = renderMarkdownRawValidateBeforeCall(body, null, null);
|
||||
return apiClient.execute(call);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -374,7 +381,7 @@ public class MiscellaneousApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call renderMarkdownRawAsync(String body, final ApiCallback<Void> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call renderMarkdownRawAsync(String body, final ApiCallback<String> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -396,7 +403,8 @@ public class MiscellaneousApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = renderMarkdownRawValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,15 @@ import com.google.gson.reflect.TypeToken;
|
|||
import java.io.IOException;
|
||||
|
||||
|
||||
import io.gitea.model.Branch;
|
||||
import io.gitea.model.CreateHookOption;
|
||||
import io.gitea.model.CreateOrgOption;
|
||||
import io.gitea.model.CreateRepoOption;
|
||||
import io.gitea.model.CreateTeamOption;
|
||||
import io.gitea.model.EditHookOption;
|
||||
import io.gitea.model.EditOrgOption;
|
||||
import io.gitea.model.EditTeamOption;
|
||||
import io.gitea.model.Hook;
|
||||
import io.gitea.model.InlineResponse200;
|
||||
import io.gitea.model.Organization;
|
||||
import io.gitea.model.Repository;
|
||||
import io.gitea.model.Team;
|
||||
|
|
@ -588,6 +590,128 @@ public class OrganizationApi {
|
|||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for orgCreate
|
||||
* @param organization (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgCreateCall(CreateOrgOption organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = organization;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/orgs";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call orgCreateValidateBeforeCall(CreateOrgOption organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'organization' is set
|
||||
if (organization == null) {
|
||||
throw new ApiException("Missing the required parameter 'organization' when calling orgCreate(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = orgCreateCall(organization, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an organization
|
||||
*
|
||||
* @param organization (required)
|
||||
* @return Organization
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Organization orgCreate(CreateOrgOption organization) throws ApiException {
|
||||
ApiResponse<Organization> resp = orgCreateWithHttpInfo(organization);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an organization
|
||||
*
|
||||
* @param organization (required)
|
||||
* @return ApiResponse<Organization>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Organization> orgCreateWithHttpInfo(CreateOrgOption organization) throws ApiException {
|
||||
com.squareup.okhttp.Call call = orgCreateValidateBeforeCall(organization, null, null);
|
||||
Type localVarReturnType = new TypeToken<Organization>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an organization (asynchronously)
|
||||
*
|
||||
* @param organization (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgCreateAsync(CreateOrgOption organization, final ApiCallback<Organization> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = orgCreateValidateBeforeCall(organization, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Organization>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for orgCreateHook
|
||||
* @param org name of the organization (required)
|
||||
|
|
@ -663,11 +787,11 @@ public class OrganizationApi {
|
|||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param body (required)
|
||||
* @return List<Branch>
|
||||
* @return Hook
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Branch> orgCreateHook(String org, CreateHookOption body) throws ApiException {
|
||||
ApiResponse<List<Branch>> resp = orgCreateHookWithHttpInfo(org, body);
|
||||
public Hook orgCreateHook(String org, CreateHookOption body) throws ApiException {
|
||||
ApiResponse<Hook> resp = orgCreateHookWithHttpInfo(org, body);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
|
|
@ -676,12 +800,12 @@ public class OrganizationApi {
|
|||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param body (required)
|
||||
* @return ApiResponse<List<Branch>>
|
||||
* @return ApiResponse<Hook>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Branch>> orgCreateHookWithHttpInfo(String org, CreateHookOption body) throws ApiException {
|
||||
public ApiResponse<Hook> orgCreateHookWithHttpInfo(String org, CreateHookOption body) throws ApiException {
|
||||
com.squareup.okhttp.Call call = orgCreateHookValidateBeforeCall(org, body, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<Hook>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
|
|
@ -694,7 +818,7 @@ public class OrganizationApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgCreateHookAsync(String org, CreateHookOption body, final ApiCallback<List<Branch>> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call orgCreateHookAsync(String org, CreateHookOption body, final ApiCallback<Hook> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -716,7 +840,7 @@ public class OrganizationApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = orgCreateHookValidateBeforeCall(org, body, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<Hook>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
|
|
@ -847,6 +971,125 @@ public class OrganizationApi {
|
|||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for orgDelete
|
||||
* @param org organization that is to be deleted (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgDeleteCall(String org, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/orgs/{org}"
|
||||
.replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "text/plain"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call orgDeleteValidateBeforeCall(String org, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'org' is set
|
||||
if (org == null) {
|
||||
throw new ApiException("Missing the required parameter 'org' when calling orgDelete(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = orgDeleteCall(org, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an organization
|
||||
*
|
||||
* @param org organization that is to be deleted (required)
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void orgDelete(String org) throws ApiException {
|
||||
orgDeleteWithHttpInfo(org);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an organization
|
||||
*
|
||||
* @param org organization that is to be deleted (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> orgDeleteWithHttpInfo(String org) throws ApiException {
|
||||
com.squareup.okhttp.Call call = orgDeleteValidateBeforeCall(org, null, null);
|
||||
return apiClient.execute(call);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an organization (asynchronously)
|
||||
*
|
||||
* @param org organization that is to be deleted (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgDeleteAsync(String org, final ApiCallback<Void> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = orgDeleteValidateBeforeCall(org, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for orgDeleteHook
|
||||
* @param org name of the organization (required)
|
||||
|
|
@ -1227,7 +1470,7 @@ public class OrganizationApi {
|
|||
/**
|
||||
* Build call for orgEdit
|
||||
* @param org name of the organization to edit (required)
|
||||
* @param body (optional)
|
||||
* @param body (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
|
|
@ -1283,6 +1526,11 @@ public class OrganizationApi {
|
|||
throw new ApiException("Missing the required parameter 'org' when calling orgEdit(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException("Missing the required parameter 'body' when calling orgEdit(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = orgEditCall(org, body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
|
@ -1293,7 +1541,7 @@ public class OrganizationApi {
|
|||
* Edit an organization
|
||||
*
|
||||
* @param org name of the organization to edit (required)
|
||||
* @param body (optional)
|
||||
* @param body (required)
|
||||
* @return Organization
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
|
|
@ -1306,7 +1554,7 @@ public class OrganizationApi {
|
|||
* Edit an organization
|
||||
*
|
||||
* @param org name of the organization to edit (required)
|
||||
* @param body (optional)
|
||||
* @param body (required)
|
||||
* @return ApiResponse<Organization>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
|
|
@ -1320,7 +1568,7 @@ public class OrganizationApi {
|
|||
* Edit an organization (asynchronously)
|
||||
*
|
||||
* @param org name of the organization to edit (required)
|
||||
* @param body (optional)
|
||||
* @param body (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
|
|
@ -1429,11 +1677,11 @@ public class OrganizationApi {
|
|||
* @param org name of the organization (required)
|
||||
* @param id id of the hook to update (required)
|
||||
* @param body (optional)
|
||||
* @return List<Branch>
|
||||
* @return Hook
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Branch> orgEditHook(String org, Long id, EditHookOption body) throws ApiException {
|
||||
ApiResponse<List<Branch>> resp = orgEditHookWithHttpInfo(org, id, body);
|
||||
public Hook orgEditHook(String org, Long id, EditHookOption body) throws ApiException {
|
||||
ApiResponse<Hook> resp = orgEditHookWithHttpInfo(org, id, body);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
|
|
@ -1443,12 +1691,12 @@ public class OrganizationApi {
|
|||
* @param org name of the organization (required)
|
||||
* @param id id of the hook to update (required)
|
||||
* @param body (optional)
|
||||
* @return ApiResponse<List<Branch>>
|
||||
* @return ApiResponse<Hook>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Branch>> orgEditHookWithHttpInfo(String org, Long id, EditHookOption body) throws ApiException {
|
||||
public ApiResponse<Hook> orgEditHookWithHttpInfo(String org, Long id, EditHookOption body) throws ApiException {
|
||||
com.squareup.okhttp.Call call = orgEditHookValidateBeforeCall(org, id, body, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<Hook>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
|
|
@ -1462,7 +1710,7 @@ public class OrganizationApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgEditHookAsync(String org, Long id, EditHookOption body, final ApiCallback<List<Branch>> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call orgEditHookAsync(String org, Long id, EditHookOption body, final ApiCallback<Hook> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -1484,7 +1732,7 @@ public class OrganizationApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = orgEditHookValidateBeforeCall(org, id, body, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<Hook>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
|
|
@ -1814,11 +2062,11 @@ public class OrganizationApi {
|
|||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param id id of the hook to get (required)
|
||||
* @return List<Branch>
|
||||
* @return Hook
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Branch> orgGetHook(String org, Long id) throws ApiException {
|
||||
ApiResponse<List<Branch>> resp = orgGetHookWithHttpInfo(org, id);
|
||||
public Hook orgGetHook(String org, Long id) throws ApiException {
|
||||
ApiResponse<Hook> resp = orgGetHookWithHttpInfo(org, id);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
|
|
@ -1827,12 +2075,12 @@ public class OrganizationApi {
|
|||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param id id of the hook to get (required)
|
||||
* @return ApiResponse<List<Branch>>
|
||||
* @return ApiResponse<Hook>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Branch>> orgGetHookWithHttpInfo(String org, Long id) throws ApiException {
|
||||
public ApiResponse<Hook> orgGetHookWithHttpInfo(String org, Long id) throws ApiException {
|
||||
com.squareup.okhttp.Call call = orgGetHookValidateBeforeCall(org, id, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<Hook>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
|
|
@ -1845,7 +2093,7 @@ public class OrganizationApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgGetHookAsync(String org, Long id, final ApiCallback<List<Branch>> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call orgGetHookAsync(String org, Long id, final ApiCallback<Hook> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -1867,7 +2115,7 @@ public class OrganizationApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = orgGetHookValidateBeforeCall(org, id, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<Hook>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
|
|
@ -2433,11 +2681,11 @@ public class OrganizationApi {
|
|||
* List an organization's webhooks
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @return List<Branch>
|
||||
* @return List<Hook>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Branch> orgListHooks(String org) throws ApiException {
|
||||
ApiResponse<List<Branch>> resp = orgListHooksWithHttpInfo(org);
|
||||
public List<Hook> orgListHooks(String org) throws ApiException {
|
||||
ApiResponse<List<Hook>> resp = orgListHooksWithHttpInfo(org);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
|
|
@ -2445,12 +2693,12 @@ public class OrganizationApi {
|
|||
* List an organization's webhooks
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @return ApiResponse<List<Branch>>
|
||||
* @return ApiResponse<List<Hook>>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Branch>> orgListHooksWithHttpInfo(String org) throws ApiException {
|
||||
public ApiResponse<List<Hook>> orgListHooksWithHttpInfo(String org) throws ApiException {
|
||||
com.squareup.okhttp.Call call = orgListHooksValidateBeforeCall(org, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<List<Hook>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
|
|
@ -2462,7 +2710,7 @@ public class OrganizationApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgListHooksAsync(String org, final ApiCallback<List<Branch>> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call orgListHooksAsync(String org, final ApiCallback<List<Hook>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -2484,7 +2732,7 @@ public class OrganizationApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = orgListHooksValidateBeforeCall(org, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Branch>>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<List<Hook>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
|
|
@ -2857,6 +3105,139 @@ public class OrganizationApi {
|
|||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for orgListTeamMember
|
||||
* @param id id of the team (required)
|
||||
* @param username username of the member to list (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgListTeamMemberCall(Long id, String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/teams/{id}/members/{username}"
|
||||
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
|
||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "text/plain"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call orgListTeamMemberValidateBeforeCall(Long id, String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'id' is set
|
||||
if (id == null) {
|
||||
throw new ApiException("Missing the required parameter 'id' when calling orgListTeamMember(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
throw new ApiException("Missing the required parameter 'username' when calling orgListTeamMember(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = orgListTeamMemberCall(id, username, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* List a particular member of team
|
||||
*
|
||||
* @param id id of the team (required)
|
||||
* @param username username of the member to list (required)
|
||||
* @return User
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public User orgListTeamMember(Long id, String username) throws ApiException {
|
||||
ApiResponse<User> resp = orgListTeamMemberWithHttpInfo(id, username);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* List a particular member of team
|
||||
*
|
||||
* @param id id of the team (required)
|
||||
* @param username username of the member to list (required)
|
||||
* @return ApiResponse<User>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<User> orgListTeamMemberWithHttpInfo(Long id, String username) throws ApiException {
|
||||
com.squareup.okhttp.Call call = orgListTeamMemberValidateBeforeCall(id, username, null, null);
|
||||
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* List a particular member of team (asynchronously)
|
||||
*
|
||||
* @param id id of the team (required)
|
||||
* @param username username of the member to list (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call orgListTeamMemberAsync(Long id, String username, final ApiCallback<User> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = orgListTeamMemberValidateBeforeCall(id, username, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for orgListTeamMembers
|
||||
* @param id id of the team (required)
|
||||
|
|
@ -3238,7 +3619,7 @@ public class OrganizationApi {
|
|||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/{username}/orgs"
|
||||
String localVarPath = "/users/{username}/orgs"
|
||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
|
|
@ -3746,4 +4127,151 @@ public class OrganizationApi {
|
|||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for teamSearch
|
||||
* @param org name of the organization (required)
|
||||
* @param q keywords to search (optional)
|
||||
* @param includeDesc include search within team description (defaults to true) (optional)
|
||||
* @param limit limit size of results (optional)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call teamSearchCall(String org, String q, Boolean includeDesc, Integer limit, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/orgs/{org}/teams/search"
|
||||
.replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
if (q != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("q", q));
|
||||
if (includeDesc != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("include_desc", includeDesc));
|
||||
if (limit != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
|
||||
if (page != null)
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "text/plain"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call teamSearchValidateBeforeCall(String org, String q, Boolean includeDesc, Integer limit, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'org' is set
|
||||
if (org == null) {
|
||||
throw new ApiException("Missing the required parameter 'org' when calling teamSearch(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = teamSearchCall(org, q, includeDesc, limit, page, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for teams within an organization
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param q keywords to search (optional)
|
||||
* @param includeDesc include search within team description (defaults to true) (optional)
|
||||
* @param limit limit size of results (optional)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @return InlineResponse200
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public InlineResponse200 teamSearch(String org, String q, Boolean includeDesc, Integer limit, Integer page) throws ApiException {
|
||||
ApiResponse<InlineResponse200> resp = teamSearchWithHttpInfo(org, q, includeDesc, limit, page);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for teams within an organization
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param q keywords to search (optional)
|
||||
* @param includeDesc include search within team description (defaults to true) (optional)
|
||||
* @param limit limit size of results (optional)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @return ApiResponse<InlineResponse200>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<InlineResponse200> teamSearchWithHttpInfo(String org, String q, Boolean includeDesc, Integer limit, Integer page) throws ApiException {
|
||||
com.squareup.okhttp.Call call = teamSearchValidateBeforeCall(org, q, includeDesc, limit, page, null, null);
|
||||
Type localVarReturnType = new TypeToken<InlineResponse200>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for teams within an organization (asynchronously)
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param q keywords to search (optional)
|
||||
* @param includeDesc include search within team description (defaults to true) (optional)
|
||||
* @param limit limit size of results (optional)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call teamSearchAsync(String org, String q, Boolean includeDesc, Integer limit, Integer page, final ApiCallback<InlineResponse200> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = teamSearchValidateBeforeCall(org, q, includeDesc, limit, page, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<InlineResponse200>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -28,7 +28,6 @@ import java.io.IOException;
|
|||
|
||||
|
||||
import io.gitea.model.AccessToken;
|
||||
import io.gitea.model.AccessTokenName;
|
||||
import io.gitea.model.CreateEmailOption;
|
||||
import io.gitea.model.CreateGPGKeyOption;
|
||||
import io.gitea.model.CreateKeyOption;
|
||||
|
|
@ -36,12 +35,13 @@ import io.gitea.model.CreateRepoOption;
|
|||
import io.gitea.model.DeleteEmailOption;
|
||||
import io.gitea.model.Email;
|
||||
import io.gitea.model.GPGKey;
|
||||
import io.gitea.model.InlineResponse2001;
|
||||
import io.gitea.model.PublicKey;
|
||||
import io.gitea.model.Repository;
|
||||
import io.gitea.model.Team;
|
||||
import io.gitea.model.TrackedTime;
|
||||
import io.gitea.model.User;
|
||||
import io.gitea.model.UserHeatmapData;
|
||||
import io.gitea.model.UserSearchList;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -434,14 +434,14 @@ public class UserApi {
|
|||
/**
|
||||
* Build call for userCreateToken
|
||||
* @param username username of user (required)
|
||||
* @param accessTokenName (optional)
|
||||
* @param accessToken (optional)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call userCreateTokenCall(String username, AccessTokenName accessTokenName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = accessTokenName;
|
||||
public com.squareup.okhttp.Call userCreateTokenCall(String username, AccessToken accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = accessToken;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/users/{username}/tokens"
|
||||
|
|
@ -483,7 +483,7 @@ public class UserApi {
|
|||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String username, AccessTokenName accessTokenName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String username, AccessToken accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
|
|
@ -491,7 +491,7 @@ public class UserApi {
|
|||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = userCreateTokenCall(username, accessTokenName, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = userCreateTokenCall(username, accessToken, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
|
@ -500,39 +500,36 @@ public class UserApi {
|
|||
* Create an access token
|
||||
*
|
||||
* @param username username of user (required)
|
||||
* @param accessTokenName (optional)
|
||||
* @return AccessToken
|
||||
* @param accessToken (optional)
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public AccessToken userCreateToken(String username, AccessTokenName accessTokenName) throws ApiException {
|
||||
ApiResponse<AccessToken> resp = userCreateTokenWithHttpInfo(username, accessTokenName);
|
||||
return resp.getData();
|
||||
public void userCreateToken(String username, AccessToken accessToken) throws ApiException {
|
||||
userCreateTokenWithHttpInfo(username, accessToken);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an access token
|
||||
*
|
||||
* @param username username of user (required)
|
||||
* @param accessTokenName (optional)
|
||||
* @return ApiResponse<AccessToken>
|
||||
* @param accessToken (optional)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<AccessToken> userCreateTokenWithHttpInfo(String username, AccessTokenName accessTokenName) throws ApiException {
|
||||
com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessTokenName, null, null);
|
||||
Type localVarReturnType = new TypeToken<AccessToken>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
public ApiResponse<Void> userCreateTokenWithHttpInfo(String username, AccessToken accessToken) throws ApiException {
|
||||
com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessToken, null, null);
|
||||
return apiClient.execute(call);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an access token (asynchronously)
|
||||
*
|
||||
* @param username username of user (required)
|
||||
* @param accessTokenName (optional)
|
||||
* @param accessToken (optional)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call userCreateTokenAsync(String username, AccessTokenName accessTokenName, final ApiCallback<AccessToken> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call userCreateTokenAsync(String username, AccessToken accessToken, final ApiCallback<Void> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -553,9 +550,8 @@ public class UserApi {
|
|||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessTokenName, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<AccessToken>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessToken, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
|
|
@ -4634,6 +4630,119 @@ public class UserApi {
|
|||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for userListTeams
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call userListTeamsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/teams";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "text/plain"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call userListTeamsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = userListTeamsCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* List all the teams a user belongs to
|
||||
*
|
||||
* @return List<Team>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public List<Team> userListTeams() throws ApiException {
|
||||
ApiResponse<List<Team>> resp = userListTeamsWithHttpInfo();
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* List all the teams a user belongs to
|
||||
*
|
||||
* @return ApiResponse<List<Team>>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Team>> userListTeamsWithHttpInfo() throws ApiException {
|
||||
com.squareup.okhttp.Call call = userListTeamsValidateBeforeCall(null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Team>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* List all the teams a user belongs to (asynchronously)
|
||||
*
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call userListTeamsAsync(final ApiCallback<List<Team>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = userListTeamsValidateBeforeCall(progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<List<Team>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for userSearch
|
||||
* @param q keyword (optional)
|
||||
|
|
@ -4706,11 +4815,11 @@ public class UserApi {
|
|||
* @param q keyword (optional)
|
||||
* @param uid ID of the user to search for (optional)
|
||||
* @param limit maximum number of users to return (optional)
|
||||
* @return UserSearchList
|
||||
* @return InlineResponse2001
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public UserSearchList userSearch(String q, Long uid, Integer limit) throws ApiException {
|
||||
ApiResponse<UserSearchList> resp = userSearchWithHttpInfo(q, uid, limit);
|
||||
public InlineResponse2001 userSearch(String q, Long uid, Integer limit) throws ApiException {
|
||||
ApiResponse<InlineResponse2001> resp = userSearchWithHttpInfo(q, uid, limit);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
|
|
@ -4720,12 +4829,12 @@ public class UserApi {
|
|||
* @param q keyword (optional)
|
||||
* @param uid ID of the user to search for (optional)
|
||||
* @param limit maximum number of users to return (optional)
|
||||
* @return ApiResponse<UserSearchList>
|
||||
* @return ApiResponse<InlineResponse2001>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<UserSearchList> userSearchWithHttpInfo(String q, Long uid, Integer limit) throws ApiException {
|
||||
public ApiResponse<InlineResponse2001> userSearchWithHttpInfo(String q, Long uid, Integer limit) throws ApiException {
|
||||
com.squareup.okhttp.Call call = userSearchValidateBeforeCall(q, uid, limit, null, null);
|
||||
Type localVarReturnType = new TypeToken<UserSearchList>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<InlineResponse2001>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
|
|
@ -4739,7 +4848,7 @@ public class UserApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call userSearchAsync(String q, Long uid, Integer limit, final ApiCallback<UserSearchList> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call userSearchAsync(String q, Long uid, Integer limit, final ApiCallback<InlineResponse2001> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -4761,7 +4870,7 @@ public class UserApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = userSearchValidateBeforeCall(q, uid, limit, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<UserSearchList>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<InlineResponse2001>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import io.gitea.Pair;
|
|||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class ApiKeyAuth implements Authentication {
|
||||
private final String location;
|
||||
private final String paramName;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import io.gitea.Pair;
|
|||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class OAuth implements Authentication {
|
||||
private String accessToken;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* APIError is an api error with a message
|
||||
*/
|
||||
@ApiModel(description = "APIError is an api error with a message")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class APIError {
|
||||
@SerializedName("message")
|
||||
private String message = null;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url = null;
|
||||
|
||||
public APIError message(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get message
|
||||
* @return message
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public APIError url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
* @return url
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
APIError apIError = (APIError) o;
|
||||
return Objects.equals(this.message, apIError.message) &&
|
||||
Objects.equals(this.url, apIError.url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(message, url);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class APIError {\n");
|
||||
|
||||
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -24,38 +25,13 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* AccessToken represents a API access token.
|
||||
* AccessToken
|
||||
*/
|
||||
@ApiModel(description = "AccessToken represents a API access token.")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class AccessToken {
|
||||
@SerializedName("id")
|
||||
private Long id = null;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
@SerializedName("sha1")
|
||||
private String sha1 = null;
|
||||
|
||||
public AccessToken id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public AccessToken name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
|
|
@ -65,7 +41,7 @@ public class AccessToken {
|
|||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
|
@ -74,24 +50,6 @@ public class AccessToken {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
public AccessToken sha1(String sha1) {
|
||||
this.sha1 = sha1;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sha1
|
||||
* @return sha1
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getSha1() {
|
||||
return sha1;
|
||||
}
|
||||
|
||||
public void setSha1(String sha1) {
|
||||
this.sha1 = sha1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
|
@ -102,14 +60,12 @@ public class AccessToken {
|
|||
return false;
|
||||
}
|
||||
AccessToken accessToken = (AccessToken) o;
|
||||
return Objects.equals(this.id, accessToken.id) &&
|
||||
Objects.equals(this.name, accessToken.name) &&
|
||||
Objects.equals(this.sha1, accessToken.sha1);
|
||||
return Objects.equals(this.name, accessToken.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, sha1);
|
||||
return Objects.hash(name);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -118,9 +74,7 @@ public class AccessToken {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AccessToken {\n");
|
||||
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" sha1: ").append(toIndentedString(sha1)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -27,7 +28,7 @@ import java.io.IOException;
|
|||
* AddCollaboratorOption options when adding a user as a collaborator of a repository
|
||||
*/
|
||||
@ApiModel(description = "AddCollaboratorOption options when adding a user as a collaborator of a repository")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class AddCollaboratorOption {
|
||||
@SerializedName("permission")
|
||||
private String permission = null;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -27,7 +28,7 @@ import java.io.IOException;
|
|||
* AddTimeOption options for adding time to an issue
|
||||
*/
|
||||
@ApiModel(description = "AddTimeOption options for adding time to an issue")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class AddTimeOption {
|
||||
@SerializedName("time")
|
||||
private Long time = null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,236 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.gitea.model.AnnotatedTagObject;
|
||||
import io.gitea.model.CommitUser;
|
||||
import io.gitea.model.PayloadCommitVerification;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* AnnotatedTag represents an annotated tag
|
||||
*/
|
||||
@ApiModel(description = "AnnotatedTag represents an annotated tag")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class AnnotatedTag {
|
||||
@SerializedName("message")
|
||||
private String message = null;
|
||||
|
||||
@SerializedName("object")
|
||||
private AnnotatedTagObject object = null;
|
||||
|
||||
@SerializedName("sha")
|
||||
private String sha = null;
|
||||
|
||||
@SerializedName("tag")
|
||||
private String tag = null;
|
||||
|
||||
@SerializedName("tagger")
|
||||
private CommitUser tagger = null;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url = null;
|
||||
|
||||
@SerializedName("verification")
|
||||
private PayloadCommitVerification verification = null;
|
||||
|
||||
public AnnotatedTag message(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get message
|
||||
* @return message
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public AnnotatedTag object(AnnotatedTagObject object) {
|
||||
this.object = object;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get object
|
||||
* @return object
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public AnnotatedTagObject getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public void setObject(AnnotatedTagObject object) {
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
public AnnotatedTag sha(String sha) {
|
||||
this.sha = sha;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sha
|
||||
* @return sha
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getSha() {
|
||||
return sha;
|
||||
}
|
||||
|
||||
public void setSha(String sha) {
|
||||
this.sha = sha;
|
||||
}
|
||||
|
||||
public AnnotatedTag tag(String tag) {
|
||||
this.tag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tag
|
||||
* @return tag
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public AnnotatedTag tagger(CommitUser tagger) {
|
||||
this.tagger = tagger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tagger
|
||||
* @return tagger
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public CommitUser getTagger() {
|
||||
return tagger;
|
||||
}
|
||||
|
||||
public void setTagger(CommitUser tagger) {
|
||||
this.tagger = tagger;
|
||||
}
|
||||
|
||||
public AnnotatedTag url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
* @return url
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public AnnotatedTag verification(PayloadCommitVerification verification) {
|
||||
this.verification = verification;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get verification
|
||||
* @return verification
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public PayloadCommitVerification getVerification() {
|
||||
return verification;
|
||||
}
|
||||
|
||||
public void setVerification(PayloadCommitVerification verification) {
|
||||
this.verification = verification;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AnnotatedTag annotatedTag = (AnnotatedTag) o;
|
||||
return Objects.equals(this.message, annotatedTag.message) &&
|
||||
Objects.equals(this.object, annotatedTag.object) &&
|
||||
Objects.equals(this.sha, annotatedTag.sha) &&
|
||||
Objects.equals(this.tag, annotatedTag.tag) &&
|
||||
Objects.equals(this.tagger, annotatedTag.tagger) &&
|
||||
Objects.equals(this.url, annotatedTag.url) &&
|
||||
Objects.equals(this.verification, annotatedTag.verification);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(message, object, sha, tag, tagger, url, verification);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AnnotatedTag {\n");
|
||||
|
||||
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||
sb.append(" object: ").append(toIndentedString(object)).append("\n");
|
||||
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
|
||||
sb.append(" tag: ").append(toIndentedString(tag)).append("\n");
|
||||
sb.append(" tagger: ").append(toIndentedString(tagger)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append(" verification: ").append(toIndentedString(verification)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* AnnotatedTagObject contains meta information of the tag object
|
||||
*/
|
||||
@ApiModel(description = "AnnotatedTagObject contains meta information of the tag object")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class AnnotatedTagObject {
|
||||
@SerializedName("sha")
|
||||
private String sha = null;
|
||||
|
||||
@SerializedName("type")
|
||||
private String type = null;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url = null;
|
||||
|
||||
public AnnotatedTagObject sha(String sha) {
|
||||
this.sha = sha;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sha
|
||||
* @return sha
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getSha() {
|
||||
return sha;
|
||||
}
|
||||
|
||||
public void setSha(String sha) {
|
||||
this.sha = sha;
|
||||
}
|
||||
|
||||
public AnnotatedTagObject type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public AnnotatedTagObject url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
* @return url
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AnnotatedTagObject annotatedTagObject = (AnnotatedTagObject) o;
|
||||
return Objects.equals(this.sha, annotatedTagObject.sha) &&
|
||||
Objects.equals(this.type, annotatedTagObject.type) &&
|
||||
Objects.equals(this.url, annotatedTagObject.url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(sha, type, url);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AnnotatedTagObject {\n");
|
||||
|
||||
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -28,7 +29,7 @@ import org.threeten.bp.OffsetDateTime;
|
|||
* Attachment a generic attachment
|
||||
*/
|
||||
@ApiModel(description = "Attachment a generic attachment")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class Attachment {
|
||||
@SerializedName("browser_download_url")
|
||||
private String browserDownloadUrl = null;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -28,7 +29,7 @@ import java.io.IOException;
|
|||
* Branch represents a repository branch
|
||||
*/
|
||||
@ApiModel(description = "Branch represents a repository branch")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class Branch {
|
||||
@SerializedName("commit")
|
||||
private PayloadCommit commit = null;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -29,7 +30,7 @@ import org.threeten.bp.OffsetDateTime;
|
|||
* Comment represents a comment on a commit or issue
|
||||
*/
|
||||
@ApiModel(description = "Comment represents a comment on a commit or issue")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class Comment {
|
||||
@SerializedName("body")
|
||||
private String body = null;
|
||||
|
|
@ -46,6 +47,12 @@ public class Comment {
|
|||
@SerializedName("issue_url")
|
||||
private String issueUrl = null;
|
||||
|
||||
@SerializedName("original_author")
|
||||
private String originalAuthor = null;
|
||||
|
||||
@SerializedName("original_author_id")
|
||||
private Long originalAuthorId = null;
|
||||
|
||||
@SerializedName("pull_request_url")
|
||||
private String pullRequestUrl = null;
|
||||
|
||||
|
|
@ -145,6 +152,42 @@ public class Comment {
|
|||
this.issueUrl = issueUrl;
|
||||
}
|
||||
|
||||
public Comment originalAuthor(String originalAuthor) {
|
||||
this.originalAuthor = originalAuthor;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get originalAuthor
|
||||
* @return originalAuthor
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getOriginalAuthor() {
|
||||
return originalAuthor;
|
||||
}
|
||||
|
||||
public void setOriginalAuthor(String originalAuthor) {
|
||||
this.originalAuthor = originalAuthor;
|
||||
}
|
||||
|
||||
public Comment originalAuthorId(Long originalAuthorId) {
|
||||
this.originalAuthorId = originalAuthorId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get originalAuthorId
|
||||
* @return originalAuthorId
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Long getOriginalAuthorId() {
|
||||
return originalAuthorId;
|
||||
}
|
||||
|
||||
public void setOriginalAuthorId(Long originalAuthorId) {
|
||||
this.originalAuthorId = originalAuthorId;
|
||||
}
|
||||
|
||||
public Comment pullRequestUrl(String pullRequestUrl) {
|
||||
this.pullRequestUrl = pullRequestUrl;
|
||||
return this;
|
||||
|
|
@ -214,6 +257,8 @@ public class Comment {
|
|||
Objects.equals(this.htmlUrl, comment.htmlUrl) &&
|
||||
Objects.equals(this.id, comment.id) &&
|
||||
Objects.equals(this.issueUrl, comment.issueUrl) &&
|
||||
Objects.equals(this.originalAuthor, comment.originalAuthor) &&
|
||||
Objects.equals(this.originalAuthorId, comment.originalAuthorId) &&
|
||||
Objects.equals(this.pullRequestUrl, comment.pullRequestUrl) &&
|
||||
Objects.equals(this.updatedAt, comment.updatedAt) &&
|
||||
Objects.equals(this.user, comment.user);
|
||||
|
|
@ -221,7 +266,7 @@ public class Comment {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(body, createdAt, htmlUrl, id, issueUrl, pullRequestUrl, updatedAt, user);
|
||||
return Objects.hash(body, createdAt, htmlUrl, id, issueUrl, originalAuthor, originalAuthorId, pullRequestUrl, updatedAt, user);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -235,6 +280,8 @@ public class Comment {
|
|||
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" issueUrl: ").append(toIndentedString(issueUrl)).append("\n");
|
||||
sb.append(" originalAuthor: ").append(toIndentedString(originalAuthor)).append("\n");
|
||||
sb.append(" originalAuthorId: ").append(toIndentedString(originalAuthorId)).append("\n");
|
||||
sb.append(" pullRequestUrl: ").append(toIndentedString(pullRequestUrl)).append("\n");
|
||||
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
|
||||
sb.append(" user: ").append(toIndentedString(user)).append("\n");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,245 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.gitea.model.CommitMeta;
|
||||
import io.gitea.model.RepoCommit;
|
||||
import io.gitea.model.User;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Commit
|
||||
*/
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class Commit {
|
||||
@SerializedName("author")
|
||||
private User author = null;
|
||||
|
||||
@SerializedName("commit")
|
||||
private RepoCommit commit = null;
|
||||
|
||||
@SerializedName("committer")
|
||||
private User committer = null;
|
||||
|
||||
@SerializedName("html_url")
|
||||
private String htmlUrl = null;
|
||||
|
||||
@SerializedName("parents")
|
||||
private List<CommitMeta> parents = null;
|
||||
|
||||
@SerializedName("sha")
|
||||
private String sha = null;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url = null;
|
||||
|
||||
public Commit author(User author) {
|
||||
this.author = author;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get author
|
||||
* @return author
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public User getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(User author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public Commit commit(RepoCommit commit) {
|
||||
this.commit = commit;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get commit
|
||||
* @return commit
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public RepoCommit getCommit() {
|
||||
return commit;
|
||||
}
|
||||
|
||||
public void setCommit(RepoCommit commit) {
|
||||
this.commit = commit;
|
||||
}
|
||||
|
||||
public Commit committer(User committer) {
|
||||
this.committer = committer;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get committer
|
||||
* @return committer
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public User getCommitter() {
|
||||
return committer;
|
||||
}
|
||||
|
||||
public void setCommitter(User committer) {
|
||||
this.committer = committer;
|
||||
}
|
||||
|
||||
public Commit htmlUrl(String htmlUrl) {
|
||||
this.htmlUrl = htmlUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get htmlUrl
|
||||
* @return htmlUrl
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getHtmlUrl() {
|
||||
return htmlUrl;
|
||||
}
|
||||
|
||||
public void setHtmlUrl(String htmlUrl) {
|
||||
this.htmlUrl = htmlUrl;
|
||||
}
|
||||
|
||||
public Commit parents(List<CommitMeta> parents) {
|
||||
this.parents = parents;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Commit addParentsItem(CommitMeta parentsItem) {
|
||||
if (this.parents == null) {
|
||||
this.parents = new ArrayList<CommitMeta>();
|
||||
}
|
||||
this.parents.add(parentsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parents
|
||||
* @return parents
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<CommitMeta> getParents() {
|
||||
return parents;
|
||||
}
|
||||
|
||||
public void setParents(List<CommitMeta> parents) {
|
||||
this.parents = parents;
|
||||
}
|
||||
|
||||
public Commit sha(String sha) {
|
||||
this.sha = sha;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sha
|
||||
* @return sha
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getSha() {
|
||||
return sha;
|
||||
}
|
||||
|
||||
public void setSha(String sha) {
|
||||
this.sha = sha;
|
||||
}
|
||||
|
||||
public Commit url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
* @return url
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Commit commit = (Commit) o;
|
||||
return Objects.equals(this.author, commit.author) &&
|
||||
Objects.equals(this.commit, commit.commit) &&
|
||||
Objects.equals(this.committer, commit.committer) &&
|
||||
Objects.equals(this.htmlUrl, commit.htmlUrl) &&
|
||||
Objects.equals(this.parents, commit.parents) &&
|
||||
Objects.equals(this.sha, commit.sha) &&
|
||||
Objects.equals(this.url, commit.url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(author, commit, committer, htmlUrl, parents, sha, url);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Commit {\n");
|
||||
|
||||
sb.append(" author: ").append(toIndentedString(author)).append("\n");
|
||||
sb.append(" commit: ").append(toIndentedString(commit)).append("\n");
|
||||
sb.append(" committer: ").append(toIndentedString(committer)).append("\n");
|
||||
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
|
||||
sb.append(" parents: ").append(toIndentedString(parents)).append("\n");
|
||||
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* CommitMeta
|
||||
*/
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class CommitMeta {
|
||||
@SerializedName("sha")
|
||||
private String sha = null;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url = null;
|
||||
|
||||
public CommitMeta sha(String sha) {
|
||||
this.sha = sha;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sha
|
||||
* @return sha
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getSha() {
|
||||
return sha;
|
||||
}
|
||||
|
||||
public void setSha(String sha) {
|
||||
this.sha = sha;
|
||||
}
|
||||
|
||||
public CommitMeta url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
* @return url
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CommitMeta commitMeta = (CommitMeta) o;
|
||||
return Objects.equals(this.sha, commitMeta.sha) &&
|
||||
Objects.equals(this.url, commitMeta.url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(sha, url);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CommitMeta {\n");
|
||||
|
||||
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* CommitUser
|
||||
*/
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class CommitUser {
|
||||
@SerializedName("date")
|
||||
private String date = null;
|
||||
|
||||
@SerializedName("email")
|
||||
private String email = null;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
public CommitUser date(String date) {
|
||||
this.date = date;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date
|
||||
* @return date
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public CommitUser email(String email) {
|
||||
this.email = email;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get email
|
||||
* @return email
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public CommitUser name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CommitUser commitUser = (CommitUser) o;
|
||||
return Objects.equals(this.date, commitUser.date) &&
|
||||
Objects.equals(this.email, commitUser.email) &&
|
||||
Objects.equals(this.name, commitUser.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(date, email, name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CommitUser {\n");
|
||||
|
||||
sb.append(" date: ").append(toIndentedString(date)).append("\n");
|
||||
sb.append(" email: ").append(toIndentedString(email)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,395 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.gitea.model.FileLinksResponse;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
|
||||
*/
|
||||
@ApiModel(description = "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class ContentsResponse {
|
||||
@SerializedName("_links")
|
||||
private FileLinksResponse links = null;
|
||||
|
||||
@SerializedName("content")
|
||||
private String content = null;
|
||||
|
||||
@SerializedName("download_url")
|
||||
private String downloadUrl = null;
|
||||
|
||||
@SerializedName("encoding")
|
||||
private String encoding = null;
|
||||
|
||||
@SerializedName("git_url")
|
||||
private String gitUrl = null;
|
||||
|
||||
@SerializedName("html_url")
|
||||
private String htmlUrl = null;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
@SerializedName("path")
|
||||
private String path = null;
|
||||
|
||||
@SerializedName("sha")
|
||||
private String sha = null;
|
||||
|
||||
@SerializedName("size")
|
||||
private Long size = null;
|
||||
|
||||
@SerializedName("submodule_git_url")
|
||||
private String submoduleGitUrl = null;
|
||||
|
||||
@SerializedName("target")
|
||||
private String target = null;
|
||||
|
||||
@SerializedName("type")
|
||||
private String type = null;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url = null;
|
||||
|
||||
public ContentsResponse links(FileLinksResponse links) {
|
||||
this.links = links;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get links
|
||||
* @return links
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public FileLinksResponse getLinks() {
|
||||
return links;
|
||||
}
|
||||
|
||||
public void setLinks(FileLinksResponse links) {
|
||||
this.links = links;
|
||||
}
|
||||
|
||||
public ContentsResponse content(String content) {
|
||||
this.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* `content` is populated when `type` is `file`, otherwise null
|
||||
* @return content
|
||||
**/
|
||||
@ApiModelProperty(value = "`content` is populated when `type` is `file`, otherwise null")
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public ContentsResponse downloadUrl(String downloadUrl) {
|
||||
this.downloadUrl = downloadUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get downloadUrl
|
||||
* @return downloadUrl
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getDownloadUrl() {
|
||||
return downloadUrl;
|
||||
}
|
||||
|
||||
public void setDownloadUrl(String downloadUrl) {
|
||||
this.downloadUrl = downloadUrl;
|
||||
}
|
||||
|
||||
public ContentsResponse encoding(String encoding) {
|
||||
this.encoding = encoding;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* `encoding` is populated when `type` is `file`, otherwise null
|
||||
* @return encoding
|
||||
**/
|
||||
@ApiModelProperty(value = "`encoding` is populated when `type` is `file`, otherwise null")
|
||||
public String getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
public void setEncoding(String encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
public ContentsResponse gitUrl(String gitUrl) {
|
||||
this.gitUrl = gitUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gitUrl
|
||||
* @return gitUrl
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getGitUrl() {
|
||||
return gitUrl;
|
||||
}
|
||||
|
||||
public void setGitUrl(String gitUrl) {
|
||||
this.gitUrl = gitUrl;
|
||||
}
|
||||
|
||||
public ContentsResponse htmlUrl(String htmlUrl) {
|
||||
this.htmlUrl = htmlUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get htmlUrl
|
||||
* @return htmlUrl
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getHtmlUrl() {
|
||||
return htmlUrl;
|
||||
}
|
||||
|
||||
public void setHtmlUrl(String htmlUrl) {
|
||||
this.htmlUrl = htmlUrl;
|
||||
}
|
||||
|
||||
public ContentsResponse name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ContentsResponse path(String path) {
|
||||
this.path = path;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path
|
||||
* @return path
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public ContentsResponse sha(String sha) {
|
||||
this.sha = sha;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sha
|
||||
* @return sha
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getSha() {
|
||||
return sha;
|
||||
}
|
||||
|
||||
public void setSha(String sha) {
|
||||
this.sha = sha;
|
||||
}
|
||||
|
||||
public ContentsResponse size(Long size) {
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get size
|
||||
* @return size
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Long getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(Long size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public ContentsResponse submoduleGitUrl(String submoduleGitUrl) {
|
||||
this.submoduleGitUrl = submoduleGitUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* `submodule_git_url` is populated when `type` is `submodule`, otherwise null
|
||||
* @return submoduleGitUrl
|
||||
**/
|
||||
@ApiModelProperty(value = "`submodule_git_url` is populated when `type` is `submodule`, otherwise null")
|
||||
public String getSubmoduleGitUrl() {
|
||||
return submoduleGitUrl;
|
||||
}
|
||||
|
||||
public void setSubmoduleGitUrl(String submoduleGitUrl) {
|
||||
this.submoduleGitUrl = submoduleGitUrl;
|
||||
}
|
||||
|
||||
public ContentsResponse target(String target) {
|
||||
this.target = target;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* `target` is populated when `type` is `symlink`, otherwise null
|
||||
* @return target
|
||||
**/
|
||||
@ApiModelProperty(value = "`target` is populated when `type` is `symlink`, otherwise null")
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public ContentsResponse type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* `type` will be `file`, `dir`, `symlink`, or `submodule`
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(value = "`type` will be `file`, `dir`, `symlink`, or `submodule`")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public ContentsResponse url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
* @return url
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ContentsResponse contentsResponse = (ContentsResponse) o;
|
||||
return Objects.equals(this.links, contentsResponse.links) &&
|
||||
Objects.equals(this.content, contentsResponse.content) &&
|
||||
Objects.equals(this.downloadUrl, contentsResponse.downloadUrl) &&
|
||||
Objects.equals(this.encoding, contentsResponse.encoding) &&
|
||||
Objects.equals(this.gitUrl, contentsResponse.gitUrl) &&
|
||||
Objects.equals(this.htmlUrl, contentsResponse.htmlUrl) &&
|
||||
Objects.equals(this.name, contentsResponse.name) &&
|
||||
Objects.equals(this.path, contentsResponse.path) &&
|
||||
Objects.equals(this.sha, contentsResponse.sha) &&
|
||||
Objects.equals(this.size, contentsResponse.size) &&
|
||||
Objects.equals(this.submoduleGitUrl, contentsResponse.submoduleGitUrl) &&
|
||||
Objects.equals(this.target, contentsResponse.target) &&
|
||||
Objects.equals(this.type, contentsResponse.type) &&
|
||||
Objects.equals(this.url, contentsResponse.url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(links, content, downloadUrl, encoding, gitUrl, htmlUrl, name, path, sha, size, submoduleGitUrl, target, type, url);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ContentsResponse {\n");
|
||||
|
||||
sb.append(" links: ").append(toIndentedString(links)).append("\n");
|
||||
sb.append(" content: ").append(toIndentedString(content)).append("\n");
|
||||
sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n");
|
||||
sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n");
|
||||
sb.append(" gitUrl: ").append(toIndentedString(gitUrl)).append("\n");
|
||||
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" path: ").append(toIndentedString(path)).append("\n");
|
||||
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
|
||||
sb.append(" size: ").append(toIndentedString(size)).append("\n");
|
||||
sb.append(" submoduleGitUrl: ").append(toIndentedString(submoduleGitUrl)).append("\n");
|
||||
sb.append(" target: ").append(toIndentedString(target)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -29,7 +30,7 @@ import java.util.List;
|
|||
* CreateEmailOption options when creating email addresses
|
||||
*/
|
||||
@ApiModel(description = "CreateEmailOption options when creating email addresses")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class CreateEmailOption {
|
||||
@SerializedName("emails")
|
||||
private List<String> emails = null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,211 @@
|
|||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: 1.1.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.gitea.model.Identity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
|
||||
*/
|
||||
@ApiModel(description = "CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class CreateFileOptions {
|
||||
@SerializedName("author")
|
||||
private Identity author = null;
|
||||
|
||||
@SerializedName("branch")
|
||||
private String branch = null;
|
||||
|
||||
@SerializedName("committer")
|
||||
private Identity committer = null;
|
||||
|
||||
@SerializedName("content")
|
||||
private String content = null;
|
||||
|
||||
@SerializedName("message")
|
||||
private String message = null;
|
||||
|
||||
@SerializedName("new_branch")
|
||||
private String newBranch = null;
|
||||
|
||||
public CreateFileOptions author(Identity author) {
|
||||
this.author = author;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get author
|
||||
* @return author
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Identity getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(Identity author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public CreateFileOptions branch(String branch) {
|
||||
this.branch = branch;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* branch (optional) to base this file from. if not given, the default branch is used
|
||||
* @return branch
|
||||
**/
|
||||
@ApiModelProperty(value = "branch (optional) to base this file from. if not given, the default branch is used")
|
||||
public String getBranch() {
|
||||
return branch;
|
||||
}
|
||||
|
||||
public void setBranch(String branch) {
|
||||
this.branch = branch;
|
||||
}
|
||||
|
||||
public CreateFileOptions committer(Identity committer) {
|
||||
this.committer = committer;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get committer
|
||||
* @return committer
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Identity getCommitter() {
|
||||
return committer;
|
||||
}
|
||||
|
||||
public void setCommitter(Identity committer) {
|
||||
this.committer = committer;
|
||||
}
|
||||
|
||||
public CreateFileOptions content(String content) {
|
||||
this.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* content must be base64 encoded
|
||||
* @return content
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "content must be base64 encoded")
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public CreateFileOptions message(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* message (optional) for the commit of this file. if not supplied, a default message will be used
|
||||
* @return message
|
||||
**/
|
||||
@ApiModelProperty(value = "message (optional) for the commit of this file. if not supplied, a default message will be used")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public CreateFileOptions newBranch(String newBranch) {
|
||||
this.newBranch = newBranch;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* new_branch (optional) will make a new branch from `branch` before creating the file
|
||||
* @return newBranch
|
||||
**/
|
||||
@ApiModelProperty(value = "new_branch (optional) will make a new branch from `branch` before creating the file")
|
||||
public String getNewBranch() {
|
||||
return newBranch;
|
||||
}
|
||||
|
||||
public void setNewBranch(String newBranch) {
|
||||
this.newBranch = newBranch;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreateFileOptions createFileOptions = (CreateFileOptions) o;
|
||||
return Objects.equals(this.author, createFileOptions.author) &&
|
||||
Objects.equals(this.branch, createFileOptions.branch) &&
|
||||
Objects.equals(this.committer, createFileOptions.committer) &&
|
||||
Objects.equals(this.content, createFileOptions.content) &&
|
||||
Objects.equals(this.message, createFileOptions.message) &&
|
||||
Objects.equals(this.newBranch, createFileOptions.newBranch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(author, branch, committer, content, message, newBranch);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CreateFileOptions {\n");
|
||||
|
||||
sb.append(" author: ").append(toIndentedString(author)).append("\n");
|
||||
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
|
||||
sb.append(" committer: ").append(toIndentedString(committer)).append("\n");
|
||||
sb.append(" content: ").append(toIndentedString(content)).append("\n");
|
||||
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||
sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -27,7 +28,7 @@ import java.io.IOException;
|
|||
* CreateForkOption options for creating a fork
|
||||
*/
|
||||
@ApiModel(description = "CreateForkOption options for creating a fork")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class CreateForkOption {
|
||||
@SerializedName("organization")
|
||||
private String organization = null;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
package io.gitea.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -27,7 +28,7 @@ import java.io.IOException;
|
|||
* CreateGPGKeyOption options create user GPG key
|
||||
*/
|
||||
@ApiModel(description = "CreateGPGKeyOption options create user GPG key")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z")
|
||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
|
||||
public class CreateGPGKeyOption {
|
||||
@SerializedName("armored_public_key")
|
||||
private String armoredPublicKey = null;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue