// TODO: Implement lazy load pattern so each instance creation doesn't create every object instance for no reason")] public TMDbClient(ITMDbSettings settings) : base(settings.BaseUrl) { if (settings.ApiKey.IsNullOrEmpty()) { throw new ArgumentNullException(nameof(settings.ApiKey)); } Settings = settings; Account = new AccountProxy(this); Authentication = new AuthenticationProxy(this); Certifications = new CertificationsProxy(this); Changes = new ChangesProxy(this); Collections = new CollectionsProxy(this); Configuration = new ConfigurationProxy(this); Credits = new CreditsProxy(this); Discover = new DiscoverProxy(this); Exports = new ExportsProxy(this); Find = new FindProxy(this); Genres = new GenresProxy(this); GuestSessions = new GuestSessionsProxy(this); Keywords = new KeywordsProxy(this); Lists = new ListsProxy(this); Movies = new MoviesProxy(this); Network = new NetworkProxy(this); People = new PeopleProxy(this); Reviews = new ReviewsProxy(this); Search = new SearchProxy(this); Trending = new TrendingProxy(this); TVEpisodeGroups = new TVEpisodeGroupsProxy(this); TVEpisodes = new TVEpisodesProxy(this); TV = new TVProxy(this); TVSeasons = new TVSeasonsProxy(this); }
// TODO: *** Refactor out this reference directly to settings, apply it in another layer. public TMDbRequest(ITMDbSettings settings) { // TODO: *** Refactor out this reference directly to settings, apply it in another layer. ApiKey = settings.ApiKey; // TODO: *** Refactor out this reference directly to settings, apply it in another layer. Version = settings.Version; }