// Path: app/src/main/java/com/testerhome/nativeandroid/Config.java
// public class Config {
// 
// //    recent - 最新
// //    popular - 热门的话题（回帖和喜欢超过一定的数量
// //    no_reply - 还没有任何回帖的
// //    excellent - 精华帖
// //    last_actived - 最近活跃的
// 
//     public static final String TOPICS_TYPE_RECENT = "recent";
//     public static final String TOPICS_TYPE_POPULAR = "popular";
//     public static final String TOPICS_TYPE_NO_REPLY = "no_reply";
//     public static final String TOPICS_TYPE_EXCELLENT = "excellent";
//     public static final String TOPICS_TYPE_LAST_ACTIVED = "last_actived";
//     public static final int TOPIC_JOB_NODEID = 19;
//     public static final String BASE_URL = "https://testerhome.com/api/v3";
//     public static final String TOPICREPLY = "TopicReply";
//     public static final String FOLLOW = "Follow";
//     public static final String TOPIC = "Topic";
// 
//     public static String getImageUrl(String imagePath){
//         if(!imagePath.contains("https://testerhome.com")){
//             return "https://testerhome.com".concat(imagePath);
//         }else{
//             return imagePath;
//         }
// 
//     }
// }


import com.testerhome.nativeandroid.Config;
import retrofit.RestAdapter;
import retrofit.client.OkClient;
package com.testerhome.nativeandroid.networks;



/**
 * Created by Bin Li on 2015/9/16.
 */
public class TesterHomeApi {

    private static TesterHomeApi instance;
    private TopicsService topicsService;

    public static TesterHomeApi getInstance() {
        if (instance == null){
            instance = new TesterHomeApi();
        }
        return instance;
    }

    private TesterHomeApi(){
        RestAdapter restAdapter = buildRestAdapter();
        this.topicsService = restAdapter.create(TopicsService.class);
    }

    private RestAdapter buildRestAdapter() {
        return new RestAdapter.Builder()
// Path: app/src/main/java/com/testerhome/nativeandroid/Config.java
// public class Config {
// 
// //    recent - 最新
// //    popular - 热门的话题（回帖和喜欢超过一定的数量
// //    no_reply - 还没有任何回帖的
// //    excellent - 精华帖
// //    last_actived - 最近活跃的
// 
//     public static final String TOPICS_TYPE_RECENT = "recent";
//     public static final String TOPICS_TYPE_POPULAR = "popular";
//     public static final String TOPICS_TYPE_NO_REPLY = "no_reply";
//     public static final String TOPICS_TYPE_EXCELLENT = "excellent";
//     public static final String TOPICS_TYPE_LAST_ACTIVED = "last_actived";
//     public static final int TOPIC_JOB_NODEID = 19;
//     public static final String BASE_URL = "https://testerhome.com/api/v3";
//     public static final String TOPICREPLY = "TopicReply";
//     public static final String FOLLOW = "Follow";
//     public static final String TOPIC = "Topic";
// 
//     public static String getImageUrl(String imagePath){
//         if(!imagePath.contains("https://testerhome.com")){
//             return "https://testerhome.com".concat(imagePath);
//         }else{
//             return imagePath;
//         }
// 
//     }
// }


// Path: app/src/main/java/com/testerhome/nativeandroid/networks/TesterHomeApi.java
import com.testerhome.nativeandroid.Config;
import retrofit.RestAdapter;
import retrofit.client.OkClient;

package com.testerhome.nativeandroid.networks;



/**
 * Created by Bin Li on 2015/9/16.
 */
public class TesterHomeApi {

    private static TesterHomeApi instance;
    private TopicsService topicsService;

    public static TesterHomeApi getInstance() {
        if (instance == null){
            instance = new TesterHomeApi();
        }
        return instance;
    }

    private TesterHomeApi(){
        RestAdapter restAdapter = buildRestAdapter();
        this.topicsService = restAdapter.create(TopicsService.class);
    }

    private RestAdapter buildRestAdapter() {
        return new RestAdapter.Builder()
                .setEndpoint(Config.BASE_URL)