Newer
Older
CitrusClient / app / src / main / java / com / example / citrusclient / rest / AccountsRest.java
  1. package com.example.citrusclient.rest;
  2.  
  3. import retrofit2.Call;
  4. import retrofit2.http.Field;
  5. import retrofit2.http.FormUrlEncoded;
  6. import retrofit2.http.POST;
  7. import retrofit2.http.Path;
  8.  
  9. public interface AccountsRest {
  10.  
  11. // @FormUrlEncoded
  12. // @GET("accounts")
  13. // Call<Void> getAllAccounts(
  14. //
  15. // );
  16.  
  17. @FormUrlEncoded
  18. @POST("accounts")
  19. Call<String> signup(
  20. @Field("account_id") String account_id,
  21. @Field("password") String password
  22. );
  23.  
  24. @FormUrlEncoded
  25. @POST("accounts/{account_id}/login")
  26. Call<String> login(
  27. @Path("account_id") String account_id,
  28. @Field("password") String password
  29. );
  30. }