2017 © Pedro Peláez
 

library php-openexchangerates-wrapper

a php wrapper of open exchange rates api

image

ihfazhillah/php-openexchangerates-wrapper

a php wrapper of open exchange rates api

  • Tuesday, April 3, 2018
  • by ihfazhillah
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 7 % Grown

The README.md

OpenExchangeApi wrapper for php

php-openexchangerates-wrapper helps you to make a request to https://openexchangerates.org/api, converting accross currencies with or without api and cache your result into files., (*1)

Installation


composer require ihfazhillah/php-openexchangerates-wrapper

Getting Started


<?php require_once("vendor/autoload.php"); use OpenExchangeRatesWrapper\OpenExchangeRates; $oxr = new OpenExchangeRates("YOUR APP ID"); $latest = $oxr->latest();

You can use https instead, (*2)


$oxr = new OpenExchangeRates("YOUR APP ID", ["https" => true]);

or if you wish, you can add a cache handler to cache your result, (*3)


use OpenExchangeRatesWrapper\Caches\FileCache; $fileCache = new FileCache(); $oxr = new OpenExchangeRates("YOUR APP ID", ["cacheHandler" => $fileCache);

OpenExchangeRates

new OpenExchangeRates($app_id, $options), (*4)

the only required argument for this constructor is $app_id. You need to register into https://openexchangerates.org., (*5)

$options : array with cacheHandler or https property. All is optional., (*6)

methods

|name|Description|, (*7)

|latest| calling the latest endpoint from openexchangerates|, (*8)

|historical| call the historical endpoint from openexchangerates. pas YYYY-MM-DD as first argument|, (*9)

|currencies|call currencies endpoint|, (*10)

|timeSeries| call timeseries endpoint|, (*11)

|convert|call convert endpoint. $oxr->convert($value, $from, $to)|, (*12)

|ohlc||, (*13)

|usage| get your openexchangerates api usage|, (*14)

|nativeConvert| convert without calling convert endpoint api. $oxr->nativeConvert($value, $to, $from)|, (*15)

FileCache

new FileCache($expiredAfter, $path), (*16)

All arguments here is optionals. $expiredAfter default is 24 hours. Use hours instead seconds., (*17)

The Versions

03/04 2018

dev-master

9999999-dev

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

02/04 2018

v0.4.4

0.4.4.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

28/03 2018

v0.4.3

0.4.3.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

28/03 2018

v0.4.2

0.4.2.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

27/03 2018

v0.4.1

0.4.1.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

27/03 2018

v0.4

0.4.0.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

19/03 2018

v0.3.1

0.3.1.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

15/03 2018

v0.3

0.3.0.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

13/03 2018

v0.2

0.2.0.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah

13/03 2018

v0.1

0.1.0.0

a php wrapper of open exchange rates api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ihfazhillah