/// <summary> /// Initializes a new instance of the <see cref="ServiceBase{TService, TModel}"/> class. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> /// <param name="version">The version of the API (currently only 1 version.)</param> /// <param name="endpoint">The end point of the service.</param> /// <param name="rateLimitOn">Turn the rate limit on or off.</param> public ServiceBase(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, ApiEndPoint endpoint, bool rateLimitOn) { Adapter = serviceAdapter; Version = version; EndPoint = endpoint; _isRateLimitOn = rateLimitOn; }
/// <summary> /// Initializes a new instance of the <see cref="ServiceBase{TService, TModel}"/> class. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> /// <param name="version">The version of the API (currently only 1 version.)</param> /// <param name="endpoint">The end point of the service.</param> /// <param name="rateLimitOn">Turn the rate limit on or off.</param> public ServiceBase(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, ApiEndPoint endpoint, bool rateLimitOn) { Adapter = serviceAdapter; Version = version; EndPoint = endpoint; _isRateLimitOn = rateLimitOn; WhereQueries = new Dictionary <string, string>(); }
/// <summary> /// Initializes a new instance of the <see cref="CardService"/> class. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> /// <param name="version">The version of the API</param> public CardService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version) : base(serviceAdapter, version, ApiEndPoint.Cards) { this._whereQueries = new NameValueCollection(); }
/// <summary> /// Initializes a new instance of the <see cref="CardService"/> class. Defaults to version 1.0 of the API. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> public CardService(IMtgApiServiceAdapter serviceAdapter) : this(serviceAdapter, ApiVersion.V1_0) { }
/// <summary> /// Initializes a new instance of the <see cref="ServiceBaseObjectService"/> class. Defaults to version 1.0 of the API. /// </summary> /// <param name="adapter">The adapter to use.</param> public ServiceBaseObjectService(IMtgApiServiceAdapter adapter) : base(adapter, ApiVersion.V1_0, ApiEndPoint.Cards) { }
/// <summary> /// Initializes a new instance of the <see cref="SetService"/> class. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> /// <param name="version">The version of the API</param> /// <param name="rateLimitOn">Turn the rate limit on or off.</param> public SetService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, bool rateLimitOn = true) : base(serviceAdapter, version, ApiEndPoint.Sets, rateLimitOn) { _whereQueries = new NameValueCollection(); }
/// <summary> /// Initializes a new instance of the <see cref="SetService"/> class. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> /// <param name="version">The version of the API</param> public SetService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version) : base(serviceAdapter, version, ApiEndPoint.Sets) { _whereQueries = new NameValueCollection(); }
/// <summary> /// Initializes a new instance of the <see cref="SetService"/> class. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> /// <param name="version">The version of the API</param> /// <param name="rateLimitOn">Turn the rate limit on or off.</param> public SetService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, bool rateLimitOn = true) : base(serviceAdapter, version, ApiEndPoint.Sets, rateLimitOn) { }
/// <summary> /// Initializes a new instance of the <see cref="ServiceBase{TService, TModel}"/> class. /// </summary> /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param> /// <param name="version">The version of the API (currently only 1 version.)</param> /// <param name="endpoint">The end point of the service.</param> public ServiceBase(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, ApiEndPoint endpoint) { this._adapter = serviceAdapter; this._version = version; this._endpoint = endpoint; }