initial commit
This commit is contained in:
125
app/src/main/java/ch/pizzalink/android/api/ApiInterface.java
Normal file
125
app/src/main/java/ch/pizzalink/android/api/ApiInterface.java
Normal file
@@ -0,0 +1,125 @@
|
||||
package ch.pizzalink.android.api;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
/**
|
||||
* Created by cimenmus on 04/02/2017.
|
||||
*/
|
||||
|
||||
public interface ApiInterface {
|
||||
|
||||
/*
|
||||
@GET(ApiEndPoints.API_GET_ALL_CATEGORIES)
|
||||
Call<CategoryListResponseModel> getAllCategories();
|
||||
|
||||
@GET(ApiEndPoints.API_GET_ALL_AUTHORS)
|
||||
Call<AuthorListResponseModel> getAllAuthors();
|
||||
|
||||
@GET(ApiEndPoints.API_GET_MAGAZINES)
|
||||
Call<MagazineListResponseModel> getMagazineList();
|
||||
|
||||
@GET(ApiEndPoints.API_GET_MAIN_PAGE_NEWS)
|
||||
Call<NewsListResponseModel> getMainPageNews();
|
||||
|
||||
@GET(ApiEndPoints.API_GET_NEWS_LIST_BY_CATEGORY)
|
||||
Call<NewsListResponseModel> getNewsListByCategory(@Query("category_id") String categoryId);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_NEWS_DETAILS)
|
||||
Call<NewsDetailsResponseModel> getNewsDetails(@Query("article_id") String articleId);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_NEWS_DETAILS)
|
||||
Call<NewsDetailsResponseModel> getVideoNewsDetails(@Query("article_id") String articleId, @Query("video") String video);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_TAGS_OF_NEWS)
|
||||
Call<NewsDetailsResponseModel> getTagsOfNews(@Query("getTagsByArticle") String articleId);
|
||||
|
||||
// NOT : tag ları yazarken boşluk yerine %20 işreti koy
|
||||
@GET(ApiEndPoints.API_GET_NEWS_LIST_BY_TAG)
|
||||
Call<NewsListResponseModel> getNewsListByTag(@Query("tag_name") String tagName);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_ARTICLES_OF_AUTHOR)
|
||||
Call<NewsListResponseModel> getArticlesOfAuthor(@Query("author_id") String authorId);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_ARTICLE_DETAILS)
|
||||
Call<NewsDetailsResponseModel> getArticleDetails(@Query("article_id") String articleId);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_EVENT_LOCATIONS)
|
||||
Call<EventLocationListResponseModel> getEventLocations();
|
||||
|
||||
@GET(ApiEndPoints.API_GET_CURRENT_EVENTS)
|
||||
Call<EventListResponseModel> getCurrentEvents();
|
||||
|
||||
@GET(ApiEndPoints.API_GET_CURRENT_EVENTS)
|
||||
Call<EventListResponseModel> getCurrentEvents(@Query("location") String locationName);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_UPCOMING_EVENTS)
|
||||
Call<EventListResponseModel> getUpcomingEvents(@Query("day") String dayCount);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_UPCOMING_EVENTS)
|
||||
Call<EventListResponseModel> getUpcomingEvents(@Query("day") String dayCount, @Query("location") String locationName);
|
||||
|
||||
@GET(ApiEndPoints.API_GET_SQUARE_ADS)
|
||||
Call<AdResponseModel> getSquareAds();
|
||||
|
||||
@GET(ApiEndPoints.API_GET_BANNER_ADS)
|
||||
Call<AdResponseModel> getBannerAds();
|
||||
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_CUSTOMER_LOGIN)
|
||||
Call<LoginCustomerResponseModel> loginUser(@Field("email") String email, @Field("password") String password);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_CUSTOMER_LOG_OUT)
|
||||
Call<ResponseModel> logoutUser(@Field("token") String customerToken);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_REGISTER_CUSTOMER)
|
||||
Call<LoginCustomerResponseModel> registerCustomer(@Field("customer_name") String name, @Field("customer_surname") String surname,
|
||||
@Field("customer_mail") String email, @Field("customer_phone") String phone,
|
||||
@Field("customer_password") String password);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_GET_CUSTOMER_INFO)
|
||||
Call<CustomerInfoResponseModel> getCustomerInfo(@Field("token") String customerToken);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_GET_STORE_CUSTOMER_INFO)
|
||||
Call<StoreCustomerInfoResponseModel> getStoreCustomerInfo(@Field("token") String customerToken);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_REFRESH_CUSTOMER_TOKEN)
|
||||
Call<RefreshTokenResponseModel> refreshCustomerToken(@Field("refresh_token") String refreshToken);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_REFRESH_STORE_CUSTOMER_TOKEN)
|
||||
Call<RefreshTokenResponseModel> refreshStoreCustomerToken(@Field("refresh_token") String refreshToken);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_GET_ALL_CAMPAIGNS)
|
||||
Call<AllCampaignsResponseModel> getAllCampaigns(@Field("token") String customerToken);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_GET_CAMPAIGN_DETAILS)
|
||||
Call<AllCampaignsResponseModel> getCampaignDetails(@Field("token") String customerToken,
|
||||
@Field("campaign_id") String campaignId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_GET_CAMPAIGN_LIST_OF_COMPANY)
|
||||
Call<AllCampaignsResponseModel> getCampaingsOfCompany(@Field("token") String customerToken,
|
||||
@Field("firm_barcode") String firmBarcode);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ApiEndPoints.API_STORE_CUSTOMER_LOGIN)
|
||||
Call<LoginStoreCustomerResponseModel> loginStoreCustomer(@Field("username") String email, @Field("password") String password);
|
||||
|
||||
|
||||
@POST(ApiEndPoints.API_CUSTOMER_LOGIN)
|
||||
Call<LoginCustomerResponseModel> loginUser(@Body HashMap<String, Object> body);
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user