Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2023-05-26 00:14:34 +00:00
parent b3a39b74e4
commit cbe4b6eada
10 changed files with 829 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
**number** | **Long** | | [optional]
**originalAuthor** | **String** | | [optional]
**originalAuthorId** | **Long** | | [optional]
**pinOrder** | **Long** | | [optional]
**pullRequest** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional]
**ref** | **String** | | [optional]
**repository** | [**RepositoryMeta**](RepositoryMeta.md) | | [optional]
+278
View File
@@ -68,6 +68,9 @@ Method | HTTP request | Description
[**issueStopStopWatch**](IssueApi.md#issueStopStopWatch) | **POST** repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch.
[**issueSubscriptions**](IssueApi.md#issueSubscriptions) | **GET** repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue.
[**issueTrackedTimes**](IssueApi.md#issueTrackedTimes) | **GET** repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times
[**moveIssuePin**](IssueApi.md#moveIssuePin) | **PATCH** repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position
[**pinIssue**](IssueApi.md#pinIssue) | **POST** repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue
[**unpinIssue**](IssueApi.md#unpinIssue) | **DELETE** repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue
<a name="issueAddLabel"></a>
# **issueAddLabel**
@@ -6067,3 +6070,278 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="moveIssuePin"></a>
# **moveIssuePin**
> Void moveIssuePin(owner, repo, index, position)
Moves the Pin to the given Position
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.IssueApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
IssueApi apiInstance = new IssueApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
Long index = 789L; // Long | index of issue
Long position = 789L; // Long | the new position
try {
Void result = apiInstance.moveIssuePin(owner, repo, index, position);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IssueApi#moveIssuePin");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**index** | **Long**| index of issue |
**position** | **Long**| the new position |
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="pinIssue"></a>
# **pinIssue**
> Void pinIssue(owner, repo, index)
Pin an Issue
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.IssueApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
IssueApi apiInstance = new IssueApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
Long index = 789L; // Long | index of issue to pin
try {
Void result = apiInstance.pinIssue(owner, repo, index);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IssueApi#pinIssue");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**index** | **Long**| index of issue to pin |
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="unpinIssue"></a>
# **unpinIssue**
> Void unpinIssue(owner, repo, index)
Unpin an Issue
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.IssueApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
IssueApi apiInstance = new IssueApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
Long index = 789L; // Long | index of issue to unpin
try {
Void result = apiInstance.unpinIssue(owner, repo, index);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IssueApi#unpinIssue");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**index** | **Long**| index of issue to unpin |
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
+7
View File
@@ -0,0 +1,7 @@
# NewIssuePinsAllowed
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**issues** | **Boolean** | | [optional]
**pullRequests** | **Boolean** | | [optional]
+2
View File
@@ -27,6 +27,8 @@ Name | Type | Description | Notes
**milestone** | [**Milestone**](Milestone.md) | | [optional]
**number** | **Long** | | [optional]
**patchUrl** | **String** | | [optional]
**pinOrder** | **Long** | | [optional]
**requestedReviewers** | [**List&lt;User&gt;**](User.md) | | [optional]
**state** | **String** | | [optional]
**title** | **String** | | [optional]
**updatedAt** | [**Date**](Date.md) | | [optional]
+270
View File
@@ -109,6 +109,8 @@ Method | HTTP request | Description
[**repoListGitRefs**](RepositoryApi.md#repoListGitRefs) | **GET** repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository&#x27;s refs
[**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&#x27;s keys
[**repoListPinnedIssues**](RepositoryApi.md#repoListPinnedIssues) | **GET** repos/{owner}/{repo}/issues/pinned | List a repo&#x27;s pinned issues
[**repoListPinnedPullRequests**](RepositoryApi.md#repoListPinnedPullRequests) | **GET** repos/{owner}/{repo}/pulls/pinned | List a repo&#x27;s pinned pull requests
[**repoListPullRequests**](RepositoryApi.md#repoListPullRequests) | **GET** repos/{owner}/{repo}/pulls | List a repo&#x27;s pull requests
[**repoListPullReviews**](RepositoryApi.md#repoListPullReviews) | **GET** repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request
[**repoListPushMirrors**](RepositoryApi.md#repoListPushMirrors) | **GET** repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository
@@ -124,6 +126,7 @@ Method | HTTP request | Description
[**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
[**repoNewPinAllowed**](RepositoryApi.md#repoNewPinAllowed) | **GET** repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed
[**repoPullRequestIsMerged**](RepositoryApi.md#repoPullRequestIsMerged) | **GET** repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged
[**repoPushMirrorSync**](RepositoryApi.md#repoPushMirrorSync) | **POST** repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository
[**repoSearch**](RepositoryApi.md#repoSearch) | **GET** repos/search | Search for repositories
@@ -9785,6 +9788,184 @@ Name | Type | Description | Notes
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="repoListPinnedIssues"></a>
# **repoListPinnedIssues**
> List&lt;Issue&gt; repoListPinnedIssues(owner, repo)
List a repo&#x27;s pinned issues
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.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: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
try {
List<Issue> result = apiInstance.repoListPinnedIssues(owner, repo);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoListPinnedIssues");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
### Return type
[**List&lt;Issue&gt;**](Issue.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="repoListPinnedPullRequests"></a>
# **repoListPinnedPullRequests**
> List&lt;PullRequest&gt; repoListPinnedPullRequests(owner, repo)
List a repo&#x27;s pinned pull requests
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.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: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
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.repoListPinnedPullRequests(owner, repo);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoListPinnedPullRequests");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
### Return type
[**List&lt;PullRequest&gt;**](PullRequest.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
@@ -11197,6 +11378,95 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="repoNewPinAllowed"></a>
# **repoNewPinAllowed**
> NewIssuePinsAllowed repoNewPinAllowed(owner, repo)
Returns if new Issue Pins are allowed
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.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: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
try {
NewIssuePinsAllowed result = apiInstance.repoNewPinAllowed(owner, repo);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoNewPinAllowed");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
### Return type
[**NewIssuePinsAllowed**](NewIssuePinsAllowed.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="repoPullRequestIsMerged"></a>
# **repoPullRequestIsMerged**
> Void repoPullRequestIsMerged(owner, repo, index)
@@ -1148,4 +1148,48 @@ public interface IssueApi {
@retrofit2.http.Query("before") Date before,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Moves the Pin to the given Position
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of issue (required)
* @param position the new position (required)
* @return Call&lt;Void&gt;
*/
@PATCH("repos/{owner}/{repo}/issues/{index}/pin/{position}")
Call<Void> moveIssuePin(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Path("position") Long position);
/**
* Pin an Issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of issue to pin (required)
* @return Call&lt;Void&gt;
*/
@POST("repos/{owner}/{repo}/issues/{index}/pin")
Call<Void> pinIssue(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Unpin an Issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of issue to unpin (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/pin")
Call<Void> unpinIssue(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
}
@@ -47,11 +47,13 @@ import org.gitnex.tea4j.v2.models.GitBlobResponse;
import org.gitnex.tea4j.v2.models.GitHook;
import org.gitnex.tea4j.v2.models.GitTreeResponse;
import org.gitnex.tea4j.v2.models.Hook;
import org.gitnex.tea4j.v2.models.Issue;
import org.gitnex.tea4j.v2.models.IssueConfig;
import org.gitnex.tea4j.v2.models.IssueConfigValidation;
import org.gitnex.tea4j.v2.models.IssueTemplate;
import org.gitnex.tea4j.v2.models.MergePullRequestOption;
import org.gitnex.tea4j.v2.models.MigrateRepoOptions;
import org.gitnex.tea4j.v2.models.NewIssuePinsAllowed;
import org.gitnex.tea4j.v2.models.Note;
import org.gitnex.tea4j.v2.models.PullRequest;
import org.gitnex.tea4j.v2.models.PullReview;
@@ -1675,6 +1677,28 @@ public interface RepositoryApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a repo&#x27;s pinned issues
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;List&lt;Issue&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/pinned")
Call<List<Issue>> repoListPinnedIssues(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* List a repo&#x27;s pinned pull requests
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;List&lt;PullRequest&gt;&gt;
*/
@GET("repos/{owner}/{repo}/pulls/pinned")
Call<List<PullRequest>> repoListPinnedPullRequests(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* List a repo&#x27;s pull requests
*
@@ -1927,6 +1951,17 @@ public interface RepositoryApi {
Call<Void> repoMirrorSync(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* Returns if new Issue Pins are allowed
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;NewIssuePinsAllowed&gt;
*/
@GET("repos/{owner}/{repo}/new_pin_allowed")
Call<NewIssuePinsAllowed> repoNewPinAllowed(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* Check if a pull request has been merged
*
@@ -73,6 +73,9 @@ public class Issue implements Serializable {
@SerializedName("original_author_id")
private Long originalAuthorId = null;
@SerializedName("pin_order")
private Long pinOrder = null;
@SerializedName("pull_request")
private PullRequestMeta pullRequest = null;
@@ -425,6 +428,25 @@ public class Issue implements Serializable {
this.originalAuthorId = originalAuthorId;
}
public Issue pinOrder(Long pinOrder) {
this.pinOrder = pinOrder;
return this;
}
/**
* Get pinOrder
*
* @return pinOrder
*/
@Schema(description = "")
public Long getPinOrder() {
return pinOrder;
}
public void setPinOrder(Long pinOrder) {
this.pinOrder = pinOrder;
}
public Issue pullRequest(PullRequestMeta pullRequest) {
this.pullRequest = pullRequest;
return this;
@@ -602,6 +624,7 @@ public class Issue implements Serializable {
&& Objects.equals(this.number, issue.number)
&& Objects.equals(this.originalAuthor, issue.originalAuthor)
&& Objects.equals(this.originalAuthorId, issue.originalAuthorId)
&& Objects.equals(this.pinOrder, issue.pinOrder)
&& Objects.equals(this.pullRequest, issue.pullRequest)
&& Objects.equals(this.ref, issue.ref)
&& Objects.equals(this.repository, issue.repository)
@@ -631,6 +654,7 @@ public class Issue implements Serializable {
number,
originalAuthor,
originalAuthorId,
pinOrder,
pullRequest,
ref,
repository,
@@ -662,6 +686,7 @@ public class Issue implements Serializable {
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" originalAuthor: ").append(toIndentedString(originalAuthor)).append("\n");
sb.append(" originalAuthorId: ").append(toIndentedString(originalAuthorId)).append("\n");
sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n");
sb.append(" pullRequest: ").append(toIndentedString(pullRequest)).append("\n");
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
sb.append(" repository: ").append(toIndentedString(repository)).append("\n");
@@ -0,0 +1,109 @@
/*
* Gitea API.
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.gitnex.tea4j.v2.models;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;
/** NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed */
@Schema(
description =
"NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed")
public class NewIssuePinsAllowed implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("issues")
private Boolean issues = null;
@SerializedName("pull_requests")
private Boolean pullRequests = null;
public NewIssuePinsAllowed issues(Boolean issues) {
this.issues = issues;
return this;
}
/**
* Get issues
*
* @return issues
*/
@Schema(description = "")
public Boolean isIssues() {
return issues;
}
public void setIssues(Boolean issues) {
this.issues = issues;
}
public NewIssuePinsAllowed pullRequests(Boolean pullRequests) {
this.pullRequests = pullRequests;
return this;
}
/**
* Get pullRequests
*
* @return pullRequests
*/
@Schema(description = "")
public Boolean isPullRequests() {
return pullRequests;
}
public void setPullRequests(Boolean pullRequests) {
this.pullRequests = pullRequests;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NewIssuePinsAllowed newIssuePinsAllowed = (NewIssuePinsAllowed) o;
return Objects.equals(this.issues, newIssuePinsAllowed.issues)
&& Objects.equals(this.pullRequests, newIssuePinsAllowed.pullRequests);
}
@Override
public int hashCode() {
return Objects.hash(issues, pullRequests);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NewIssuePinsAllowed {\n");
sb.append(" issues: ").append(toIndentedString(issues)).append("\n");
sb.append(" pullRequests: ").append(toIndentedString(pullRequests)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
@@ -97,6 +97,12 @@ public class PullRequest implements Serializable {
@SerializedName("patch_url")
private String patchUrl = null;
@SerializedName("pin_order")
private Long pinOrder = null;
@SerializedName("requested_reviewers")
private List<User> requestedReviewers = null;
@SerializedName("state")
private String state = null;
@@ -584,6 +590,52 @@ public class PullRequest implements Serializable {
this.patchUrl = patchUrl;
}
public PullRequest pinOrder(Long pinOrder) {
this.pinOrder = pinOrder;
return this;
}
/**
* Get pinOrder
*
* @return pinOrder
*/
@Schema(description = "")
public Long getPinOrder() {
return pinOrder;
}
public void setPinOrder(Long pinOrder) {
this.pinOrder = pinOrder;
}
public PullRequest requestedReviewers(List<User> requestedReviewers) {
this.requestedReviewers = requestedReviewers;
return this;
}
public PullRequest addRequestedReviewersItem(User requestedReviewersItem) {
if (this.requestedReviewers == null) {
this.requestedReviewers = new ArrayList<>();
}
this.requestedReviewers.add(requestedReviewersItem);
return this;
}
/**
* Get requestedReviewers
*
* @return requestedReviewers
*/
@Schema(description = "")
public List<User> getRequestedReviewers() {
return requestedReviewers;
}
public void setRequestedReviewers(List<User> requestedReviewers) {
this.requestedReviewers = requestedReviewers;
}
public PullRequest state(String state) {
this.state = state;
return this;
@@ -712,6 +764,8 @@ public class PullRequest implements Serializable {
&& Objects.equals(this.milestone, pullRequest.milestone)
&& Objects.equals(this.number, pullRequest.number)
&& Objects.equals(this.patchUrl, pullRequest.patchUrl)
&& Objects.equals(this.pinOrder, pullRequest.pinOrder)
&& Objects.equals(this.requestedReviewers, pullRequest.requestedReviewers)
&& Objects.equals(this.state, pullRequest.state)
&& Objects.equals(this.title, pullRequest.title)
&& Objects.equals(this.updatedAt, pullRequest.updatedAt)
@@ -746,6 +800,8 @@ public class PullRequest implements Serializable {
milestone,
number,
patchUrl,
pinOrder,
requestedReviewers,
state,
title,
updatedAt,
@@ -784,6 +840,8 @@ public class PullRequest implements Serializable {
sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" patchUrl: ").append(toIndentedString(patchUrl)).append("\n");
sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n");
sb.append(" requestedReviewers: ").append(toIndentedString(requestedReviewers)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");