use of com.zype.fire.api.Model.ProgramResponse in project zype-firebuilder by zype.
the class ZypeApi method loadEpgEvents.
public ProgramResponse loadEpgEvents(Channel channel, String startDate, String endDate) {
try {
HashMap<String, String> params = new HashMap<>();
params.put(APP_KEY, ZypeSettings.APP_KEY);
params.put(PER_PAGE, "500");
params.put("sort", "start_time");
params.put("order", "asc");
params.put("start_time.gte", startDate);
params.put("end_time.lte", endDate);
Response response = apiImpl.epgEvents(channel.id, params).execute();
if (response.isSuccessful()) {
return ((ProgramResponse) response.body());
} else {
return null;
}
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
Aggregations