mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-04 16:52:17 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -20,6 +20,7 @@ import org.gitnex.tea4j.v2.models.Organization;
|
||||
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
|
||||
import org.gitnex.tea4j.v2.models.Repository;
|
||||
import org.gitnex.tea4j.v2.models.Team;
|
||||
import org.gitnex.tea4j.v2.models.UpdateUserAvatarOption;
|
||||
import org.gitnex.tea4j.v2.models.User;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.*;
|
||||
@@ -140,6 +141,15 @@ public interface OrganizationApi {
|
||||
@DELETE("orgs/{org}")
|
||||
Call<Void> orgDelete(@retrofit2.http.Path("org") String org);
|
||||
|
||||
/**
|
||||
* Delete Avatar
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("orgs/{org}/avatar")
|
||||
Call<Void> orgDeleteAvatar(@retrofit2.http.Path("org") String org);
|
||||
|
||||
/**
|
||||
* Delete a hook
|
||||
*
|
||||
@@ -550,6 +560,18 @@ public interface OrganizationApi {
|
||||
@retrofit2.http.Path("org") String org,
|
||||
@retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* Update Avatar
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@POST("orgs/{org}/avatar")
|
||||
Call<Void> orgUpdateAvatar(
|
||||
@retrofit2.http.Path("org") String org, @retrofit2.http.Body UpdateUserAvatarOption body);
|
||||
|
||||
/**
|
||||
* Search for teams within an organization
|
||||
*
|
||||
|
||||
@@ -76,6 +76,7 @@ import org.gitnex.tea4j.v2.models.TopicResponse;
|
||||
import org.gitnex.tea4j.v2.models.TrackedTime;
|
||||
import org.gitnex.tea4j.v2.models.TransferRepoOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateFileOptions;
|
||||
import org.gitnex.tea4j.v2.models.UpdateRepoAvatarOption;
|
||||
import org.gitnex.tea4j.v2.models.User;
|
||||
import org.gitnex.tea4j.v2.models.WatchInfo;
|
||||
import org.gitnex.tea4j.v2.models.WikiCommitList;
|
||||
@@ -563,6 +564,17 @@ public interface RepositoryApi {
|
||||
Call<Void> repoDelete(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* Delete avatar
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("repos/{owner}/{repo}/avatar")
|
||||
Call<Void> repoDeleteAvatar(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* Delete a specific branch from a repository
|
||||
*
|
||||
@@ -2158,6 +2170,21 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Path("id") Long id);
|
||||
|
||||
/**
|
||||
* Update avatar
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@POST("repos/{owner}/{repo}/avatar")
|
||||
Call<Void> repoUpdateAvatar(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body UpdateRepoAvatarOption body);
|
||||
|
||||
/**
|
||||
* Update a file in a repository
|
||||
*
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.gitnex.tea4j.v2.models.Repository;
|
||||
import org.gitnex.tea4j.v2.models.StopWatch;
|
||||
import org.gitnex.tea4j.v2.models.Team;
|
||||
import org.gitnex.tea4j.v2.models.TrackedTime;
|
||||
import org.gitnex.tea4j.v2.models.UpdateUserAvatarOption;
|
||||
import org.gitnex.tea4j.v2.models.User;
|
||||
import org.gitnex.tea4j.v2.models.UserHeatmapData;
|
||||
import org.gitnex.tea4j.v2.models.UserSettings;
|
||||
@@ -349,6 +350,14 @@ public interface UserApi {
|
||||
Call<Void> userDeleteAccessToken(
|
||||
@retrofit2.http.Path("username") String username, @retrofit2.http.Path("token") String token);
|
||||
|
||||
/**
|
||||
* Delete Avatar
|
||||
*
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("user/avatar")
|
||||
Call<Void> userDeleteAvatar();
|
||||
|
||||
/**
|
||||
* Delete email addresses
|
||||
*
|
||||
@@ -633,6 +642,16 @@ public interface UserApi {
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* Update Avatar
|
||||
*
|
||||
* @param body (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@POST("user/avatar")
|
||||
Call<Void> userUpdateAvatar(@retrofit2.http.Body UpdateUserAvatarOption body);
|
||||
|
||||
/**
|
||||
* update an OAuth2 Application, this includes regenerating the client secret
|
||||
*
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** UpdateRepoAvatarUserOption options when updating the repo avatar */
|
||||
@Schema(description = "UpdateRepoAvatarUserOption options when updating the repo avatar")
|
||||
public class UpdateRepoAvatarOption implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("image")
|
||||
private String image = null;
|
||||
|
||||
public UpdateRepoAvatarOption image(String image) {
|
||||
this.image = image;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* image must be base64 encoded
|
||||
*
|
||||
* @return image
|
||||
*/
|
||||
@Schema(description = "image must be base64 encoded")
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
UpdateRepoAvatarOption updateRepoAvatarOption = (UpdateRepoAvatarOption) o;
|
||||
return Objects.equals(this.image, updateRepoAvatarOption.image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class UpdateRepoAvatarOption {\n");
|
||||
|
||||
sb.append(" image: ").append(toIndentedString(image)).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,83 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** UpdateUserAvatarUserOption options when updating the user avatar */
|
||||
@Schema(description = "UpdateUserAvatarUserOption options when updating the user avatar")
|
||||
public class UpdateUserAvatarOption implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("image")
|
||||
private String image = null;
|
||||
|
||||
public UpdateUserAvatarOption image(String image) {
|
||||
this.image = image;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* image must be base64 encoded
|
||||
*
|
||||
* @return image
|
||||
*/
|
||||
@Schema(description = "image must be base64 encoded")
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
UpdateUserAvatarOption updateUserAvatarOption = (UpdateUserAvatarOption) o;
|
||||
return Objects.equals(this.image, updateUserAvatarOption.image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class UpdateUserAvatarOption {\n");
|
||||
|
||||
sb.append(" image: ").append(toIndentedString(image)).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 ");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user