Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2024-05-02 00:05:22 +00:00
parent e98eb16c47
commit 96bbb44214
6 changed files with 638 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# ActionTask
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**createdAt** | [**Date**](Date.md) | | [optional]
**displayTitle** | **String** | | [optional]
**event** | **String** | | [optional]
**headBranch** | **String** | | [optional]
**headSha** | **String** | | [optional]
**id** | **Long** | | [optional]
**name** | **String** | | [optional]
**runNumber** | **Long** | | [optional]
**runStartedAt** | [**Date**](Date.md) | | [optional]
**status** | **String** | | [optional]
**updatedAt** | [**Date**](Date.md) | | [optional]
**url** | **String** | | [optional]
**workflowId** | **String** | | [optional]
+7
View File
@@ -0,0 +1,7 @@
# ActionTaskResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**totalCount** | **Long** | | [optional]
**workflowRuns** | [**List<ActionTask>**](ActionTask.md) | | [optional]
+94
View File
@@ -16,6 +16,7 @@ Method | HTTP request | Description
[**getRepoVariable**](RepositoryApi.md#getRepoVariable) | **GET** repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable
[**getRepoVariablesList**](RepositoryApi.md#getRepoVariablesList) | **GET** repos/{owner}/{repo}/actions/variables | Get repo-level variables list
[**getTree**](RepositoryApi.md#getTree) | **GET** repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository.
[**listActionTasks**](RepositoryApi.md#listActionTasks) | **GET** repos/{owner}/{repo}/actions/tasks | List a repository's action tasks
[**listForks**](RepositoryApi.md#listForks) | **GET** repos/{owner}/{repo}/forks | List a repository's forks
[**rejectRepoTransfer**](RepositoryApi.md#rejectRepoTransfer) | **POST** repos/{owner}/{repo}/transfer/reject | Reject a repo transfer
[**repoAddCollaborator**](RepositoryApi.md#repoAddCollaborator) | **PUT** repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository
@@ -1252,6 +1253,99 @@ 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="listActionTasks"></a>
# **listActionTasks**
> ActionTaskResponse listActionTasks(owner, repo, page, limit)
List a repository&#x27;s action tasks
### 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
Integer page = 56; // Integer | page number of results to return (1-based)
Integer limit = 56; // Integer | page size of results, default maximum page size is 50
try {
ActionTaskResponse result = apiInstance.listActionTasks(owner, repo, page, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#listActionTasks");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**page** | **Integer**| page number of results to return (1-based) | [optional]
**limit** | **Integer**| page size of results, default maximum page size is 50 | [optional]
### Return type
[**ActionTaskResponse**](ActionTaskResponse.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
@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map;
import okhttp3.RequestBody;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.ActionTaskResponse;
import org.gitnex.tea4j.v2.models.ActionVariable;
import org.gitnex.tea4j.v2.models.Activity;
import org.gitnex.tea4j.v2.models.AddCollaboratorOption;
@@ -269,6 +270,22 @@ public interface RepositoryApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("per_page") Integer perPage);
/**
* List a repository&#x27;s action tasks
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results, default maximum page size is 50 (optional)
* @return Call&lt;ActionTaskResponse&gt;
*/
@GET("repos/{owner}/{repo}/actions/tasks")
Call<ActionTaskResponse> listActionTasks(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a repository&#x27;s forks
*
@@ -0,0 +1,385 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape}}
*
*
* 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.Date;
import java.util.Objects;
/** ActionTask represents a ActionTask */
@Schema(description = "ActionTask represents a ActionTask")
public class ActionTask implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("display_title")
private String displayTitle = null;
@SerializedName("event")
private String event = null;
@SerializedName("head_branch")
private String headBranch = null;
@SerializedName("head_sha")
private String headSha = null;
@SerializedName("id")
private Long id = null;
@SerializedName("name")
private String name = null;
@SerializedName("run_number")
private Long runNumber = null;
@SerializedName("run_started_at")
private Date runStartedAt = null;
@SerializedName("status")
private String status = null;
@SerializedName("updated_at")
private Date updatedAt = null;
@SerializedName("url")
private String url = null;
@SerializedName("workflow_id")
private String workflowId = null;
public ActionTask createdAt(Date createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* Get createdAt
*
* @return createdAt
*/
@Schema(description = "")
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public ActionTask displayTitle(String displayTitle) {
this.displayTitle = displayTitle;
return this;
}
/**
* Get displayTitle
*
* @return displayTitle
*/
@Schema(description = "")
public String getDisplayTitle() {
return displayTitle;
}
public void setDisplayTitle(String displayTitle) {
this.displayTitle = displayTitle;
}
public ActionTask event(String event) {
this.event = event;
return this;
}
/**
* Get event
*
* @return event
*/
@Schema(description = "")
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
public ActionTask headBranch(String headBranch) {
this.headBranch = headBranch;
return this;
}
/**
* Get headBranch
*
* @return headBranch
*/
@Schema(description = "")
public String getHeadBranch() {
return headBranch;
}
public void setHeadBranch(String headBranch) {
this.headBranch = headBranch;
}
public ActionTask headSha(String headSha) {
this.headSha = headSha;
return this;
}
/**
* Get headSha
*
* @return headSha
*/
@Schema(description = "")
public String getHeadSha() {
return headSha;
}
public void setHeadSha(String headSha) {
this.headSha = headSha;
}
public ActionTask id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public ActionTask name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ActionTask runNumber(Long runNumber) {
this.runNumber = runNumber;
return this;
}
/**
* Get runNumber
*
* @return runNumber
*/
@Schema(description = "")
public Long getRunNumber() {
return runNumber;
}
public void setRunNumber(Long runNumber) {
this.runNumber = runNumber;
}
public ActionTask runStartedAt(Date runStartedAt) {
this.runStartedAt = runStartedAt;
return this;
}
/**
* Get runStartedAt
*
* @return runStartedAt
*/
@Schema(description = "")
public Date getRunStartedAt() {
return runStartedAt;
}
public void setRunStartedAt(Date runStartedAt) {
this.runStartedAt = runStartedAt;
}
public ActionTask status(String status) {
this.status = status;
return this;
}
/**
* Get status
*
* @return status
*/
@Schema(description = "")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public ActionTask updatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
return this;
}
/**
* Get updatedAt
*
* @return updatedAt
*/
@Schema(description = "")
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public ActionTask url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public ActionTask workflowId(String workflowId) {
this.workflowId = workflowId;
return this;
}
/**
* Get workflowId
*
* @return workflowId
*/
@Schema(description = "")
public String getWorkflowId() {
return workflowId;
}
public void setWorkflowId(String workflowId) {
this.workflowId = workflowId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActionTask actionTask = (ActionTask) o;
return Objects.equals(this.createdAt, actionTask.createdAt)
&& Objects.equals(this.displayTitle, actionTask.displayTitle)
&& Objects.equals(this.event, actionTask.event)
&& Objects.equals(this.headBranch, actionTask.headBranch)
&& Objects.equals(this.headSha, actionTask.headSha)
&& Objects.equals(this.id, actionTask.id)
&& Objects.equals(this.name, actionTask.name)
&& Objects.equals(this.runNumber, actionTask.runNumber)
&& Objects.equals(this.runStartedAt, actionTask.runStartedAt)
&& Objects.equals(this.status, actionTask.status)
&& Objects.equals(this.updatedAt, actionTask.updatedAt)
&& Objects.equals(this.url, actionTask.url)
&& Objects.equals(this.workflowId, actionTask.workflowId);
}
@Override
public int hashCode() {
return Objects.hash(
createdAt,
displayTitle,
event,
headBranch,
headSha,
id,
name,
runNumber,
runStartedAt,
status,
updatedAt,
url,
workflowId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActionTask {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" displayTitle: ").append(toIndentedString(displayTitle)).append("\n");
sb.append(" event: ").append(toIndentedString(event)).append("\n");
sb.append(" headBranch: ").append(toIndentedString(headBranch)).append("\n");
sb.append(" headSha: ").append(toIndentedString(headSha)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" runNumber: ").append(toIndentedString(runNumber)).append("\n");
sb.append(" runStartedAt: ").append(toIndentedString(runStartedAt)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
@@ -0,0 +1,117 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape}}
*
*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** ActionTaskResponse returns a ActionTask */
@Schema(description = "ActionTaskResponse returns a ActionTask")
public class ActionTaskResponse implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("total_count")
private Long totalCount = null;
@SerializedName("workflow_runs")
private List<ActionTask> workflowRuns = null;
public ActionTaskResponse totalCount(Long totalCount) {
this.totalCount = totalCount;
return this;
}
/**
* Get totalCount
*
* @return totalCount
*/
@Schema(description = "")
public Long getTotalCount() {
return totalCount;
}
public void setTotalCount(Long totalCount) {
this.totalCount = totalCount;
}
public ActionTaskResponse workflowRuns(List<ActionTask> workflowRuns) {
this.workflowRuns = workflowRuns;
return this;
}
public ActionTaskResponse addWorkflowRunsItem(ActionTask workflowRunsItem) {
if (this.workflowRuns == null) {
this.workflowRuns = new ArrayList<>();
}
this.workflowRuns.add(workflowRunsItem);
return this;
}
/**
* Get workflowRuns
*
* @return workflowRuns
*/
@Schema(description = "")
public List<ActionTask> getWorkflowRuns() {
return workflowRuns;
}
public void setWorkflowRuns(List<ActionTask> workflowRuns) {
this.workflowRuns = workflowRuns;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActionTaskResponse actionTaskResponse = (ActionTaskResponse) o;
return Objects.equals(this.totalCount, actionTaskResponse.totalCount)
&& Objects.equals(this.workflowRuns, actionTaskResponse.workflowRuns);
}
@Override
public int hashCode() {
return Objects.hash(totalCount, workflowRuns);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActionTaskResponse {\n");
sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n");
sb.append(" workflowRuns: ").append(toIndentedString(workflowRuns)).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 ");
}
}