wilkques/exchange-rate

Easy Exchange Rate

v1.0.0 2022-03-10 03:49 UTC

This package is auto-updated.

Last update: 2024-10-17 07:18:01 UTC


README

Latest Stable Version License

composer require wilkques/exchange-rate

API

How to use

  1. 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>')
  2. Example

    $currencies = $exchangeRate->symbols();
    
    $currencies->throw(); // throw exception
    
    // or
    
    $currencies->throw(function ($response, $exception) {
        // code
    });
    
    $currencies = $currencies->json(); // to array
  3. All Methods

    1. ExchangeRatesApi

REFERENCE

  1. Exchangeratesapi
  2. Http Client