21 lines
589 B
Java
21 lines
589 B
Java
package net.schueller.peertube.network;
|
|
|
|
import retrofit2.Retrofit;
|
|
import retrofit2.converter.gson.GsonConverterFactory;
|
|
|
|
public class RetrofitInstance {
|
|
|
|
private static Retrofit retrofit;
|
|
private static final String BASE_URL = "https://troll.tv/api/v1/";
|
|
|
|
public static Retrofit getRetrofitInstance() {
|
|
if (retrofit == null) {
|
|
|
|
retrofit = new retrofit2.Retrofit.Builder()
|
|
.baseUrl(BASE_URL)
|
|
.addConverterFactory(GsonConverterFactory.create())
|
|
.build();
|
|
}
|
|
return retrofit;
|
|
}
|
|
} |