pda/zhuike/.svn/pristine/31/31e35a392e2dbb3cac33ebc4d11...

30 lines
913 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.novelbook.android.netsubscribe;
import com.novelbook.android.netutils.HttpMethods;
import java.util.HashMap;
import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.observers.DisposableObserver;
import okhttp3.ResponseBody;
/**
* Created by 眼神 on 2018/3/27.
* 建议把功能模块来分别存放不同的请求方法比如登录注册类LoginSubscribe、电影类MovieSubscribe
*/
public class MovieSubscribe {
/**
* 获取数据
*/
public static void getData(int pageNumber, int count,DisposableObserver<ResponseBody> subscriber) {
Map<String,Integer> map = new HashMap<>();
map.put("start",pageNumber);
map.put("count",count);
Observable<ResponseBody> observable = HttpMethods.getInstance().getHttpApi().getDataForMap(map);
HttpMethods.getInstance().toSubscribe(observable, subscriber);
}
}