Skip to content

Commit

Permalink
Download both current and historic ISO currencies (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-siardziuk authored and frederikbosch committed Aug 20, 2018
1 parent c08c13e commit f0531c6
Show file tree
Hide file tree
Showing 11 changed files with 5,296 additions and 29 deletions.
17 changes: 13 additions & 4 deletions bin/fetch-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@
require_once __DIR__ . "/../vendor/autoload.php";

$fetcher = new Fetcher(
'http://www.currency-iso.org/dam/downloads/lists/list_one.xml'
'https://www.currency-iso.org/dam/downloads/lists/list_one.xml',
'https://www.currency-iso.org/dam/downloads/lists/list_three.xml'
);

$fetcher->saveTo(__DIR__ . "/../resources/current.php", new PhpExportSerializer());
$fetcher->saveTo(__DIR__ . "/../resources/current.json", new JsonSerializer());
$fetcher->saveTo(__DIR__ . "/../resources/current.yaml", new YamlSerializer());
$fetcher->saveCurrentCountriesTo(__DIR__ . "/../resources/current.php", new PhpExportSerializer());
$fetcher->saveCurrentCountriesTo(__DIR__ . "/../resources/current.json", new JsonSerializer());
$fetcher->saveCurrentCountriesTo(__DIR__ . "/../resources/current.yaml", new YamlSerializer());

$fetcher->saveHistoricCountriesTo(__DIR__ . "/../resources/historic.php", new PhpExportSerializer());
$fetcher->saveHistoricCountriesTo(__DIR__ . "/../resources/historic.json", new JsonSerializer());
$fetcher->saveHistoricCountriesTo(__DIR__ . "/../resources/historic.yaml", new YamlSerializer());

$fetcher->saveAllCountriesTo(__DIR__ . "/../resources/all.php", new PhpExportSerializer());
$fetcher->saveAllCountriesTo(__DIR__ . "/../resources/all.json", new JsonSerializer());
$fetcher->saveAllCountriesTo(__DIR__ . "/../resources/all.yaml", new YamlSerializer());
1 change: 1 addition & 0 deletions resources/all.json

Large diffs are not rendered by default.

Loading

0 comments on commit f0531c6

Please sign in to comment.