4027 lines
148 KiB
Markdown
4027 lines
148 KiB
Markdown
# RepositoryApi
|
|
|
|
All URIs are relative to *http://localhost/api/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**createCurrentUserRepo**](RepositoryApi.md#createCurrentUserRepo) | **POST** /user/repos | Create a repository
|
|
[**createFork**](RepositoryApi.md#createFork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository
|
|
[**listForks**](RepositoryApi.md#listForks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks
|
|
[**repoAddCollaborator**](RepositoryApi.md#repoAddCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository
|
|
[**repoCheckCollaborator**](RepositoryApi.md#repoCheckCollaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository
|
|
[**repoCreateHook**](RepositoryApi.md#repoCreateHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook
|
|
[**repoCreateKey**](RepositoryApi.md#repoCreateKey) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository
|
|
[**repoCreatePullRequest**](RepositoryApi.md#repoCreatePullRequest) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request
|
|
[**repoCreateRelease**](RepositoryApi.md#repoCreateRelease) | **POST** /repos/{owner}/{repo}/releases | Create a release
|
|
[**repoCreateReleaseAttachment**](RepositoryApi.md#repoCreateReleaseAttachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment
|
|
[**repoCreateStatus**](RepositoryApi.md#repoCreateStatus) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status
|
|
[**repoDelete**](RepositoryApi.md#repoDelete) | **DELETE** /repos/{owner}/{repo} | Delete a repository
|
|
[**repoDeleteCollaborator**](RepositoryApi.md#repoDeleteCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository
|
|
[**repoDeleteHook**](RepositoryApi.md#repoDeleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository
|
|
[**repoDeleteKey**](RepositoryApi.md#repoDeleteKey) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository
|
|
[**repoDeleteRelease**](RepositoryApi.md#repoDeleteRelease) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release
|
|
[**repoDeleteReleaseAttachment**](RepositoryApi.md#repoDeleteReleaseAttachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment
|
|
[**repoEditHook**](RepositoryApi.md#repoEditHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository
|
|
[**repoEditPullRequest**](RepositoryApi.md#repoEditPullRequest) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request
|
|
[**repoEditRelease**](RepositoryApi.md#repoEditRelease) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release
|
|
[**repoEditReleaseAttachment**](RepositoryApi.md#repoEditReleaseAttachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment
|
|
[**repoGet**](RepositoryApi.md#repoGet) | **GET** /repos/{owner}/{repo} | Get a repository
|
|
[**repoGetArchive**](RepositoryApi.md#repoGetArchive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository
|
|
[**repoGetBranch**](RepositoryApi.md#repoGetBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | List a repository's branches
|
|
[**repoGetByID**](RepositoryApi.md#repoGetByID) | **GET** /repositories/{id} | Get a repository by id
|
|
[**repoGetCombinedStatusByRef**](RepositoryApi.md#repoGetCombinedStatusByRef) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's combined status, by branch/tag/commit reference
|
|
[**repoGetEditorConfig**](RepositoryApi.md#repoGetEditorConfig) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository
|
|
[**repoGetHook**](RepositoryApi.md#repoGetHook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook
|
|
[**repoGetKey**](RepositoryApi.md#repoGetKey) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id
|
|
[**repoGetPullRequest**](RepositoryApi.md#repoGetPullRequest) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request
|
|
[**repoGetRawFile**](RepositoryApi.md#repoGetRawFile) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository
|
|
[**repoGetRelease**](RepositoryApi.md#repoGetRelease) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release
|
|
[**repoGetReleaseAttachment**](RepositoryApi.md#repoGetReleaseAttachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment
|
|
[**repoListBranches**](RepositoryApi.md#repoListBranches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches
|
|
[**repoListCollaborators**](RepositoryApi.md#repoListCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators
|
|
[**repoListHooks**](RepositoryApi.md#repoListHooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository
|
|
[**repoListKeys**](RepositoryApi.md#repoListKeys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys
|
|
[**repoListPullRequests**](RepositoryApi.md#repoListPullRequests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests
|
|
[**repoListReleaseAttachments**](RepositoryApi.md#repoListReleaseAttachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments
|
|
[**repoListReleases**](RepositoryApi.md#repoListReleases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases
|
|
[**repoListStargazers**](RepositoryApi.md#repoListStargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers
|
|
[**repoListStatuses**](RepositoryApi.md#repoListStatuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses
|
|
[**repoListSubscribers**](RepositoryApi.md#repoListSubscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers
|
|
[**repoMergePullRequest**](RepositoryApi.md#repoMergePullRequest) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request
|
|
[**repoMigrate**](RepositoryApi.md#repoMigrate) | **POST** /repos/migrate | Migrate a remote git repository
|
|
[**repoMirrorSync**](RepositoryApi.md#repoMirrorSync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository
|
|
[**repoPullRequestIsMerged**](RepositoryApi.md#repoPullRequestIsMerged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged
|
|
[**repoSearch**](RepositoryApi.md#repoSearch) | **GET** /repos/search | Search for repositories
|
|
[**repoTestHook**](RepositoryApi.md#repoTestHook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook
|
|
[**repoTrackedTimes**](RepositoryApi.md#repoTrackedTimes) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times
|
|
[**topicSearch**](RepositoryApi.md#topicSearch) | **GET** /topics/search | search topics via keyword
|
|
[**userCurrentCheckSubscription**](RepositoryApi.md#userCurrentCheckSubscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo
|
|
[**userCurrentDeleteSubscription**](RepositoryApi.md#userCurrentDeleteSubscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo
|
|
[**userCurrentPutSubscription**](RepositoryApi.md#userCurrentPutSubscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo
|
|
|
|
|
|
<a name="createCurrentUserRepo"></a>
|
|
# **createCurrentUserRepo**
|
|
> Repository createCurrentUserRepo(body)
|
|
|
|
Create a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
CreateRepoOption body = new CreateRepoOption(); // CreateRepoOption |
|
|
try {
|
|
Repository result = apiInstance.createCurrentUserRepo(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#createCurrentUserRepo");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**CreateRepoOption**](CreateRepoOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="createFork"></a>
|
|
# **createFork**
|
|
> Repository createFork(owner, repo, body)
|
|
|
|
Fork a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo to fork
|
|
String repo = "repo_example"; // String | name of the repo to fork
|
|
CreateForkOption body = new CreateForkOption(); // CreateForkOption |
|
|
try {
|
|
Repository result = apiInstance.createFork(owner, repo, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#createFork");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo to fork |
|
|
**repo** | **String**| name of the repo to fork |
|
|
**body** | [**CreateForkOption**](CreateForkOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="listForks"></a>
|
|
# **listForks**
|
|
> List<Repository> listForks(owner, repo)
|
|
|
|
List a repository's forks
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
List<Repository> result = apiInstance.listForks(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#listForks");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**List<Repository>**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoAddCollaborator"></a>
|
|
# **repoAddCollaborator**
|
|
> repoAddCollaborator(owner, repo, collaborator, body)
|
|
|
|
Add a collaborator to a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String collaborator = "collaborator_example"; // String | username of the collaborator to add
|
|
AddCollaboratorOption body = new AddCollaboratorOption(); // AddCollaboratorOption |
|
|
try {
|
|
apiInstance.repoAddCollaborator(owner, repo, collaborator, body);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoAddCollaborator");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**collaborator** | **String**| username of the collaborator to add |
|
|
**body** | [**AddCollaboratorOption**](AddCollaboratorOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoCheckCollaborator"></a>
|
|
# **repoCheckCollaborator**
|
|
> repoCheckCollaborator(owner, repo, collaborator)
|
|
|
|
Check if a user is a collaborator of a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String collaborator = "collaborator_example"; // String | username of the collaborator
|
|
try {
|
|
apiInstance.repoCheckCollaborator(owner, repo, collaborator);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoCheckCollaborator");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**collaborator** | **String**| username of the collaborator |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoCreateHook"></a>
|
|
# **repoCreateHook**
|
|
> List<Branch> repoCreateHook(owner, repo, body)
|
|
|
|
Create a hook
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
CreateHookOption body = new CreateHookOption(); // CreateHookOption |
|
|
try {
|
|
List<Branch> result = apiInstance.repoCreateHook(owner, repo, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoCreateHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**body** | [**CreateHookOption**](CreateHookOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Branch>**](Branch.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoCreateKey"></a>
|
|
# **repoCreateKey**
|
|
> DeployKey repoCreateKey(owner, repo, body)
|
|
|
|
Add a key to a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
CreateKeyOption body = new CreateKeyOption(); // CreateKeyOption |
|
|
try {
|
|
DeployKey result = apiInstance.repoCreateKey(owner, repo, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoCreateKey");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**DeployKey**](DeployKey.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoCreatePullRequest"></a>
|
|
# **repoCreatePullRequest**
|
|
> PullRequest repoCreatePullRequest(owner, repo, body)
|
|
|
|
Create a pull request
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
CreatePullRequestOption body = new CreatePullRequestOption(); // CreatePullRequestOption |
|
|
try {
|
|
PullRequest result = apiInstance.repoCreatePullRequest(owner, repo, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoCreatePullRequest");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**body** | [**CreatePullRequestOption**](CreatePullRequestOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**PullRequest**](PullRequest.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoCreateRelease"></a>
|
|
# **repoCreateRelease**
|
|
> Release repoCreateRelease(owner, repo, body)
|
|
|
|
Create a release
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
CreateReleaseOption body = new CreateReleaseOption(); // CreateReleaseOption |
|
|
try {
|
|
Release result = apiInstance.repoCreateRelease(owner, repo, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoCreateRelease");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**body** | [**CreateReleaseOption**](CreateReleaseOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Release**](Release.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoCreateReleaseAttachment"></a>
|
|
# **repoCreateReleaseAttachment**
|
|
> Attachment repoCreateReleaseAttachment(owner, repo, id, attachment, name)
|
|
|
|
Create a release attachment
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release
|
|
File attachment = new File("/path/to/file.txt"); // File | attachment to upload
|
|
String name = "name_example"; // String | name of the attachment
|
|
try {
|
|
Attachment result = apiInstance.repoCreateReleaseAttachment(owner, repo, id, attachment, name);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoCreateReleaseAttachment");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release |
|
|
**attachment** | **File**| attachment to upload |
|
|
**name** | **String**| name of the attachment | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Attachment**](Attachment.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: multipart/form-data
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoCreateStatus"></a>
|
|
# **repoCreateStatus**
|
|
> List<Status> repoCreateStatus(owner, repo, sha, body)
|
|
|
|
Create a commit status
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String sha = "sha_example"; // String | sha of the commit
|
|
CreateStatusOption body = new CreateStatusOption(); // CreateStatusOption |
|
|
try {
|
|
List<Status> result = apiInstance.repoCreateStatus(owner, repo, sha, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoCreateStatus");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**sha** | **String**| sha of the commit |
|
|
**body** | [**CreateStatusOption**](CreateStatusOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Status>**](Status.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoDelete"></a>
|
|
# **repoDelete**
|
|
> repoDelete(owner, repo)
|
|
|
|
Delete a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo to delete
|
|
String repo = "repo_example"; // String | name of the repo to delete
|
|
try {
|
|
apiInstance.repoDelete(owner, repo);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoDelete");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo to delete |
|
|
**repo** | **String**| name of the repo to delete |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoDeleteCollaborator"></a>
|
|
# **repoDeleteCollaborator**
|
|
> repoDeleteCollaborator(owner, repo, collaborator)
|
|
|
|
Delete a collaborator from a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String collaborator = "collaborator_example"; // String | username of the collaborator to delete
|
|
try {
|
|
apiInstance.repoDeleteCollaborator(owner, repo, collaborator);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoDeleteCollaborator");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**collaborator** | **String**| username of the collaborator to delete |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoDeleteHook"></a>
|
|
# **repoDeleteHook**
|
|
> repoDeleteHook(owner, repo, id)
|
|
|
|
Delete a hook in a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the hook to delete
|
|
try {
|
|
apiInstance.repoDeleteHook(owner, repo, id);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoDeleteHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the hook to delete |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoDeleteKey"></a>
|
|
# **repoDeleteKey**
|
|
> repoDeleteKey(owner, repo, id)
|
|
|
|
Delete a key from a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the key to delete
|
|
try {
|
|
apiInstance.repoDeleteKey(owner, repo, id);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoDeleteKey");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the key to delete |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json, text/html
|
|
|
|
<a name="repoDeleteRelease"></a>
|
|
# **repoDeleteRelease**
|
|
> repoDeleteRelease(owner, repo, id)
|
|
|
|
Delete a release
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release to delete
|
|
try {
|
|
apiInstance.repoDeleteRelease(owner, repo, id);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoDeleteRelease");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release to delete |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json, text/html
|
|
|
|
<a name="repoDeleteReleaseAttachment"></a>
|
|
# **repoDeleteReleaseAttachment**
|
|
> repoDeleteReleaseAttachment(owner, repo, id, attachmentId)
|
|
|
|
Delete a release attachment
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release
|
|
Integer attachmentId = 56; // Integer | id of the attachment to delete
|
|
try {
|
|
apiInstance.repoDeleteReleaseAttachment(owner, repo, id, attachmentId);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoDeleteReleaseAttachment");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release |
|
|
**attachmentId** | **Integer**| id of the attachment to delete |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoEditHook"></a>
|
|
# **repoEditHook**
|
|
> List<Branch> repoEditHook(owner, repo, id, body)
|
|
|
|
Edit a hook in a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | index of the hook
|
|
EditHookOption body = new EditHookOption(); // EditHookOption |
|
|
try {
|
|
List<Branch> result = apiInstance.repoEditHook(owner, repo, id, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoEditHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| index of the hook |
|
|
**body** | [**EditHookOption**](EditHookOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Branch>**](Branch.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoEditPullRequest"></a>
|
|
# **repoEditPullRequest**
|
|
> PullRequest repoEditPullRequest(owner, repo, index, body)
|
|
|
|
Update a pull request
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer index = 56; // Integer | index of the pull request to edit
|
|
EditPullRequestOption body = new EditPullRequestOption(); // EditPullRequestOption |
|
|
try {
|
|
PullRequest result = apiInstance.repoEditPullRequest(owner, repo, index, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoEditPullRequest");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**index** | **Integer**| index of the pull request to edit |
|
|
**body** | [**EditPullRequestOption**](EditPullRequestOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**PullRequest**](PullRequest.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoEditRelease"></a>
|
|
# **repoEditRelease**
|
|
> Release repoEditRelease(owner, repo, id, body)
|
|
|
|
Update a release
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release to edit
|
|
EditReleaseOption body = new EditReleaseOption(); // EditReleaseOption |
|
|
try {
|
|
Release result = apiInstance.repoEditRelease(owner, repo, id, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoEditRelease");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release to edit |
|
|
**body** | [**EditReleaseOption**](EditReleaseOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Release**](Release.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoEditReleaseAttachment"></a>
|
|
# **repoEditReleaseAttachment**
|
|
> Attachment repoEditReleaseAttachment(owner, repo, id, attachmentId, body)
|
|
|
|
Edit a release attachment
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release
|
|
Integer attachmentId = 56; // Integer | id of the attachment to edit
|
|
EditAttachmentOptions body = new EditAttachmentOptions(); // EditAttachmentOptions |
|
|
try {
|
|
Attachment result = apiInstance.repoEditReleaseAttachment(owner, repo, id, attachmentId, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoEditReleaseAttachment");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release |
|
|
**attachmentId** | **Integer**| id of the attachment to edit |
|
|
**body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Attachment**](Attachment.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGet"></a>
|
|
# **repoGet**
|
|
> Repository repoGet(owner, repo)
|
|
|
|
Get a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
Repository result = apiInstance.repoGet(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGet");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetArchive"></a>
|
|
# **repoGetArchive**
|
|
> repoGetArchive(owner, repo, archive)
|
|
|
|
Get an archive of a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String archive = "archive_example"; // String | archive to download, consisting of a git reference and archive
|
|
try {
|
|
apiInstance.repoGetArchive(owner, repo, archive);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetArchive");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**archive** | **String**| archive to download, consisting of a git reference and archive |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetBranch"></a>
|
|
# **repoGetBranch**
|
|
> Branch repoGetBranch(owner, repo, branch)
|
|
|
|
List a repository's branches
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String branch = "branch_example"; // String | branch to get
|
|
try {
|
|
Branch result = apiInstance.repoGetBranch(owner, repo, branch);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetBranch");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**branch** | **String**| branch to get |
|
|
|
|
### Return type
|
|
|
|
[**Branch**](Branch.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetByID"></a>
|
|
# **repoGetByID**
|
|
> Repository repoGetByID(id)
|
|
|
|
Get a repository by id
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
Integer id = 56; // Integer | id of the repo to get
|
|
try {
|
|
Repository result = apiInstance.repoGetByID(id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetByID");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Integer**| id of the repo to get |
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetCombinedStatusByRef"></a>
|
|
# **repoGetCombinedStatusByRef**
|
|
> Status repoGetCombinedStatusByRef(owner, repo, ref)
|
|
|
|
Get a commit's combined status, by branch/tag/commit reference
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String ref = "ref_example"; // String | name of branch/tag/commit
|
|
try {
|
|
Status result = apiInstance.repoGetCombinedStatusByRef(owner, repo, ref);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetCombinedStatusByRef");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**ref** | **String**| name of branch/tag/commit |
|
|
|
|
### Return type
|
|
|
|
[**Status**](Status.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetEditorConfig"></a>
|
|
# **repoGetEditorConfig**
|
|
> repoGetEditorConfig(owner, repo, filepath)
|
|
|
|
Get the EditorConfig definitions of a file in a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String filepath = "filepath_example"; // String | filepath of file to get
|
|
try {
|
|
apiInstance.repoGetEditorConfig(owner, repo, filepath);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetEditorConfig");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**filepath** | **String**| filepath of file to get |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetHook"></a>
|
|
# **repoGetHook**
|
|
> List<Branch> repoGetHook(owner, repo, id)
|
|
|
|
Get a hook
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the hook to get
|
|
try {
|
|
List<Branch> result = apiInstance.repoGetHook(owner, repo, id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the hook to get |
|
|
|
|
### Return type
|
|
|
|
[**List<Branch>**](Branch.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetKey"></a>
|
|
# **repoGetKey**
|
|
> DeployKey repoGetKey(owner, repo, id)
|
|
|
|
Get a repository's key by id
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the key to get
|
|
try {
|
|
DeployKey result = apiInstance.repoGetKey(owner, repo, id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetKey");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the key to get |
|
|
|
|
### Return type
|
|
|
|
[**DeployKey**](DeployKey.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetPullRequest"></a>
|
|
# **repoGetPullRequest**
|
|
> PullRequest repoGetPullRequest(owner, repo, index)
|
|
|
|
Get a pull request
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer index = 56; // Integer | index of the pull request to get
|
|
try {
|
|
PullRequest result = apiInstance.repoGetPullRequest(owner, repo, index);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetPullRequest");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**index** | **Integer**| index of the pull request to get |
|
|
|
|
### Return type
|
|
|
|
[**PullRequest**](PullRequest.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetRawFile"></a>
|
|
# **repoGetRawFile**
|
|
> repoGetRawFile(owner, repo, filepath)
|
|
|
|
Get a file from a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String filepath = "filepath_example"; // String | filepath of the file to get
|
|
try {
|
|
apiInstance.repoGetRawFile(owner, repo, filepath);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetRawFile");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**filepath** | **String**| filepath of the file to get |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetRelease"></a>
|
|
# **repoGetRelease**
|
|
> Release repoGetRelease(owner, repo, id)
|
|
|
|
Get a release
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release to get
|
|
try {
|
|
Release result = apiInstance.repoGetRelease(owner, repo, id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetRelease");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release to get |
|
|
|
|
### Return type
|
|
|
|
[**Release**](Release.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoGetReleaseAttachment"></a>
|
|
# **repoGetReleaseAttachment**
|
|
> Attachment repoGetReleaseAttachment(owner, repo, id, attachmentId)
|
|
|
|
Get a release attachment
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release
|
|
Integer attachmentId = 56; // Integer | id of the attachment to get
|
|
try {
|
|
Attachment result = apiInstance.repoGetReleaseAttachment(owner, repo, id, attachmentId);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoGetReleaseAttachment");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release |
|
|
**attachmentId** | **Integer**| id of the attachment to get |
|
|
|
|
### Return type
|
|
|
|
[**Attachment**](Attachment.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListBranches"></a>
|
|
# **repoListBranches**
|
|
> List<Branch> repoListBranches(owner, repo)
|
|
|
|
List a repository's branches
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
List<Branch> result = apiInstance.repoListBranches(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListBranches");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**List<Branch>**](Branch.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListCollaborators"></a>
|
|
# **repoListCollaborators**
|
|
> UserList repoListCollaborators(owner, repo)
|
|
|
|
List a repository's collaborators
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
UserList result = apiInstance.repoListCollaborators(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListCollaborators");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**UserList**](UserList.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListHooks"></a>
|
|
# **repoListHooks**
|
|
> List<Branch> repoListHooks(owner, repo)
|
|
|
|
List the hooks in a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
List<Branch> result = apiInstance.repoListHooks(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListHooks");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**List<Branch>**](Branch.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListKeys"></a>
|
|
# **repoListKeys**
|
|
> List<DeployKey> repoListKeys(owner, repo)
|
|
|
|
List a repository's keys
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
List<DeployKey> result = apiInstance.repoListKeys(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListKeys");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**List<DeployKey>**](DeployKey.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListPullRequests"></a>
|
|
# **repoListPullRequests**
|
|
> List<PullRequest> repoListPullRequests(owner, repo)
|
|
|
|
List a repo's pull requests
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
List<PullRequest> result = apiInstance.repoListPullRequests(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListPullRequests");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**List<PullRequest>**](PullRequest.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListReleaseAttachments"></a>
|
|
# **repoListReleaseAttachments**
|
|
> List<Attachment> repoListReleaseAttachments(owner, repo, id)
|
|
|
|
List release's attachments
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the release
|
|
try {
|
|
List<Attachment> result = apiInstance.repoListReleaseAttachments(owner, repo, id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListReleaseAttachments");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the release |
|
|
|
|
### Return type
|
|
|
|
[**List<Attachment>**](Attachment.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListReleases"></a>
|
|
# **repoListReleases**
|
|
> List<Release> repoListReleases(owner, repo)
|
|
|
|
List a repo's releases
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
List<Release> result = apiInstance.repoListReleases(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListReleases");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**List<Release>**](Release.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListStargazers"></a>
|
|
# **repoListStargazers**
|
|
> UserList repoListStargazers(owner, repo)
|
|
|
|
List a repo's stargazers
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
UserList result = apiInstance.repoListStargazers(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListStargazers");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**UserList**](UserList.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListStatuses"></a>
|
|
# **repoListStatuses**
|
|
> List<Status> repoListStatuses(owner, repo, sha)
|
|
|
|
Get a commit's statuses
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
String sha = "sha_example"; // String | sha of the commit
|
|
try {
|
|
List<Status> result = apiInstance.repoListStatuses(owner, repo, sha);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListStatuses");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**sha** | **String**| sha of the commit |
|
|
|
|
### Return type
|
|
|
|
[**List<Status>**](Status.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoListSubscribers"></a>
|
|
# **repoListSubscribers**
|
|
> UserList repoListSubscribers(owner, repo)
|
|
|
|
List a repo's watchers
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
UserList result = apiInstance.repoListSubscribers(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoListSubscribers");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**UserList**](UserList.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoMergePullRequest"></a>
|
|
# **repoMergePullRequest**
|
|
> repoMergePullRequest(owner, repo, index)
|
|
|
|
Merge a pull request
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer index = 56; // Integer | index of the pull request to merge
|
|
try {
|
|
apiInstance.repoMergePullRequest(owner, repo, index);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoMergePullRequest");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**index** | **Integer**| index of the pull request to merge |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoMigrate"></a>
|
|
# **repoMigrate**
|
|
> Repository repoMigrate(body)
|
|
|
|
Migrate a remote git repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
MigrateRepoForm body = new MigrateRepoForm(); // MigrateRepoForm |
|
|
try {
|
|
Repository result = apiInstance.repoMigrate(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoMigrate");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**MigrateRepoForm**](MigrateRepoForm.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoMirrorSync"></a>
|
|
# **repoMirrorSync**
|
|
> repoMirrorSync(owner, repo)
|
|
|
|
Sync a mirrored repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo to sync
|
|
String repo = "repo_example"; // String | name of the repo to sync
|
|
try {
|
|
apiInstance.repoMirrorSync(owner, repo);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoMirrorSync");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo to sync |
|
|
**repo** | **String**| name of the repo to sync |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoPullRequestIsMerged"></a>
|
|
# **repoPullRequestIsMerged**
|
|
> repoPullRequestIsMerged(owner, repo, index)
|
|
|
|
Check if a pull request has been merged
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer index = 56; // Integer | index of the pull request
|
|
try {
|
|
apiInstance.repoPullRequestIsMerged(owner, repo, index);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoPullRequestIsMerged");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**index** | **Integer**| index of the pull request |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoSearch"></a>
|
|
# **repoSearch**
|
|
> SearchResults repoSearch(q, uid, page, limit, mode, exclusive, sort, order)
|
|
|
|
Search for repositories
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String q = "q_example"; // String | keyword
|
|
Integer uid = 56; // Integer | search only for repos that the user with the given id owns or contributes to
|
|
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
|
|
String mode = "mode_example"; // String | type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"
|
|
Boolean exclusive = true; // Boolean | if `uid` is given, search only for repos that the user owns
|
|
String sort = "sort_example"; // String | sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"
|
|
String order = "order_example"; // String | sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.
|
|
try {
|
|
SearchResults result = apiInstance.repoSearch(q, uid, page, limit, mode, exclusive, sort, order);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoSearch");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**q** | **String**| keyword | [optional]
|
|
**uid** | **Integer**| search only for repos that the user with the given id owns or contributes to | [optional]
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results, maximum page size is 50 | [optional]
|
|
**mode** | **String**| type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" | [optional]
|
|
**exclusive** | **Boolean**| if `uid` is given, search only for repos that the user owns | [optional]
|
|
**sort** | **String**| sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" | [optional]
|
|
**order** | **String**| sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. | [optional]
|
|
|
|
### Return type
|
|
|
|
[**SearchResults**](SearchResults.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoTestHook"></a>
|
|
# **repoTestHook**
|
|
> repoTestHook(owner, repo, id)
|
|
|
|
Test a push webhook
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
Integer id = 56; // Integer | id of the hook to test
|
|
try {
|
|
apiInstance.repoTestHook(owner, repo, id);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoTestHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
**id** | **Integer**| id of the hook to test |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="repoTrackedTimes"></a>
|
|
# **repoTrackedTimes**
|
|
> List<TrackedTime> repoTrackedTimes(owner, repo)
|
|
|
|
List a repo's tracked times
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
List<TrackedTime> result = apiInstance.repoTrackedTimes(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#repoTrackedTimes");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**List<TrackedTime>**](TrackedTime.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="topicSearch"></a>
|
|
# **topicSearch**
|
|
> Repository topicSearch(q)
|
|
|
|
search topics via keyword
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String q = "q_example"; // String | keywords to search
|
|
try {
|
|
Repository result = apiInstance.topicSearch(q);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#topicSearch");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**q** | **String**| keywords to search |
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
<a name="userCurrentCheckSubscription"></a>
|
|
# **userCurrentCheckSubscription**
|
|
> WatchInfo userCurrentCheckSubscription(owner, repo)
|
|
|
|
Check if the current user is watching a repo
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
WatchInfo result = apiInstance.userCurrentCheckSubscription(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#userCurrentCheckSubscription");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**WatchInfo**](WatchInfo.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json, text/html
|
|
|
|
<a name="userCurrentDeleteSubscription"></a>
|
|
# **userCurrentDeleteSubscription**
|
|
> userCurrentDeleteSubscription(owner, repo)
|
|
|
|
Unwatch a repo
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
apiInstance.userCurrentDeleteSubscription(owner, repo);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#userCurrentDeleteSubscription");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json, text/html
|
|
|
|
<a name="userCurrentPutSubscription"></a>
|
|
# **userCurrentPutSubscription**
|
|
> WatchInfo userCurrentPutSubscription(owner, repo)
|
|
|
|
Watch a repo
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.gitea.ApiClient;
|
|
//import io.gitea.ApiException;
|
|
//import io.gitea.Configuration;
|
|
//import io.gitea.auth.*;
|
|
//import io.gitea.api.RepositoryApi;
|
|
|
|
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: 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");
|
|
|
|
RepositoryApi apiInstance = new RepositoryApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
WatchInfo result = apiInstance.userCurrentPutSubscription(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling RepositoryApi#userCurrentPutSubscription");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**WatchInfo**](WatchInfo.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json, text/html
|
|
|