Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into exchange-rates-ad…
Browse files Browse the repository at this point in the history
…apting-new-api

Update Base Currency info for ExchangeRatesApi
  • Loading branch information
Seagull-4auKa committed Apr 25, 2021
2 parents 0e93e60 + 187302d commit b8dfa75
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 0 additions & 1 deletion FUNDING.yml

This file was deleted.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Version](http://img.shields.io/packagist/v/florianv/exchanger.svg?style=flat-square)](https://packagist.org/packages/florianv/exchanger)

Exchanger is a PHP framework to work with currency exchange rates from various services such as
**[Fixer](https://fixer.io)** or **[currencylayer](https://currencylayer.com)**.
**[Fixer](https://fixer.io)**, **[currencylayer](https://currencylayer.com)** or **[exchangeratesapi](https://exchangeratesapi.io)**.
Looking for a simple library based on Exchanger ? Check out [Swap](https://github.com/florianv/swap) !

## Sponsors
Expand All @@ -20,6 +20,10 @@ Looking for a simple library based on Exchanger ? Check out [Swap](https://githu
<td><img src="https://s3.amazonaws.com/swap.assets/currencylayer_icon.png" width="50px"/></td>
<td><a href="https://currencylayer.com">currencylayer</a> provides reliable exchange rates and currency conversions for your business up to 168 world currencies.</td>
</tr>
<tr>
<td><img src="https://exchangeratesapi.io/assets/images/api-logo.svg" width="50px"/></td>
<td><a href="https://exchangeratesapi.io">exchangeratesapi</a> provides reliable exchange rates and currency conversions for your business with over 15 data sources.</td>
</tr>
</table>

## Documentation
Expand All @@ -34,7 +38,7 @@ Here is the complete list of the currently implemented services:
|---------------------------------------------------------------------------|----------------------|----------------|----------------|
| [Fixer](https://fixer.io) | EUR (free, no SSL), * (paid) | * | Yes |
| [currencylayer](https://currencylayer.com) | USD (free), * (paid) | * | Yes |
| [exchangeratesapi](https://exchangeratesapi.io) | USD (free), * (paid) | * | Yes |
| [exchangeratesapi](https://exchangeratesapi.io) | EUR (free), * (paid) | * | Yes |
| [Abstract](https://www.abstractapi.com) | * | * | No |
| [coinlayer](https://coinlayer.com) | * Crypto (Limited standard currencies) | * Crypto (Limited standard currencies) | Yes |
| [European Central Bank](https://www.ecb.europa.eu/home/html/index.en.html) | EUR | * | Yes |
Expand Down
10 changes: 10 additions & 0 deletions doc/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<td><img src="https://s3.amazonaws.com/swap.assets/currencylayer_icon.png" width="50px"/></td>
<td><a href="https://currencylayer.com">currencylayer</a> provides reliable exchange rates and currency conversions for your business up to 168 world currencies.</td>
</tr>
<tr>
<td><img src="https://exchangeratesapi.io/assets/images/api-logo.svg" width="50px"/></td>
<td><a href="https://exchangeratesapi.io">exchangeratesapi</a> provides reliable exchange rates and currency conversions for your business with over 15 data sources.</td>
</tr>
</table>

## Index
Expand Down Expand Up @@ -56,6 +60,7 @@ The complete list of all supported services is available [here](https://github.c
use Http\Client\Curl\Client as CurlClient;
use Exchanger\Service\Fixer;
use Exchanger\Service\CurrencyLayer;
use Exchanger\Service\ExchangeRatesApi;
use Exchanger\Exchanger;

// Create your http client (we choose curl here)
Expand All @@ -67,6 +72,9 @@ $service = new Fixer($client, null, ['access_key' => 'YOUR_KEY']);
// Or use the currencylayer.com service
$service = new CurrencyLayer($client, null, ['access_key' => 'access_key', 'enterprise' => false]);

// Or use the exchangeratesapi.io service
$service = new ExchangeRatesApi($client, null, ['access_key' => 'access_key', 'enterprise' => false]);

// Create Exchanger with your service
$exchanger = new Exchanger($service);
```
Expand Down Expand Up @@ -126,10 +134,12 @@ Simply create a `Chain` service to wrap the services you want to chain.
use Exchanger\Service\Chain;
use Exchanger\Service\Fixer;
use Exchanger\Service\CurrencyLayer;
use Exchanger\Service\ExchangeRatesApi;

$service = new Chain([
new Fixer($client, null, ['access_key' => 'YOUR_KEY']),
new CurrencyLayer($client, null, ['access_key' => 'access_key', 'enterprise' => false]),
new ExchangeRatesApi($client, null, ['access_key' => 'access_key', 'enterprise' => false]),
]);
```

Expand Down

0 comments on commit b8dfa75

Please sign in to comment.