diff --git a/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java b/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java index ffea96d..27d89be 100644 --- a/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java +++ b/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java @@ -34,18 +34,16 @@ @Path("/{account_id}/books/{book_id}/todos") @GET @Produces(MediaType.APPLICATION_JSON) - public HashMap>>> getName(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @QueryParam("token") String token) { + public HashMap>>> getAllTodos(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @QueryParam("token") String token) { return todoManager.getAllTodos(account_id, book_id, token); - //account部分のリスト名要変更 - //ドット部分以降打合せ(相手の関数名に合わせる) + } //指定された本の指定された年と月のtodoをすべて返す - //yearとmonthはintなのか!!! @Path("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}") @GET @Produces(MediaType.APPLICATION_JSON) - public HashMap> getTodoMonth(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @QueryParam("token") String token) { + public HashMap> getTodosByMonth(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @QueryParam("token") String token) { return todoManager.getTodosByMonth(account_id, book_id, year, month,token); } @@ -53,7 +51,7 @@ @Path("/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") @GET @Produces(MediaType.APPLICATION_JSON) - public HashMap getTodo(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @QueryParam("token") String token) { + public HashMap getTodosByDay(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @QueryParam("token") String token) { return todoManager.getTodosByDay(account_id, book_id, year, month, day, token); } @@ -62,7 +60,7 @@ @Path("/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}") @GET @Produces(MediaType.APPLICATION_JSON) - public Todo getTodo(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @PathParam("todo_id") Integer todo_id, @QueryParam("token") String token) { + public Todo getTodoById(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @PathParam("todo_id") Integer todo_id, @QueryParam("token") String token) { Todo todo = todoManager.getTodoById(account_id, book_id, year, month, day, todo_id, token); return todo; } @@ -71,7 +69,7 @@ @POST @Path("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) - public void putTodo(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @FormParam("title") String title,@QueryParam("token") String token) { + public void createTodo(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @FormParam("title") String title,@QueryParam("token") String token) { todoManager.createTodo(account_id, book_id, year, month, day, title,token); }