// Path: app/src/main/java/com/sampleapp/constants/ApiConstants.java
// public interface ApiConstants {
//     int STATUS_SUCCESS = 200;
//     String STATUS_SESSION_EXPIRE = "203";
//     String BASE_URL = "http://abc.com/";
//     String CONTROLLER = "/index.php/webController";
//     String LOGIN = CONTROLLER + "/apilogin";
// 
// }


import com.sampleapp.constants.ApiConstants;
import java.util.concurrent.TimeUnit;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
package com.sampleapp.api;






/**
 * Created by saveen_dhiman on 05-November-16.
 * contains object related to network communication and API consumption
 */
@Module
public class NetModule {

    //get retrofit instance
    @Singleton
    @Provides
    public RestService getRestService() {

        Retrofit retrofit = new Retrofit.Builder()
// Path: app/src/main/java/com/sampleapp/constants/ApiConstants.java
// public interface ApiConstants {
//     int STATUS_SUCCESS = 200;
//     String STATUS_SESSION_EXPIRE = "203";
//     String BASE_URL = "http://abc.com/";
//     String CONTROLLER = "/index.php/webController";
//     String LOGIN = CONTROLLER + "/apilogin";
// 
// }


// Path: app/src/main/java/com/sampleapp/api/NetModule.java
import com.sampleapp.constants.ApiConstants;
import java.util.concurrent.TimeUnit;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

package com.sampleapp.api;






/**
 * Created by saveen_dhiman on 05-November-16.
 * contains object related to network communication and API consumption
 */
@Module
public class NetModule {

    //get retrofit instance
    @Singleton
    @Provides
    public RestService getRestService() {

        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(ApiConstants.BASE_URL)