// Path: app/src/main/java/com/tyq/jiemian/ui/callback/ZhihuApi.java
// public interface ZhihuApi {
// 
//     @GET("api/4/news/latest")
//     Observable<NewsEntity> getLastestNews();
// 
//     @GET("api/4/news/before/{id}")
//     Observable<NewsEntity> getBeforeNews(@Path("id") String id);
// 
//     @GET("api/4/news/{id}")
//     Observable<StoryDetailsEntity> getNewsDetails(@Path("id") int id);
// }
// 
// Path: app/src/main/java/com/tyq/jiemian/utils/Constant.java
// public class Constant {
//     public static final String TITLE = "title";
//     public static final String TECHNOLOGICAL_URL = "http://www.jiemian.com/lists/6.html";
//     public static final String ENTERTAINMENT_URL = "http://www.jiemian.com/lists/25.html";
//     public static final String NEWS_ITEM = "news_item";
//     public static final String NEWS_TITLE = "news_title";
//     public static final String Bmob_App_ID = "2cb3bdc19bf6e2240dbb8ae06a80cc24";
//     public static final String BASE_ZHIHU_URL = "http://news-at.zhihu.com/";
//     public static final String ITEM_ID = "item_id";
//     public static final String DB_NAME = "news_db";
//     public static final String NEWS_URL = "new_url";
//     public static final String POPULAR_NEWS_URL = "http://apis.baidu.com/3023/weixin/channel";
//     public static final String POPULAR_API_KEY = "891eeffe6f1b4652128542bb8c9971a2";
//     public static final String TRC_ROBOT_REC = "嗨,我是智能聊天机器人小er，聊两块钱的";
//     public static final String TRC_ROBOT_REST = "小er已经休息，请明天再聊。";
//     public static final String TRC_ROBOT_FAILED = "暂时无法回应";
//     public static final String TRC_KEY = "ae536b38aa743f17ecb5f0e65a8dfea9";
//     public static final String TRC_USER_ID = "diffey";
//     public static final String SEARCH_URL = "http://apis.baidu.com/songshuxiansheng/real_time/search_news";
//     public static final String SEARCH_ITEM = "search_item";
// }


import android.content.Context;
import com.tyq.jiemian.ui.callback.ZhihuApi;
import com.tyq.jiemian.utils.Constant;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
package com.tyq.jiemian.presenter;




/**
 * Created by tyq on 2016/5/15.
 */
public class ZhihuPresenter extends BasePresenter {



    public ZhihuPresenter(Context context) {
        super(context);
    }

    private  Retrofit retrofit = new Retrofit.Builder()
// Path: app/src/main/java/com/tyq/jiemian/ui/callback/ZhihuApi.java
// public interface ZhihuApi {
// 
//     @GET("api/4/news/latest")
//     Observable<NewsEntity> getLastestNews();
// 
//     @GET("api/4/news/before/{id}")
//     Observable<NewsEntity> getBeforeNews(@Path("id") String id);
// 
//     @GET("api/4/news/{id}")
//     Observable<StoryDetailsEntity> getNewsDetails(@Path("id") int id);
// }
// 
// Path: app/src/main/java/com/tyq/jiemian/utils/Constant.java
// public class Constant {
//     public static final String TITLE = "title";
//     public static final String TECHNOLOGICAL_URL = "http://www.jiemian.com/lists/6.html";
//     public static final String ENTERTAINMENT_URL = "http://www.jiemian.com/lists/25.html";
//     public static final String NEWS_ITEM = "news_item";
//     public static final String NEWS_TITLE = "news_title";
//     public static final String Bmob_App_ID = "2cb3bdc19bf6e2240dbb8ae06a80cc24";
//     public static final String BASE_ZHIHU_URL = "http://news-at.zhihu.com/";
//     public static final String ITEM_ID = "item_id";
//     public static final String DB_NAME = "news_db";
//     public static final String NEWS_URL = "new_url";
//     public static final String POPULAR_NEWS_URL = "http://apis.baidu.com/3023/weixin/channel";
//     public static final String POPULAR_API_KEY = "891eeffe6f1b4652128542bb8c9971a2";
//     public static final String TRC_ROBOT_REC = "嗨,我是智能聊天机器人小er，聊两块钱的";
//     public static final String TRC_ROBOT_REST = "小er已经休息，请明天再聊。";
//     public static final String TRC_ROBOT_FAILED = "暂时无法回应";
//     public static final String TRC_KEY = "ae536b38aa743f17ecb5f0e65a8dfea9";
//     public static final String TRC_USER_ID = "diffey";
//     public static final String SEARCH_URL = "http://apis.baidu.com/songshuxiansheng/real_time/search_news";
//     public static final String SEARCH_ITEM = "search_item";
// }


// Path: app/src/main/java/com/tyq/jiemian/presenter/ZhihuPresenter.java
import android.content.Context;
import com.tyq.jiemian.ui.callback.ZhihuApi;
import com.tyq.jiemian.utils.Constant;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

package com.tyq.jiemian.presenter;




/**
 * Created by tyq on 2016/5/15.
 */
public class ZhihuPresenter extends BasePresenter {



    public ZhihuPresenter(Context context) {
        super(context);
    }

    private  Retrofit retrofit = new Retrofit.Builder()
            .baseUrl(Constant.BASE_ZHIHU_URL)