Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2023-04-05 00:08:17 +00:00
parent db1932a490
commit e634f926b5
10 changed files with 859 additions and 16 deletions
@@ -9,18 +9,18 @@ public interface ActivitypubApi {
/**
* Returns the Person actor for a user
*
* @param username username of the user (required)
* @param userId user ID of the user (required)
* @return Call<ActivityPub>
*/
@GET("activitypub/user/{username}")
Call<ActivityPub> activitypubPerson(@retrofit2.http.Path("username") String username);
@GET("activitypub/user-id/{user-id}")
Call<ActivityPub> activitypubPerson(@retrofit2.http.Path("user-id") Integer userId);
/**
* Send to the inbox
*
* @param username username of the user (required)
* @param userId user ID of the user (required)
* @return Call&lt;Void&gt;
*/
@POST("activitypub/user/{username}/inbox")
Call<Void> activitypubPersonInbox(@retrofit2.http.Path("username") String username);
@POST("activitypub/user-id/{user-id}/inbox")
Call<Void> activitypubPersonInbox(@retrofit2.http.Path("user-id") Integer userId);
}
@@ -1,7 +1,9 @@
package org.gitnex.tea4j.v2.apis;
import java.util.Date;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.Activity;
import org.gitnex.tea4j.v2.models.CreateHookOption;
import org.gitnex.tea4j.v2.models.CreateLabelOption;
import org.gitnex.tea4j.v2.models.CreateOrgOption;
@@ -317,6 +319,22 @@ public interface OrganizationApi {
Call<Void> orgIsPublicMember(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
/**
* List an organization&#x27;s activity feeds
*
* @param org name of the org (required)
* @param date the date of the activities to be found (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Activity&gt;&gt;
*/
@GET("orgs/{org}/activities/feeds")
Call<List<Activity>> orgListActivityFeeds(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("date") Date date,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the current user&#x27;s organizations
*
@@ -398,6 +416,22 @@ public interface OrganizationApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a team&#x27;s activity feeds
*
* @param id id of the team (required)
* @param date the date of the activities to be found (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Activity&gt;&gt;
*/
@GET("teams/{id}/activities/feeds")
Call<List<Activity>> orgListTeamActivityFeeds(
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Query("date") Date date,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a particular member of team
*
@@ -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.Activity;
import org.gitnex.tea4j.v2.models.AddCollaboratorOption;
import org.gitnex.tea4j.v2.models.AnnotatedTag;
import org.gitnex.tea4j.v2.models.Attachment;
@@ -1524,6 +1525,24 @@ public interface RepositoryApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a repository&#x27;s activity feeds
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param date the date of the activities to be found (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Activity&gt;&gt;
*/
@GET("repos/{owner}/{repo}/activities/feeds")
Call<List<Activity>> repoListActivityFeeds(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("date") Date date,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Get specified ref or filtered repository&#x27;s refs
*
@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.AccessToken;
import org.gitnex.tea4j.v2.models.Activity;
import org.gitnex.tea4j.v2.models.CreateAccessTokenOption;
import org.gitnex.tea4j.v2.models.CreateEmailOption;
import org.gitnex.tea4j.v2.models.CreateGPGKeyOption;
@@ -468,6 +469,24 @@ public interface UserApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a user&#x27;s activity feeds
*
* @param username username of user (required)
* @param onlyPerformedBy if true, only show actions performed by the requested user (optional)
* @param date the date of the activities to be found (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Activity&gt;&gt;
*/
@GET("users/{username}/activities/feeds")
Call<List<Activity>> userListActivityFeeds(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("only-performed-by") Boolean onlyPerformedBy,
@retrofit2.http.Query("date") Date date,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the authenticated user&#x27;s email addresses
*
@@ -0,0 +1,373 @@
/*
* 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.Date;
import java.util.Objects;
/** Activity */
public class Activity implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("act_user")
private User actUser = null;
@SerializedName("act_user_id")
private Long actUserId = null;
@SerializedName("comment")
private Comment comment = null;
@SerializedName("comment_id")
private Long commentId = null;
@SerializedName("content")
private String content = null;
@SerializedName("created")
private Date created = null;
@SerializedName("id")
private Long id = null;
@SerializedName("is_private")
private Boolean isPrivate = null;
@SerializedName("op_type")
private String opType = null;
@SerializedName("ref_name")
private String refName = null;
@SerializedName("repo")
private Repository repo = null;
@SerializedName("repo_id")
private Long repoId = null;
@SerializedName("user_id")
private Long userId = null;
public Activity actUser(User actUser) {
this.actUser = actUser;
return this;
}
/**
* Get actUser
*
* @return actUser
*/
@Schema(description = "")
public User getActUser() {
return actUser;
}
public void setActUser(User actUser) {
this.actUser = actUser;
}
public Activity actUserId(Long actUserId) {
this.actUserId = actUserId;
return this;
}
/**
* Get actUserId
*
* @return actUserId
*/
@Schema(description = "")
public Long getActUserId() {
return actUserId;
}
public void setActUserId(Long actUserId) {
this.actUserId = actUserId;
}
public Activity comment(Comment comment) {
this.comment = comment;
return this;
}
/**
* Get comment
*
* @return comment
*/
@Schema(description = "")
public Comment getComment() {
return comment;
}
public void setComment(Comment comment) {
this.comment = comment;
}
public Activity commentId(Long commentId) {
this.commentId = commentId;
return this;
}
/**
* Get commentId
*
* @return commentId
*/
@Schema(description = "")
public Long getCommentId() {
return commentId;
}
public void setCommentId(Long commentId) {
this.commentId = commentId;
}
public Activity content(String content) {
this.content = content;
return this;
}
/**
* Get content
*
* @return content
*/
@Schema(description = "")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Activity created(Date created) {
this.created = created;
return this;
}
/**
* Get created
*
* @return created
*/
@Schema(description = "")
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public Activity 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 Activity isPrivate(Boolean isPrivate) {
this.isPrivate = isPrivate;
return this;
}
/**
* Get isPrivate
*
* @return isPrivate
*/
@Schema(description = "")
public Boolean isIsPrivate() {
return isPrivate;
}
public void setIsPrivate(Boolean isPrivate) {
this.isPrivate = isPrivate;
}
public Activity opType(String opType) {
this.opType = opType;
return this;
}
/**
* Get opType
*
* @return opType
*/
@Schema(description = "")
public String getOpType() {
return opType;
}
public void setOpType(String opType) {
this.opType = opType;
}
public Activity refName(String refName) {
this.refName = refName;
return this;
}
/**
* Get refName
*
* @return refName
*/
@Schema(description = "")
public String getRefName() {
return refName;
}
public void setRefName(String refName) {
this.refName = refName;
}
public Activity repo(Repository repo) {
this.repo = repo;
return this;
}
/**
* Get repo
*
* @return repo
*/
@Schema(description = "")
public Repository getRepo() {
return repo;
}
public void setRepo(Repository repo) {
this.repo = repo;
}
public Activity repoId(Long repoId) {
this.repoId = repoId;
return this;
}
/**
* Get repoId
*
* @return repoId
*/
@Schema(description = "")
public Long getRepoId() {
return repoId;
}
public void setRepoId(Long repoId) {
this.repoId = repoId;
}
public Activity userId(Long userId) {
this.userId = userId;
return this;
}
/**
* Get userId
*
* @return userId
*/
@Schema(description = "")
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Activity activity = (Activity) o;
return Objects.equals(this.actUser, activity.actUser)
&& Objects.equals(this.actUserId, activity.actUserId)
&& Objects.equals(this.comment, activity.comment)
&& Objects.equals(this.commentId, activity.commentId)
&& Objects.equals(this.content, activity.content)
&& Objects.equals(this.created, activity.created)
&& Objects.equals(this.id, activity.id)
&& Objects.equals(this.isPrivate, activity.isPrivate)
&& Objects.equals(this.opType, activity.opType)
&& Objects.equals(this.refName, activity.refName)
&& Objects.equals(this.repo, activity.repo)
&& Objects.equals(this.repoId, activity.repoId)
&& Objects.equals(this.userId, activity.userId);
}
@Override
public int hashCode() {
return Objects.hash(
actUser, actUserId, comment, commentId, content, created, id, isPrivate, opType, refName,
repo, repoId, userId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Activity {\n");
sb.append(" actUser: ").append(toIndentedString(actUser)).append("\n");
sb.append(" actUserId: ").append(toIndentedString(actUserId)).append("\n");
sb.append(" comment: ").append(toIndentedString(comment)).append("\n");
sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" isPrivate: ").append(toIndentedString(isPrivate)).append("\n");
sb.append(" opType: ").append(toIndentedString(opType)).append("\n");
sb.append(" refName: ").append(toIndentedString(refName)).append("\n");
sb.append(" repo: ").append(toIndentedString(repo)).append("\n");
sb.append(" repoId: ").append(toIndentedString(repoId)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).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 ");
}
}