Advertisement
rama_astadipati

ApiUtils

Jun 24th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. package info.androidboss.retrofit.utils;
  2.  
  3. import retrofit2.Retrofit;
  4. import retrofit2.converter.gson.GsonConverterFactory;
  5.  
  6. /**
  7. * Created by RIFAN on 22-Mar-17.
  8. */
  9.  
  10. public class RetroFitApiClient {
  11.  
  12. public static final String BASE_URL = "http://api.androidboss.info/movie/";
  13. private static Retrofit retrofit = null;
  14.  
  15. public static Retrofit getClient(){
  16. if(retrofit==null){
  17. retrofit = new Retrofit.Builder().baseUrl(BASE_URL)
  18. .addConverterFactory(GsonConverterFactory
  19. .create()).build();
  20. }
  21. return retrofit;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement