public TmdbAdapter(ITmdbApi tmdbApi, TmdbAdapterConfiguration tmdbAdapterConfiguration, ITypedCache typedCache) { this.tmdbApi = tmdbApi ?? throw new ArgumentNullException(nameof(tmdbApi)); this.tmdbAdapterConfiguration = tmdbAdapterConfiguration ?? throw new ArgumentNullException(nameof(tmdbAdapterConfiguration)); this.typedCache = typedCache ?? throw new ArgumentNullException(nameof(typedCache)); }
public TmdbAdapter(ITmdbApi tmdbApi, TmdbAdapterConfiguration tmdbAdapterConfiguration, IMapper mapper) { this.tmdbApi = tmdbApi ?? throw new ArgumentNullException(nameof(tmdbApi)); this.tmdbAdapterConfiguration = tmdbAdapterConfiguration ?? throw new ArgumentNullException(nameof(tmdbAdapterConfiguration)); this.mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public ITmdbApi GetInstance() { if (api == null) { var handler = new TmdbApiKeyHandler(AppSettings.TmdbApiKey); var client = new HttpClient(handler) { BaseAddress = new Uri(AppSettings.TmdbApiUrl) }; api = RestService.For <ITmdbApi>(client); } return(api); }
public SerieService(ITmdbApi api) { _api = api; }
public SerieService(ITmdbApi api, ISerieRepository serieRepository) { _api = api; _serieRepository = serieRepository; }