Commit 547cf5c2 by Kunj

Fixed - Catalogue categories and catalogue Items is not showing images.

parent 2e0fe6d9
......@@ -16,9 +16,7 @@ import retrofit2.http.Query;
public interface CatalogueCategoryApi {
// Get Catalogue API
@GET(Constants.URL_GET_CATALOGUE)
Call<ResponseBody> getCatalogue(@Query(Constants.URL_PARAM_SYSPRM_QUERY) String sysparmQuery,
@Query(Constants.URL_PARAM_SYSPRM_FIELDS) String sysParmFields,
@Query(Constants.URL_PARAM_SYSPRM_DISPLAY_VALUE) String sysParmDisplayValue);
Call<ResponseBody> getCatalogue(@Query(Constants.URL_PARAM_SYS_ID) String sysId);
// Get Catalogue Order API
@GET(Constants.URL_GET_CATALOGUE_ORDER)
......
......@@ -16,9 +16,7 @@ import retrofit2.http.Query;
public interface CatalogueCategoryItemApi {
// Get Catalogue Item API
@GET(Constants.URL_GET_CATALOGUE_ITEM)
Call<ResponseBody> getCatalogueItem(@Query(Constants.URL_PARAM_SYSPRM_QUERY) String sysparmQuery,
@Query(Constants.URL_PARAM_SYSPRM_FIELDS) String sysParmFields,
@Query(Constants.URL_PARAM_SYSPRM_DISPLAY_VALUE) String sysParmDisplayValue);
Call<ResponseBody> getCatalogueItem(@Query(Constants.URL_PARAM_SYS_ID) String sysId);
}
......@@ -44,11 +44,6 @@ public class CatalogueApiManager {
public static void getCatalogues(Context context, final GetCatalogueApiListener listener) {
CatalogueLog.d("CatalogueApiManager: getCatalogues: ");
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(Catalogue.Json.URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE);
stringBuilder.append("=e0d08b13c3330100c8b837659bba8fb4");
stringBuilder.append("^active=true");
CatalogueLog.d("CatalogueApiManager: getCatalogues: request parameter: "+stringBuilder.toString());
String accessToken = PrefManager.getSharedPref(context, PrefManager.PREFERENCE_ACCESS_TOKEN);
if(accessToken.isEmpty()) {
......@@ -56,7 +51,7 @@ public class CatalogueApiManager {
return;
}
final Retrofit retrofit = RestClient.getInitializedRestAdapter(accessToken);
Call<ResponseBody> call = retrofit.create(CatalogueCategoryApi.class).getCatalogue(stringBuilder.toString(), "sys_id,title,description,homepage_image", "true");
Call<ResponseBody> call = retrofit.create(CatalogueCategoryApi.class).getCatalogue("e0d08b13c3330100c8b837659bba8fb4");
try {
//Retrofit synchronous call
Response<ResponseBody> response = call.execute();
......
......@@ -40,12 +40,6 @@ public class CatalogueItemApiManager {
public static void getCatalogueItems(Context context, String catalogueSysId, GetCatalogueItemApiListener listener) {
CatalogueLog.d("CatalogueItemApiManager: getCatalogueItems: ");
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(CatalogueItem.Json.URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE);
stringBuilder.append("=");
stringBuilder.append(catalogueSysId);
stringBuilder.append("^active=true");
CatalogueLog.d("CatalogueItemApiManager: getCatalogueItems: request parameter: "+stringBuilder.toString());
String accessToken = PrefManager.getSharedPref(context, PrefManager.PREFERENCE_ACCESS_TOKEN);
if(accessToken.isEmpty()) {
......@@ -53,7 +47,7 @@ public class CatalogueItemApiManager {
return;
}
final Retrofit retrofit = RestClient.getInitializedRestAdapter(accessToken);
Call<ResponseBody> call = retrofit.create(CatalogueCategoryItemApi.class).getCatalogueItem(stringBuilder.toString(), "sys_id,short_description,name,description,icon", "true");
Call<ResponseBody> call = retrofit.create(CatalogueCategoryItemApi.class).getCatalogueItem(catalogueSysId);
try {
//Retrofit synchronous call
Response<ResponseBody> response = call.execute();
......
......@@ -130,11 +130,11 @@ public class Constants {
public static final String URL_REFRESH_LOGIN = URL_POST_LOGIN_ITEM;
/*Catalogue Category API */
public static final String URL_GET_CATALOGUE = API_PATH + "sc_category";
public static final String URL_GET_CATALOGUE = DOMAIN + "api/uno33/uofl_mobile/category";
public static final String URL_GET_CATALOGUE_ORDER = DOMAIN + "api/uno33/uofl_mobile/catalohhome";
/*Catalogue Category Items API */
public static final String URL_GET_CATALOGUE_ITEM = API_PATH + "sc_cat_item";
public static final String URL_GET_CATALOGUE_ITEM = DOMAIN + "api/uno33/uofl_mobile/catalog_item";
/*Variable form API */
public static final String URL_GET_VARIABLE = "/api/uno33/uofl_mobile/variables";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment