Created
May 30, 2020 19:36
-
-
Save prolongservices/35c399190ba606e358da8972a0119131 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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