wilkques / exchange-rate
Easy Exchange Rate
v1.0.0
2022-03-10 03:49 UTC
Requires
- php: ^7.4|^8.0
- ext-curl: *
- ext-json: *
- wilkques/http-client: ^1.0.0
README
composer require wilkques/exchange-rate
API
How to use
-
Get ExchangeRatesApi
use Wilkques\ExchangeRates\ExchangeRate; use Wilkques\ExchangeRates\Enum\FactoriesEnum; $exchangeRate = (new ExchangeRate)->exchangeRate( FactoriesEnum::Exchangeratesapi )->token('<access token>'); // or $exchangeRate = ExchangeRate::make( FactoriesEnum::Exchangeratesapi )->token('<access token>')
-
Example
$currencies = $exchangeRate->symbols(); $currencies->throw(); // throw exception // or $currencies->throw(function ($response, $exception) { // code }); $currencies = $currencies->json(); // to array
-
All Methods
- ExchangeRatesApi