TodoRest修正
1 parent 00632c9 commit 1227c87539b1f2eb00e9157a942c4247bcb3fb7e
h-yamamoto authored on 20 Jun
Showing 1 changed file
View
14
app/src/main/java/com/example/citrusclient/rest/TodosRest.java
 
@GET("/accounts/{account_id}/books/{book_id}/todos")
Call<ArrayList<Todo>> getAllTodos(
@Path("account_id") String accountId,
@Path("book_id") String bookId,
@Path("book_id") Integer bookId,
@Query("token") String token
);
 
@GET("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}")
Call<ArrayList<Todo>> getTodosByMonth(
@Path("account_id") String accountId,
@Path("book_id") String bookId,
@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}")
Call<ArrayList<Todo>> getTodosByDay(
@Path("account_id") String accountId,
@Path("book_id") String bookId,
@Path("book_id") Integer bookId,
@Path("year") Integer year,
@Path("month") Integer month,
@Path("day") Integer day,
@Query("token") String token
 
@GET("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}")
Call<Todo> getTodoById(
@Path("account_id") String accountId,
@Path("book_id") String bookId,
@Path("book_id") Integer bookId,
@Path("year") Integer year,
@Path("month") Integer month,
@Path("day") Integer day,
@Path("todo_id") Integer todoId,
@FormUrlEncoded
@POST("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}")
Call<Todo> createTodo(
@Path("account_id") String accountId,
@Path("book_id") String bookId,
@Path("book_id") Integer bookId,
@Path("year") Integer year,
@Path("month") Integer month,
@Path("day") Integer day,
@Field("title") String title,
@FormUrlEncoded
@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") String bookId,
@Path("book_id") Integer bookId,
@Path("year") Integer year,
@Path("month") Integer month,
@Path("day") Integer day,
@Path("todo_id") Integer todoId,
 
@DELETE("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}")
Call<Void> deleteTodoById(
@Path("account_id") String accountId,
@Path("book_id") String bookId,
@Path("book_id") Integer bookId,
@Path("year") Integer year,
@Path("month") Integer month,
@Path("day") Integer day,
@Path("todo_id") Integer todoId,