use of com.tevinjeffrey.rmp.client.RMPClient in project Rutgers-Course-Tracker by tevjef.
the class ClientModule method providesRMPClient.
@Provides
@Singleton
public RMPClient providesRMPClient(OkHttpClient client, Gson gson) {
OkHttpClient okClient = client.clone();
okClient.setConnectTimeout(CONNECT_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
okClient.setReadTimeout(READ_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint("http://rutgersapp.tevindev.me:8080/").setLogLevel(RestAdapter.LogLevel.FULL).setConverter(new GsonConverter(gson)).setClient(new OkClient(okClient)).build();
return new RMPClient(restAdapter.create(ClientService.class));
}
Aggregations