open_exchange_rates 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 50

open_exchange_rates

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

pub package

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' 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);
}

Run example

dart example/main.dart ${api_key}

1.0.0

  • Add error handling
  • First release

0.1.0

  • Refactor code structure
  • All api will return json object(Map) instead of class
  • All api provided from openchangerates are implemented.
  • Update example code

0.0.5

  • fix uri query parameters error

0.0.4

  • add null item to stop stream

0.0.3

  • Cleanup unused package
  • Refactor some parts of code
  • Update example
  • Add TODO list

0.0.2

Supported API Endpoints

  • /latest.json
  • /currencies.json
  • /historical/${date}.json

Update API usage example.

0.0.1

Supported API Endpoints

  • /latest.json
  • /currencies.json

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);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  open_exchange_rates: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:open_exchange_rates/open_exchange_rates.dart';
  
Version Uploaded Documentation Archive
1.0.0 Jul 27, 2018 Go to the documentation of open_exchange_rates 1.0.0 Download open_exchange_rates 1.0.0 archive
0.1.1 Jul 22, 2018 Go to the documentation of open_exchange_rates 0.1.1 Download open_exchange_rates 0.1.1 archive
0.1.0 Jul 22, 2018 Go to the documentation of open_exchange_rates 0.1.0 Download open_exchange_rates 0.1.0 archive
0.0.5 Jul 10, 2018 Go to the documentation of open_exchange_rates 0.0.5 Download open_exchange_rates 0.0.5 archive
0.0.4 Jul 9, 2018 Go to the documentation of open_exchange_rates 0.0.4 Download open_exchange_rates 0.0.4 archive
0.0.3 Jul 5, 2018 Go to the documentation of open_exchange_rates 0.0.3 Download open_exchange_rates 0.0.3 archive
0.0.2 Jul 4, 2018 Go to the documentation of open_exchange_rates 0.0.2 Download open_exchange_rates 0.0.2 archive
0.0.1 Jul 1, 2018 Go to the documentation of open_exchange_rates 0.0.1 Download open_exchange_rates 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:open_exchange_rates/open_exchange_rates.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.55.0 <3.0.0
http ^0.11.3+17 0.11.3+17 0.12.0
uri ^0.11.3 0.11.3+1
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
matcher 0.12.4
meta 1.1.6
path 1.6.2
quiver 2.0.1
source_span 1.4.1
stack_trace 1.9.3
string_scanner 1.0.4
typed_data 1.1.6
utf 0.9.0+5