File: README.md

Recommend this page to a friend!
  Classes of Arnel Labarda  >  Karensi  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Karensi
Fetch currency exchange rates from fixer.io
Author: By
Last change: Update README.md
Update README.md
Date: 4 years ago
Size: 755 bytes
 

Contents

Class file image Download

Karensi

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

For more information send a message to info at phpclasses dot org.