Skip to content

Instantly share code, notes, and snippets.

@prolongservices
Created May 30, 2020 19:36
Show Gist options
  • Select an option

  • Save prolongservices/35c399190ba606e358da8972a0119131 to your computer and use it in GitHub Desktop.

Select an option

Save prolongservices/35c399190ba606e358da8972a0119131 to your computer and use it in GitHub Desktop.
package com.edablogs.tubelite.api;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import static com.edablogs.tubelite.utils.Constants.BASE_URL;
import static com.edablogs.tubelite.utils.Constants.GIT_BASE_URL;
/**
* Created by pawneshwer on 11/11/16.
*/
public class APIService {
public static <S> S create(Class<S> cls){
Retrofit build = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).build();
return build.create(cls);
}
public static <S> S createUpdate(Class<S> cls){
Retrofit build = new Retrofit.Builder().baseUrl(GIT_BASE_URL).addConverterFactory(GsonConverterFactory.create()).build();
return build.create(cls);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment