package com.blstream.studybox.api;

import retrofit.RequestInterceptor;
import retrofit.RestAdapter;

public class RestClient {

    private static final String URL = "http://78.133.154.70:2000/";
    private static final String BASE_URL = "http://private-5f2e4b-studybox2.apiary-mock.com/";
    private RestInterface restInterface;

    public RestClient(){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setEndpoint(BASE_URL)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestClient(RequestInterceptor interceptor){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setEndpoint(URL)
                .setRequestInterceptor(interceptor)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestInterface getService(){
        return restInterface;
    }
}

@@ -29,16 +29,89 @@
 x.api;%0A%0A
+import com.google.gson.GsonBuilder;%0A%0Aimport java.lang.reflect.Modifier;%0A%0A
 import r
@@ -166,16 +166,57 @@
 Adapter;
+%0Aimport retrofit.converter.GsonConverter;
 %0A%0Apublic
@@ -550,239 +550,737 @@
 .set
-Endpoint(BASE_URL)%0A                .build();%0A%0A        restInterface = restAdapter.create(RestInterface.class);%0A    %7D%0A%0A    public RestClient(RequestInterceptor interceptor)%7B%0A        RestAdapter restAdapter = new RestAdapter.Builder(
+Converter(new GsonConverter(new GsonBuilder()%0A                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)%0A                        .serializeNulls()%0A                        .create()))%0A                .setEndpoint(BASE_URL)%0A                .build();%0A%0A        restInterface = restAdapter.create(RestInterface.class);%0A    %7D%0A%0A    public RestClient(RequestInterceptor interceptor)%7B%0A        RestAdapter restAdapter = new RestAdapter.Builder()%0A                .setConverter(new GsonConverter(new GsonBuilder()%0A                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)%0A                        .serializeNulls()%0A                        .create())
 )%0A  

Fix problems on Android 6.0