Download the PHP package ihfazhillah/php-openexchangerates-wrapper without Composer
On this page you can find all versions of the php package ihfazhillah/php-openexchangerates-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ihfazhillah/php-openexchangerates-wrapper
More information about ihfazhillah/php-openexchangerates-wrapper
Files in ihfazhillah/php-openexchangerates-wrapper
Package php-openexchangerates-wrapper
Short Description a php wrapper of open exchange rates api
License MIT
Informations about the package php-openexchangerates-wrapper
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.
Installation
Getting Started
You can use https instead
or if you wish, you can add a cache handler to cache your result
OpenExchangeRates
new OpenExchangeRates($app_id, $options)
the only required argument for this constructor is $app_id. You need to register into https://openexchangerates.org.
$options : array with cacheHandler or https property. All is optional.
methods
|name|Description|
|------|------------|
|latest| calling the latest endpoint from openexchangerates|
|historical| call the historical endpoint from openexchangerates. pas YYYY-MM-DD as first argument|
|currencies|call currencies endpoint|
|timeSeries| call timeseries endpoint|
|convert|call convert endpoint. $oxr->convert($value, $from, $to)|
|ohlc||
|usage| get your openexchangerates api usage|
|nativeConvert| convert without calling convert endpoint api. $oxr->nativeConvert($value, $to, $from)|
FileCache
new FileCache($expiredAfter, $path)
All arguments here is optionals. $expiredAfter default is 24 hours. Use hours instead seconds.