Advertisement
joris

ApiClient

Jul 11th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. package com.bertho.tdashboard.rest;
  2.  
  3.  
  4. import retrofit2.Retrofit;
  5. import retrofit2.converter.gson.GsonConverterFactory;
  6.  
  7. public class ApiClient {
  8.  
  9.     public static final String GET_VISIT_URL = "http://www.berthojoris.com/";
  10.  
  11.     private static Retrofit retrofit = null;
  12.  
  13.     public static Retrofit getVisitor() {
  14.         if (retrofit==null) {
  15.             retrofit = new Retrofit.Builder()
  16.                     .baseUrl(GET_VISIT_URL)
  17.                     .addConverterFactory(GsonConverterFactory.create())
  18.                     .build();
  19.         }
  20.         return retrofit;
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement