use of com.zype.fire.api.Model.ZobjectTopPlaylistResponse in project zype-firebuilder by zype.
the class ZypeApi method getZobjectTopPlayLists.
public ZobjectTopPlaylistResponse getZobjectTopPlayLists() {
try {
HashMap<String, String> params = new HashMap<>();
params.put(APP_KEY, ZypeSettings.APP_KEY);
Response response = apiImpl.getZobjectsForTopPlaylist(params).execute();
if (response.isSuccessful()) {
return (ZobjectTopPlaylistResponse) response.body();
} else {
return null;
}
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
use of com.zype.fire.api.Model.ZobjectTopPlaylistResponse in project zype-firebuilder by zype.
the class HeroSlider method loadContent.
public Observable<Boolean> loadContent() {
return Observable.just(true).subscribeOn(Schedulers.io()).observeOn(Schedulers.io()).flatMap(s -> {
ZobjectTopPlaylistResponse response = ZypeApi.getInstance().getZobjectTopPlayLists();
if (response != null) {
sliders.clear();
sliders.addAll(response.zobjectContents);
Collections.sort(sliders, (z1, z2) -> z1.priority < z2.priority ? -1 : 1);
}
return Observable.just(true);
});
}
use of com.zype.fire.api.Model.ZobjectTopPlaylistResponse in project zype-firebuilder by zype.
the class ZypeApi method getZobjectAutoPlayHeroLists.
public ZobjectTopPlaylistResponse getZobjectAutoPlayHeroLists() {
try {
HashMap<String, String> params = new HashMap<>();
params.put(APP_KEY, ZypeSettings.APP_KEY);
Response response = apiImpl.getZobjectsForAutoPlayHero(params).execute();
if (response.isSuccessful()) {
return (ZobjectTopPlaylistResponse) response.body();
} else {
return null;
}
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
Aggregations