aqlx86/karensi

PHP Library for fixer.io foreign exchange rates and currency conversion.

dev-master 2016-06-08 07:04 UTC

This package is auto-updated.

Last update: 2024-10-29 04:53:02 UTC


README

Build Status

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