HomeFragmentでダミーTodo表示
1 parent b5b4bd5 commit 62dc6048169bc9b11dc3ace10266232e61d5e577
h-yamamoto authored on 2 Jul
Showing 5 changed files
View
4
app/src/main/java/com/example/citrusclient/models/Todo.java
month = m;
day = d;
todoId = tid;
}
 
public Todo(){}
 
 
 
//セッター
public void setTitle(String t) {title = t;}
public void setCheck(boolean c) {check = c;}
View
14
app/src/main/java/com/example/citrusclient/rest/TodosRest.java
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,
View
app/src/main/java/com/example/citrusclient/views/HomeFragment.java 0 → 100644
View
app/src/main/res/layout/a_todo.xml 0 → 100644
View
app/src/main/res/layout/fragment_home.xml 0 → 100644