use of com.zype.android.webapi.model.consumers.ConsumerFavoriteVideo in project zype-android by zype.
the class FavoritesFragment method handleConsumerFavoriteVideo.
// ///////////
// Subscriptions
//
@Subscribe
public void handleConsumerFavoriteVideo(ConsumerFavoriteVideoEvent event) {
Logger.d("handleConsumerFavoriteVideo");
ConsumerFavoriteVideo favorite = event.getEventData().getModelData();
if (Pagination.hasNextPage(favorite.getPagination()) && !favorite.getResponse().isEmpty()) {
requestConsumerFavoriteVideo(Pagination.getNextPage(favorite.getPagination()));
}
DataHelper.insertFavorites(getActivity().getContentResolver(), favorite.getResponse());
// Retrieve videos
for (ConsumerFavoriteVideoData item : favorite.getResponse()) {
VideoParamsBuilder builder = new VideoParamsBuilder().addVideoId(item.getVideoId());
getApi().executeRequest(WebApiManager.Request.VIDEO_LIST, builder.build());
}
}
Aggregations