PHP Classes
elePHPant
Icontem

Karensi: Fetch currency exchange rates from fixer.io

Recommend this page to a friend!
  Info   View files Documentation   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-06-07 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 62 This week: 1All time: 8,991 This week: 566Up
Version License PHP version Categories
karensi 1.0MIT/X Consortium ...5PHP 5, Web services, Finances
Description Author

This class can fetch currency exchange rates from fixer.io.

It can takes a base currency and a foreign currency rates identifiers and sends a HTTP request to retrieve the exchange rates between the currencies from fixer.io.

It can retrieve the exchange rates also for a specific date.

  Performance   Level  
Name: Arnel Labarda <contact>
Classes: 4 packages by
Country: Philippines Philippines
Age: 30
All time rank: 310423 in Philippines Philippines
Week rank: 293 Up5 in Philippines Philippines Up
Innovation award
Innovation award
Nominee: 2x

Details

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
  Files folder image Files  
File Role Description
Files folder imagespec (1 directory)
Files folder imagesrc (1 directory)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file phpspec.yml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  spec  
File Role Description
Files folder imageKarensi (1 file)

  Files folder image Files  /  spec  /  Karensi  
File Role Description
  Plain text file KarensiSpec.php Class Class source

  Files folder image Files  /  src  
File Role Description
Files folder imageKarensi (1 file)

  Files folder image Files  /  src  /  Karensi  
File Role Description
  Plain text file Karensi.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:62
This week:1
All time:8,991
This week:566Up