/// <summary> /// Checks service is alive /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> IsAliveAsync(this IIcoExRateAPI operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.IsAliveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public void Dispose() { if (_service == null) { return; } _service.Dispose(); _service = null; }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='pair'> /// Possible values include: 'BTCUSD', 'ETHUSD' /// </param> /// <param name='dateTimeUtc'> /// </param> public static IList <RateResponse> ApiRatesByPairByDateTimeUtcGet(this IIcoExRateAPI operations, Pair pair, System.DateTime dateTimeUtc) { return(operations.ApiRatesByPairByDateTimeUtcGetAsync(pair, dateTimeUtc).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='market'> /// Possible values include: 'Lykke', 'Kraken', 'Bitfinex' /// </param> /// <param name='pair'> /// Possible values include: 'BTCUSD', 'ETHUSD' /// </param> /// <param name='dateTimeUtc'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <RateResponse> ApiRatesByMarketByPairByDateTimeUtcGetAsync(this IIcoExRateAPI operations, Market market, Pair pair, System.DateTime dateTimeUtc, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiRatesByMarketByPairByDateTimeUtcGetWithHttpMessagesAsync(market, pair, dateTimeUtc, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='market'> /// Possible values include: 'Lykke', 'Kraken', 'Bitfinex' /// </param> /// <param name='pair'> /// Possible values include: 'BTCUSD', 'ETHUSD' /// </param> /// <param name='dateTimeUtc'> /// </param> public static RateResponse ApiRatesByMarketByPairByDateTimeUtcGet(this IIcoExRateAPI operations, Market market, Pair pair, System.DateTime dateTimeUtc) { return(operations.ApiRatesByMarketByPairByDateTimeUtcGetAsync(market, pair, dateTimeUtc).GetAwaiter().GetResult()); }
/// <summary> /// Checks service is alive /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static object IsAlive(this IIcoExRateAPI operations) { return(operations.IsAliveAsync().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dateTimeUtc'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <AverageRateResponse> > ApiRatesByDateTimeUtcAverageGetAsync(this IIcoExRateAPI operations, System.DateTime dateTimeUtc, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiRatesByDateTimeUtcAverageGetWithHttpMessagesAsync(dateTimeUtc, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dateTimeUtc'> /// </param> public static IList <AverageRateResponse> ApiRatesByDateTimeUtcAverageGet(this IIcoExRateAPI operations, System.DateTime dateTimeUtc) { return(operations.ApiRatesByDateTimeUtcAverageGetAsync(dateTimeUtc).GetAwaiter().GetResult()); }
public IcoExRateClient(string serviceUrl, ILog log) { _service = new IcoExRateAPI(new Uri(serviceUrl)); _log = log; }