diff --git a/app/src/main/java/com/example/nemophila/viewmodels/AccountViewModel.java b/app/src/main/java/com/example/nemophila/viewmodels/AccountViewModel.java index c25a5fd..cc86a83 100644 --- a/app/src/main/java/com/example/nemophila/viewmodels/AccountViewModel.java +++ b/app/src/main/java/com/example/nemophila/viewmodels/AccountViewModel.java @@ -12,9 +12,9 @@ import retrofit2.converter.jackson.JacksonConverterFactory; public class AccountViewModel extends ViewModel { - - final private Retrofit retrofit; - final private AccountsRest accountsRest; + // フィールド + private final Retrofit retrofit; + private final AccountsRest accountsRest; // コンストラクタ public AccountViewModel() { @@ -25,31 +25,31 @@ this.accountsRest = retrofit.create(AccountsRest.class); } -// // アカウント情報の取得 -// public void getAccount(String uid) { -// Call call = accountsRest.getAccount(uid); -// -// call.enqueue(new Callback() { -// @Override -// public void onResponse(Call) call, Response response) { -// } -// @Override -// public void onFailure(Call call, Throwable t) { -// } -// }); -// } -// -// // アカウント名の変更 -// public void changeName(String uid, String name, String token) { -// Call call = accountsRest.changeName(uid, name, token); -// -// call.enqueue(new Callback() { -// @Override -// public void onResponse(Call) call, Response response) { -// } -// @Override -// public void onFailure(Call call, Throwable t) { -// } -// }); -// } + // アカウント情報の取得 + public void getAccount(String uid) { + Call call = accountsRest.getAccount(uid); + + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + } + @Override + public void onFailure(Call call, Throwable t) { + } + }); + } + + // アカウント名の変更 + public void changeName(String uid, String name, String token) { + Call call = accountsRest.changeName(uid, name, token); + + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + } + @Override + public void onFailure(Call call, Throwable t) { + } + }); + } }