Skip to content

jaddek/europabank-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EuropaBank reference to EUR rates http client

require_once ('vendor/autoload.php');

$client = new \Jaddek\Europabank\Stats\HttpClient(new \Symfony\Component\HttpClient\CurlHttpClient());
$provider = new \Jaddek\Europabank\Stats\Provider\EurofxrefDailyProvider($client);

try {
    $rates = $provider();
} catch (JsonException $e) {
} catch (\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface $e) {
} catch (\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface $e) {
} catch (\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface $e) {
} catch (\Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface $e) {
}


print_r($rates->getRates());
print_r($rates->getCurrencyRate(\Jaddek\Europabank\Stats\SupportedCurrenciesInterface::USD));

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages