package org.lagonette.app.api.service;

import org.lagonette.app.BuildConfig;
import org.lagonette.app.api.response.CategoriesResponse;
import org.lagonette.app.api.response.PartnersResponse;

import retrofit2.Call;
import retrofit2.http.GET;

public interface LaGonetteService {

    String HOST = BuildConfig.USE_DEV_API ? "http://82.225.211.150:18001/dolibarr/htdocs/" : "https://dolibarr.lagonette.org/";

    String ENDPOINT_CATEGORIES = "partnersinterface.php?format=app_categories";

    String ENDPOINT_PARTNERS = "partnersinterface.php?format=app_partners";

    interface Category {

        @GET(ENDPOINT_CATEGORIES)
        Call<CategoriesResponse> getCategories();

    }

    interface Partner {

        @GET(ENDPOINT_PARTNERS)
        Call<PartnersResponse> getPartners();

    }

}


@@ -508,61 +508,249 @@
 INT_
-PARTNERS = %22partnersinterface.php?format=app_partners
+CATEGORIES_MD5 = %22partnersinterface.php?format=app_categories&hashonly=1%22;%0A%0A    String ENDPOINT_PARTNERS = %22partnersinterface.php?format=app_partners%22;%0A%0A    String ENDPOINT_PARTNERS_MD5 = %22partnersinterface.php?format=app_partners&hashonly=1
 %22;%0A%0A
@@ -856,24 +856,104 @@
 egories();%0A%0A
+        @GET(ENDPOINT_CATEGORIES_MD5)%0A        Call%3CString%3E getCategoriesMd5();%0A%0A
     %7D%0A%0A    i
@@ -1047,22 +1047,98 @@
 artners();%0A%0A
+        @GET(ENDPOINT_PARTNERS_MD5)%0A        Call%3CString%3E getPartnersMd5();%0A%0A
     %7D%0A%0A%7D%0A%0A

Add new md5 endpoints