Skip to content

Instantly share code, notes, and snippets.

@shikto1
Created July 2, 2018 13:27
Show Gist options
  • Save shikto1/0dc3cb1fb59a4a643bcd29e8aba7ca56 to your computer and use it in GitHub Desktop.
Save shikto1/0dc3cb1fb59a4a643bcd29e8aba7ca56 to your computer and use it in GitHub Desktop.
public class ApiClient {
public static final String BASE_URL = "http://api.themoviedb.org/3/";
private static Retrofit retrofit = null;
public static Retrofit getClient() {
if (retrofit==null) {
retrofit = new Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment