package com.daya.live_teaching.repository;

import android.content.Context;

import com.daya.live_teaching.api.HttpClientManager;
import com.daya.live_teaching.api.retrofit.RetrofitClient;


public class BaseRepository {
    private RetrofitClient    client;
    private  Context           context;
    private HttpClientManager httpManager;

    public BaseRepository(Context context) {
        this.httpManager = HttpClientManager.getInstance(context);
        client = httpManager.getClient();
        this.context = context;
    }

    public <T> T getService(Class<T> clazz) {
        return client.createService(clazz);
    }

    public HttpClientManager getHttpManager() {
        return httpManager;
    }

    public Context getContext() {
        return context;
    }
}
