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

outdatedDart 1 only

A dartlang wrapping for openexchangerates api requests.

open_exchange_rates #

The open_exchange_rates library is a dartlang wrapping and make it easy to use.

It's still under development #

Any suggestions are welcome.

How to use? #

  1. Registry and get an app key from open_exchange_rates
  2. Example Code Here:

#

import 'package:open_exchange_rates/open_exchange_rates.dart';

// example code
main() async {
  String api_key = 'api_key';
  // Query Latest
  QueryLatest latest = QueryLatest.get();
  latest.query.add(Params(api_key: api_key));
  latest.results.forEach(
      (item) => item.forEach((val) => print('${val.currency}: ${val.ratio}')));
  latest.dispose();
  // Query Currencies
  QueryCurrencies currencies = QueryCurrencies.get();
  currencies.query.add(Params(api_key: api_key));
  currencies.results.forEach(
      (item) => item.forEach((val) => print('${val.currency}: ${val.name}')));
  currencies.dispose();
  // Query Historical
  QueryHistorical historical = QueryHistorical.get();
  historical.query.add(Params(api_key: api_key, date: '2018-07-01'));
  historical.results.forEach(
      (item) => item.forEach((val) => print('${val.currency}: ${val.ratio}')));

  historical.dispose();
}
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A dartlang wrapping for openexchangerates api requests.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, rxdart, uri

More

Packages that depend on open_exchange_rates