Merge pull request 'Add endpoints to custom API path after pipeline fixing.' (#12) from fixes into main

Reviewed-on: https://codeberg.org/gitnex/tea4j-autodeploy/pulls/12
This commit is contained in:
M M Arif
2023-11-12 18:22:43 +00:00
2 changed files with 16 additions and 14 deletions
@@ -1,12 +1,10 @@
package org.gitnex.tea4j.v2.apis.custom;
import java.util.List;
import org.gitnex.tea4j.v2.models.*;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.*;
import java.util.List;
public interface CustomApi {
@GET("repos/{owner}/{repo}/contents/{filepath}")
@@ -100,14 +98,14 @@ public interface CustomApi {
@HTTP(method = "DELETE", path = "user/emails", hasBody = true)
Call<Void> userDeleteEmailWithBody(@Body DeleteEmailOption body);
@Headers({"Content-Type:application/json"})
@GET("notifications")
Call<List<NotificationThread>> notifyGetList2(
@retrofit2.http.Query("all") Boolean all,
@retrofit2.http.Query("status-types") List<String> statusTypes,
@retrofit2.http.Query("subject-type") List<String> subjectType,
@retrofit2.http.Query("since") String since,
@retrofit2.http.Query("before") String before,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
@Headers({"Content-Type:application/json"})
@GET("notifications")
Call<List<NotificationThread>> notifyGetList2(
@retrofit2.http.Query("all") Boolean all,
@retrofit2.http.Query("status-types") List<String> statusTypes,
@retrofit2.http.Query("subject-type") List<String> subjectType,
@retrofit2.http.Query("since") String since,
@retrofit2.http.Query("before") String before,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
}
@@ -3,7 +3,6 @@ package org.gitnex.tea4j.v2.apis.custom;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Path;
import retrofit2.http.Streaming;
@@ -30,4 +29,9 @@ public interface WebApi {
@Path("repo") String repo,
@Path("sha") String sha,
@Path("diffType") String diffType);
@Streaming
@GET("attachments/{hashid}")
Call<ResponseBody> getAttachment(
@Path("hashid") String hashid);
}