diff --git a/app/src/main/java/org/ntlab/irisclient/resources/RoomRest.java b/app/src/main/java/org/ntlab/irisclient/resources/RoomRest.java new file mode 100644 index 0000000..d737356 --- /dev/null +++ b/app/src/main/java/org/ntlab/irisclient/resources/RoomRest.java @@ -0,0 +1,36 @@ +package org.ntlab.irisclient.resources; + +import org.ntlab.irisclient.models.Member; +import org.ntlab.irisclient.models.Room; +import org.ntlab.irisclient.models.Settings; + +import java.util.List; + +import retrofit2.Call; +import retrofit2.http.Field; +import retrofit2.http.FormUrlEncoded; +import retrofit2.http.GET; +import retrofit2.http.PUT; +import retrofit2.http.Path; +import retrofit2.http.Query; + +public interface RoomRest { + + //--------------------------------------------------------------- + //roomの情報を取得する(メンバーリスト、ゲーム設定、部屋番号) + @GET("rooms/{rid}") + Call getRoomInformation( + @Path("rid")String rid + ); + + //--------------------------------------------------------------- + //ゲームを始める(オーナーのみ) + @FormUrlEncoded + @PUT("room/{rid}/state") + Call startGame( + @Path("rid")String rid, + @Field("nickname")String nickname, + @Field("state")Integer state + ); + +} \ No newline at end of file