diff --git a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java index edd39ca..bc9349d 100644 --- a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java +++ b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java @@ -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 userDeleteEmailWithBody(@Body DeleteEmailOption body); - @Headers({"Content-Type:application/json"}) - @GET("notifications") - Call> notifyGetList2( - @retrofit2.http.Query("all") Boolean all, - @retrofit2.http.Query("status-types") List statusTypes, - @retrofit2.http.Query("subject-type") List 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> notifyGetList2( + @retrofit2.http.Query("all") Boolean all, + @retrofit2.http.Query("status-types") List statusTypes, + @retrofit2.http.Query("subject-type") List 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); } diff --git a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/WebApi.java b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/WebApi.java index 58d8dde..fa8d21a 100644 --- a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/WebApi.java +++ b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/WebApi.java @@ -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 getAttachment( + @Path("hashid") String hashid); }