| | package org.ntlab.acanthus_client.resources.gallery; |
---|
| | |
---|
| | import org.ntlab.acanthus_client.entities.Position; |
---|
| | import org.ntlab.acanthus_client.entities.Stroke; |
---|
| | |
---|
| | import java.util.ArrayList; |
---|
| | |
---|
| | import retrofit2.Call; |
---|
| | import retrofit2.http.Field; |
---|
| | import retrofit2.http.FormUrlEncoded; |
---|
| | import retrofit2.http.GET; |
---|
| | import retrofit2.http.POST; |
---|
| | import retrofit2.http.Path; |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | // RestAPI: /gallery/{aid}/pageMap/{pid}/layers/{layerNo}/ |
---|
| | public interface StrokesRest { |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | // |
---|
| | @GET("gallery/{aid}/pageMap/0/layers/0/strokes") |
---|
| | Call<ArrayList<Stroke>> getStrokes(@Path("aid") Integer aid); |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | // |
---|
| | @FormUrlEncoded |
---|
| | @POST("gallery/{aid}/pageMap/0/layers/0/strokes") |
---|
| | Call<Integer> addStrokes(@Path("aid") Integer aid, @Field("uid") Integer uid, @Field("uidToken") String uidToken, |
---|
| | @Field("pen") Integer pen, @Field("color") Integer color, @Field("thick") Integer thick); |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | // |
---|
| | @GET("gallery/{aid}/pageMap/0/layers/0/strokes/{strokeNo}/position") |
---|
| | Call<ArrayList<Position>> getPositions(@Path("aid") Integer aid, @Path("strokeNo") Integer strokeNo); |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | // |
---|
| | @FormUrlEncoded |
---|
| | @POST("gallery/{aid}/pageMap/0/layers/0/strokes/{strokeNo}/position") |
---|
| | Call<Integer> addPositions(@Path("aid") Integer aid, @Path("strokeNo") Integer strokeNo, |
---|
| | @Field("x") Float x, @Field("y") Float y); |
---|
| | //----------------------------------------------------------------- |
---|
| | } |
---|
| | |
---|
| | |