Skip to content

Update API #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.4.8
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk8
- openjdk11
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ if(hasProperty('target') && target == 'android') {

javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
classpath = sourceSets.main.compileClasspath

options
{
Expand All @@ -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'
}
11 changes: 11 additions & 0 deletions docs/APIError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# APIError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **String** | | [optional]
**url** | **String** | | [optional]



4 changes: 1 addition & 3 deletions docs/AccessToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
**name** | **String** | | [optional]
**sha1** | **String** | | [optional]
**name** | **String** | |



164 changes: 164 additions & 0 deletions docs/AdminApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -595,3 +597,165 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json

<a name="adminGetAllOrgs"></a>
# **adminGetAllOrgs**
> List&lt;Organization&gt; 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&lt;Organization&gt;**](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&lt;User&gt; 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&lt;User&gt;**](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

16 changes: 16 additions & 0 deletions docs/AnnotatedTag.md
Original file line number Diff line number Diff line change
@@ -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]



12 changes: 12 additions & 0 deletions docs/AnnotatedTagObject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# AnnotatedTagObject

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sha** | **String** | | [optional]
**type** | **String** | | [optional]
**url** | **String** | | [optional]



2 changes: 2 additions & 0 deletions docs/Comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
16 changes: 16 additions & 0 deletions docs/Commit.md
Original file line number Diff line number Diff line change
@@ -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&lt;CommitMeta&gt;**](CommitMeta.md) | | [optional]
**sha** | **String** | | [optional]
**url** | **String** | | [optional]



11 changes: 11 additions & 0 deletions docs/CommitMeta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# CommitMeta

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sha** | **String** | | [optional]
**url** | **String** | | [optional]



12 changes: 12 additions & 0 deletions docs/CommitUser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# CommitUser

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**date** | **String** | | [optional]
**email** | **String** | | [optional]
**name** | **String** | | [optional]



23 changes: 23 additions & 0 deletions docs/ContentsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# ContentsResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**links** | [**FileLinksResponse**](FileLinksResponse.md) | | [optional]
**content** | **String** | &#x60;content&#x60; is populated when &#x60;type&#x60; is &#x60;file&#x60;, otherwise null | [optional]
**downloadUrl** | **String** | | [optional]
**encoding** | **String** | &#x60;encoding&#x60; is populated when &#x60;type&#x60; is &#x60;file&#x60;, otherwise null | [optional]
**gitUrl** | **String** | | [optional]
**htmlUrl** | **String** | | [optional]
**name** | **String** | | [optional]
**path** | **String** | | [optional]
**sha** | **String** | | [optional]
**size** | **Long** | | [optional]
**submoduleGitUrl** | **String** | &#x60;submodule_git_url&#x60; is populated when &#x60;type&#x60; is &#x60;submodule&#x60;, otherwise null | [optional]
**target** | **String** | &#x60;target&#x60; is populated when &#x60;type&#x60; is &#x60;symlink&#x60;, otherwise null | [optional]
**type** | **String** | &#x60;type&#x60; will be &#x60;file&#x60;, &#x60;dir&#x60;, &#x60;symlink&#x60;, or &#x60;submodule&#x60; | [optional]
**url** | **String** | | [optional]



15 changes: 15 additions & 0 deletions docs/CreateFileOptions.md
Original file line number Diff line number Diff line change
@@ -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 &#x60;branch&#x60; before creating the file | [optional]



1 change: 1 addition & 0 deletions docs/CreateHookOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**active** | **Boolean** | | [optional]
**branchFilter** | **String** | | [optional]
**config** | **Map&lt;String, String&gt;** | |
**events** | **List&lt;String&gt;** | | [optional]
**type** | [**TypeEnum**](#TypeEnum) | |
Expand Down
1 change: 1 addition & 0 deletions docs/CreateLabelOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**color** | **String** | |
**description** | **String** | | [optional]
**name** | **String** | |


Expand Down
11 changes: 11 additions & 0 deletions docs/CreateOrgOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 &#x60;public&#x60; (default), &#x60;limited&#x60; or &#x60;private&#x60; | [optional]
**website** | **String** | | [optional]


<a name="VisibilityEnum"></a>
## Enum: VisibilityEnum
Name | Value
---- | -----
PUBLIC | &quot;public&quot;
LIMITED | &quot;limited&quot;
PRIVATE | &quot;private&quot;



1 change: 1 addition & 0 deletions docs/CreateRepoOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading