signupとloginのREST作成 #7

Merged t-watanabe merged 1 commit into nitta-lab-2024:master from nitta-lab-2024:AccountsRest on 18 Jun
Showing 1 changed file
View
26
app/src/main/java/com/example/citrusclient/rest/AccountsRest.java
package com.example.citrusclient.rest;
 
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.Path;
 
public interface AccountsRest {
 
// @FormUrlEncoded
// @GET("accounts")
// Call<Void> getAllAccounts(
//
// );
 
@FormUrlEncoded
@POST("accounts")
Call<String> signup(
@Field("account_id") String account_id,
@Field("password") String password
);
 
@FormUrlEncoded
@POST("accounts/{account_id}/login")
Call<String> login(
@Path("account_id") String account_id,
@Field("password") String password
);
}