public ClientBase(string apiHost, string apiVersion, string apiKey = null, IHTTPLogger logger = null) { ApiHost = apiHost; ApiVersion = apiVersion; ApiKey = apiKey; _logger = logger; }
/// <summary> /// Constructor for the Client class. /// </summary> /// <param name="apiKey">App secret from yelp's developer registration page.</param> /// <param name="logger">Optional class instance which applies the ILogger interface to support custom logging within the client.</param> public BusinessClient(IHTTPLogger logger = null) : base(API_HOST, API_VERSION, Credentials.API_KEY_YELP, logger) { if (string.IsNullOrWhiteSpace(API_HOST)) { throw new ArgumentNullException(nameof(API_HOST)); } }
public GeocodingClient(IHTTPLogger logger = null) : base(API_HOST, string.Empty, null, logger) { if (string.IsNullOrWhiteSpace(API_HOST)) { throw new ArgumentNullException(nameof(API_HOST)); } }
public SpotifyClientConfig WithHTTPLogger(IHTTPLogger httpLogger) { return(new SpotifyClientConfig( BaseAddress, Authenticator, JSONSerializer, HTTPClient, RetryHandler, httpLogger, DefaultPaginator )); }
public APIQueryGeocode() { _logger = new DebugLogger(); _client = new GeocodingClient(new DebugLogger()); }
public ApiQueryBusiness() { _logger = new DebugLogger(); _client = new BusinessClient(_logger); }