Search in sources :

Example 1 with HttpRequestUtils

use of com.applozic.mobicomkit.api.HttpRequestUtils in project Applozic-Android-SDK by AppLozic.

the class ALGroupInfoTask method getChannelInfoByParameters.

// Cleanup: private
public ChannelModel getChannelInfoByParameters(String parameters) {
    String response = "";
    HttpRequestUtils httpRequestUtils = new HttpRequestUtils(context);
    ChannelModel model = new ChannelModel();
    try {
        response = httpRequestUtils.getResponse(getChannelInfoUrl() + "?" + parameters, "application/json", "application/json");
        ChannelFeedApiResponse channelFeedApiResponse = (ChannelFeedApiResponse) GsonUtils.getObjectFromJson(response, ChannelFeedApiResponse.class);
        Utils.printLog(context, "ChannelInfoTask", "Channel info response  is :" + response);
        if (channelFeedApiResponse != null) {
            model.setChannelFeedApiResponse(channelFeedApiResponse);
        }
    } catch (Exception e) {
        model.setException(e);
        e.printStackTrace();
    }
    return model;
}
Also used : HttpRequestUtils(com.applozic.mobicomkit.api.HttpRequestUtils) ChannelFeedApiResponse(com.applozic.mobicomkit.feed.ChannelFeedApiResponse)

Aggregations

HttpRequestUtils (com.applozic.mobicomkit.api.HttpRequestUtils)1 ChannelFeedApiResponse (com.applozic.mobicomkit.feed.ChannelFeedApiResponse)1