open_exchange_rates 1.0.0 copy "open_exchange_rates: ^1.0.0" to clipboard
open_exchange_rates: ^1.0.0 copied to clipboard

outdated

A dartlang wrapping for openexchangerates api requests. Make api easy to use.

example/main.dart

import 'package:open_exchange_rates/open_exchange_rates.dart' as Oxr;

void main(List<String> args) async {
  Oxr.New oxr = new Oxr.New(args[0]);
  var latest = await oxr.latest.Get(base: 'TWD', symbols: 'JPY,USD,SEK,GBP');
  var currencies = await oxr.currencies.Get();
  var historical = await oxr.historical
      .Get(date: '2018-07-01', base: 'TWD', symbols: 'JPY,USD,SEK,GBP');
  var timeseries = await oxr.timeseries.Get(
      start: '2018-07-01',
      end: '2018-07-14',
      base: 'TWD',
      symbols: 'JPY,USD,SEK,GBP');
  var convert = await oxr.convert.Get(value: '100', from: 'TWD', to: 'USD');
  var ohlc =
      await oxr.ohlc.Get(start_time: '2018-07-01T00:00:00Z', period: '1mo');
  var usage = await oxr.usage.Get();

  print(latest);
  print(currencies);
  print(historical);
  print(timeseries);
  print(convert);
  print(ohlc);
  print(usage);
}
1
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A dartlang wrapping for openexchangerates api requests. Make api easy to use.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

http, uri

More

Packages that depend on open_exchange_rates