| |
---|
| | import retrofit2.http.Query; |
---|
| | |
---|
| | public interface TodosRest { |
---|
| | |
---|
| | @GET("/accounts/{account_id}/books/{book_id}/todos") |
---|
| | @GET("accounts/{account_id}/books/{book_id}/todos") |
---|
| | Call<HashMap<Integer, HashMap<Integer, HashMap<Integer, HashMap<Integer, Todo>>>>> getAllTodos( |
---|
| | @Path("account_id") String accountId, |
---|
| | @Path("book_id") Integer bookId, |
---|
| | @Query("token") String token |
---|
| | ); |
---|
| | |
---|
| | @GET("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}") |
---|
| | @GET("accounts/{account_id}/books/{book_id}/todos/{year}/{month}") |
---|
| | Call<HashMap<Integer, HashMap<Integer, Todo>>> getTodosByMonth( |
---|
| | @Path("account_id") String accountId, |
---|
| | @Path("book_id") Integer bookId, |
---|
| | @Path("year") Integer year, |
---|
| | @Path("month") Integer month, |
---|
| | @Query("token") String token |
---|
| | ); |
---|
| | |
---|
| | @GET("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") |
---|
| | @GET("accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") |
---|
| | Call<HashMap<Integer, Todo>> getTodosByDay( |
---|
| | @Path("account_id") String accountId, |
---|
| | @Path("book_id") Integer bookId, |
---|
| | @Path("year") Integer year, |
---|
| |
---|
| | @Path("day") Integer day, |
---|
| | @Query("token") String token |
---|
| | ); |
---|
| | |
---|
| | @GET("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}") |
---|
| | @GET("accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}") |
---|
| | Call<Todo> getTodoById( |
---|
| | @Path("account_id") String accountId, |
---|
| | @Path("book_id") Integer bookId, |
---|
| | @Path("year") Integer year, |
---|
| |
---|
| | @Query("token") String token |
---|
| | ); |
---|
| | |
---|
| | @FormUrlEncoded |
---|
| | @POST("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") |
---|
| | @POST("accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") |
---|
| | Call<Todo> createTodo( |
---|
| | @Path("account_id") String accountId, |
---|
| | @Path("book_id") Integer bookId, |
---|
| | @Path("year") Integer year, |
---|
| |
---|
| | @Field("title") String title, |
---|
| | @Field("token") String token |
---|
| | ); |
---|
| | @FormUrlEncoded |
---|
| | @PUT("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}/check") |
---|
| | @PUT("accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}/check") |
---|
| | Call<Void> setCheck( |
---|
| | @Path("account_id") String accountId, |
---|
| | @Path("book_id") Integer bookId, |
---|
| | @Path("year") Integer year, |
---|
| |
---|
| | @Field("check") boolean check, |
---|
| | @Field("token") String token |
---|
| | ); |
---|
| | |
---|
| | @DELETE("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}") |
---|
| | @DELETE("accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}") |
---|
| | Call<Void> deleteTodoById( |
---|
| | @Path("account_id") String accountId, |
---|
| | @Path("book_id") Integer bookId, |
---|
| | @Path("year") Integer year, |
---|
| |
---|
| | |