Search in sources :

Example 1 with Meizhi

use of com.shizhefei.test.models.enties.Meizhi in project MVCHelper by LuckyJayce.

the class GankMeizhiOkHttp_Datasource method load.

private RequestHandle load(ResponseSender<List<Meizhi>> sender, final int page) {
    // http://gank.io/api/data/Android/10/1
    String url = new UrlBuilder("http://gank.io/api/data").sp("福利").sp("10").sp(page).build();
    GetMethod method = new GetMethod(url);
    method.executeAsync(sender, new MeizhiParser<List<Meizhi>>() {

        @Override
        protected void onParse(Response responses, List<Meizhi> meizhis) {
            mPage = page;
        }
    });
    return method;
}
Also used : Response(okhttp3.Response) GetMethod(com.shizhefei.mvc.http.okhttp.GetMethod) List(java.util.List) UrlBuilder(com.shizhefei.mvc.http.UrlBuilder) Meizhi(com.shizhefei.test.models.enties.Meizhi)

Aggregations

UrlBuilder (com.shizhefei.mvc.http.UrlBuilder)1 GetMethod (com.shizhefei.mvc.http.okhttp.GetMethod)1 Meizhi (com.shizhefei.test.models.enties.Meizhi)1 List (java.util.List)1 Response (okhttp3.Response)1