use of com.example.aleksejkocergin.myapplication.WebmQuery in project RandomWebm by alkocher.
the class WebmDetailsFetcher method fetchWebmDetails.
public void fetchWebmDetails() {
ApolloCall<WebmQuery.Data> webmQuery = WebmApolloClient.getWebmApolloClient().query(new WebmQuery(webmId));
disposable.add(Rx2Apollo.from(webmQuery).observeOn(AndroidSchedulers.mainThread()).subscribeOn(Schedulers.io()).subscribeWith(new DisposableObserver<Response<WebmQuery.Data>>() {
@Override
public void onNext(Response<WebmQuery.Data> dataResponse) {
webmData.render(dataResponse.data());
}
@Override
public void onError(Throwable e) {
webmData.showErrorSnackbar();
}
@Override
public void onComplete() {
}
}));
}
Aggregations