package w.soulofpluto.posstock;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

import static w.soulofpluto.posstock.Constants.BASE_URL;


 /*
 Create by Ramesh Babu
 */

public class Getretrofit {
   static String URL = BASE_URL;
   static OkHttpClient client = new OkHttpClient.Builder()
           .connectTimeout(5, TimeUnit.MINUTES)
           .writeTimeout(5, TimeUnit.MINUTES)
           .readTimeout(5, TimeUnit.MINUTES)
           .build();
   static Retrofit retrofit = new Retrofit.Builder()
           .baseUrl(URL)
           .addConverterFactory(GsonConverterFactory.create())
           .client(client)
           .build();
   public static Retrofit getClient() {
       return retrofit;
   }
}
