Search in sources :

Example 1 with ZhihuStory

use of com.looklook.xinghongfei.looklook.bean.zhihu.ZhihuStory in project LookLook by xinghongfei.

the class ZhihuStoryPresenterImpl method getZhihuStory.

@Override
public void getZhihuStory(String id) {
    Subscription s = ApiManage.getInstence().getZhihuApiService().getZhihuStory(id).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<ZhihuStory>() {

        @Override
        public void onCompleted() {
        }

        @Override
        public void onError(Throwable e) {
            mIZhihuStory.showError(e.getMessage());
        }

        @Override
        public void onNext(ZhihuStory zhihuStory) {
            mIZhihuStory.showZhihuStory(zhihuStory);
        }
    });
    addSubscription(s);
}
Also used : Subscription(rx.Subscription) IZhihuStory(com.looklook.xinghongfei.looklook.presenter.implView.IZhihuStory) ZhihuStory(com.looklook.xinghongfei.looklook.bean.zhihu.ZhihuStory)

Aggregations

ZhihuStory (com.looklook.xinghongfei.looklook.bean.zhihu.ZhihuStory)1 IZhihuStory (com.looklook.xinghongfei.looklook.presenter.implView.IZhihuStory)1 Subscription (rx.Subscription)1