login and register

This commit is contained in:
2017-10-01 23:51:59 +03:00
parent dca2c7a71c
commit 9f9274acf5
23 changed files with 411 additions and 329 deletions

View File

@@ -1,6 +1,7 @@
package ch.pizzalink.android.api;
import ch.pizzalink.android.model.responseModel.CategoryResponseModel;
import ch.pizzalink.android.model.responseModel.LoginCustomerResponseModel;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
@@ -17,6 +18,26 @@ public interface ApiInterface {
@GET(ApiEndPoints.API_GET_ALL_CATEGORIES)
Call<CategoryResponseModel> getAllCategories();
@FormUrlEncoded
@POST(ApiEndPoints.API_REGISTER)
Call<LoginCustomerResponseModel> register(@Field("firstname") String firstname,
@Field("lastname") String lastname,
@Field("telephone") String telephone,
@Field("email") String email,
@Field("passsword") String passsword,
@Field("passsword1") String passswordRetype,
@Field("address_1") String addressLine1,
@Field("address_2") String addressLine2,
@Field("city") String passswocityrd,
@Field("postcode") String postcode,
@Field("country_id") String country_id,
@Field("zone_id") String zone_id);
@FormUrlEncoded
@POST(ApiEndPoints.API_LOGIN)
Call<LoginCustomerResponseModel> login(@Field("email") String email, @Field("password") String password);
/*
@GET(ApiEndPoints.API_GET_ALL_CATEGORIES)
Call<CategoryListResponseModel> getAllCategories();