diff --git a/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/WorkRest.java b/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/WorkRest.java index 68c559c..e0d57e4 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/WorkRest.java +++ b/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/WorkRest.java @@ -1,4 +1,46 @@ package org.ntlab.acanthus_client.resources.accounts; +import org.ntlab.acanthus_client.entities.AidJson; +import org.ntlab.acanthus_client.entities.Work; +import org.ntlab.acanthus_client.entities.WorkJson; + +import java.util.Collection; + +import retrofit2.Call; +import retrofit2.http.Field; +import retrofit2.http.FormUrlEncoded; +import retrofit2.http.GET; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Path; +import retrofit2.http.Query; + public interface WorkRest { + //----------------------------------------------------------------- + // 各ユーザーの作品を取得する + @GET("accounts/{uid}/work") + Call getWork( + @Path("uid") Integer uid, + @Query("token") String token + ); + //----------------------------------------------------------------- + // 新しい作品を制作する + @FormUrlEncoded + @POST("accounts/{uid}/work") + Call createWork( + @Path("uid") Integer uid, + @Field("name") String animationName, + @Field("token") String token + ); + //----------------------------------------------------------------- + // 作品への参加を許可する + @FormUrlEncoded + @PUT("accounts/{uid}/work") + Call updateWork( + @Path("uid")String invitedUid, + @Field("token") String invitedToken, + @Field("aid") Integer aid + ); + + //----------------------------------------------------------------- }