/// <summary> /// Initializes instance according to parameter values. /// </summary> /// <param name="apiKey">Key to get access to TMDb service.</param> /// <param name="maxRetryCount">Maximum retry number to get response from TMDb.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="apiKey" /> is <c>null</c>. /// </exception> /// <exception cref="ArgumentException"> /// <paramref name="apiKey" /> presents empty string or contains only whitespaces. /// </exception> public TmdbCrawlerAsync(string apiKey, int maxRetryCount) { apiKey.ThrowIfNullOrWhiteSpace(nameof(apiKey)); _tmdbClient = TmdbClientFactory.CreateClient(apiKey, maxRetryCount); _searchResults = new HashSet <BasicInfo>(); }
/// <summary> /// Initializes instance according to parameter values. /// </summary> /// <param name="apiKey">Key to get access to TMDb service.</param> /// <param name="maxRetryCount">Maximum retry number to get response from TMDb.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="apiKey" /> is <c>null</c>. /// </exception> /// <exception cref="ArgumentException"> /// <paramref name="apiKey" /> presents empty string or contains only whitespaces. /// </exception> public TmdbCrawler(string apiKey, int maxRetryCount) { apiKey.ThrowIfNullOrWhiteSpace(nameof(apiKey)); _tmdbClient = TmdbClientFactory.CreateClient(apiKey, maxRetryCount); }