package com.spalmalo.yweather.backend;

import com.squareup.okhttp.OkHttpClient;

import retrofit.RestAdapter;
import retrofit.client.OkClient;

public class RestClient {

    private static Api REST_CLIENT;
    private static String ROOT =
            "http://api.openweathermap.org/data/2.5";

    static {
        setupRestClient();
    }

    private RestClient() {
    }

    public static Api get() {
        return REST_CLIENT;
    }

    private static void setupRestClient() {
        RestAdapter.Builder builder = new RestAdapter.Builder()
                .setEndpoint(ROOT)
                .setClient(new OkClient(new OkHttpClient()))
                .setLogLevel(RestAdapter.LogLevel.FULL);

        RestAdapter restAdapter = builder.build();
        REST_CLIENT = restAdapter.create(Api.class);
    }
}

@@ -75,16 +75,52 @@
 lient;%0A%0A
+import retrofit.RequestInterceptor;%0A
 import r
@@ -511,24 +511,288 @@
 tClient() %7B%0A
+        RequestInterceptor requestInterceptor = new RequestInterceptor() %7B%0A            @Override%0A            public void intercept(RequestFacade request) %7B%0A                request.addPathParam(%22APPID%22, %22089bf92069d4a25e7835d003635d0e1f%22);%0A            %7D%0A        %7D;%0A
         Rest
@@ -939,16 +939,75 @@
 ent()))%0A
+                .setRequestInterceptor(requestInterceptor)%0A
         

Add rest client interceptor