aqlx86 / karensi
PHP Library for fixer.io foreign exchange rates and currency conversion.
Installs: 4 931
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- nesbot/carbon: ~1.14
Requires (Dev)
- phpspec/phpspec: ~2.0
This package is auto-updated.
Last update: 2024-10-29 04:53:02 UTC
README
PHP Library for fixer.io foreign exchange rates and currency conversion.
Installation
> composer.phar require aqlx86/karensi
> composer.phar install
Usage
Fetch all
$karensi = new Karensi\Karensi('USD');
$rates = $karensi->fetch_rate();
Fetch specific currencies
$karensi = new Karensi\Karensi('USD', ['CAD', 'PHP']);
$rates = $karensi->fetch_rate();
Fetch historical rates
$karensi = new Karensi\Karensi('USD', ['CAD', 'PHP'], '2015-12-28');
$rates = $karensi->fetch_rate();
Save fetched rates in json format
$karensi->save('./rates/');
Test
./bin/phpspec run