Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
florianv committed May 30, 2023
1 parent 875ec44 commit 4655873
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
[![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)**, **[Currency Data](https://apilayer.com/marketplace/currency_data-api)**,
**[Exchange Rates Data](https://apilayer.com/marketplace/exchangerates_data-api)** or **[Abstract](https://www.abstractapi.com)**.
**[Fixer](https://fixer.io)**, **[Currency Data](https://currencylayer.com)**,
**[Exchange Rates Data](https://exchangeratesapi.io)** or **[Abstract](https://www.abstractapi.com)**.
Looking for a simple library based on Exchanger ? Check out [Swap](https://github.com/florianv/swap) !

## Sponsors
Expand All @@ -19,11 +19,11 @@ Looking for a simple library based on Exchanger ? Check out [Swap](https://githu
</tr>
<tr>
<td><img src="https://assets.apilayer.com/apis/currency_data.png" width="50px"/></td>
<td><a href="https://apilayer.com/marketplace/currency_data-api">Currency Data</a> provides reliable exchange rates and currency conversions for your business up to 168 world currencies.</td>
<td><a href="https://currencylayer.com">Currency Data</a> provides reliable exchange rates and currency conversions for your business up to 168 world currencies.</td>
</tr>
<tr>
<td><img src="https://assets.apilayer.com/apis/exchangerates_data.png" width="50px"/></td>
<td><a href="https://apilayer.com/marketplace/exchangerates_data-api">Exchange Rates Data</a> provides reliable exchange rates and currency conversions for your business with over 15 data sources.</td>
<td><a href="https://exchangeratesapi.io">Exchange Rates Data</a> provides reliable exchange rates and currency conversions for your business with over 15 data sources.</td>
</tr>
<tr>
<td><img src="https://global-uploads.webflow.com/5ebbd0a566a3996636e55959/5ec2ba29feeeb05d69160e7b_webclip.png" width="50px"/></td>
Expand All @@ -42,8 +42,8 @@ Here is the complete list of the currently implemented services:
| Service | Base Currency | Quote Currency | Historical |
|---------------------------------------------------------------------------|----------------------|----------------|----------------|
| [Fixer](https://fixer.io) | EUR (free, no SSL), * (paid) | * | Yes |
| [Currency Data](https://apilayer.com/marketplace/currency_data-api) | USD (free), * (paid) | * | Yes |
| [Exchange Rates Data](https://apilayer.com/marketplace/exchangerates_data-api) | USD (free), * (paid) | * | Yes |
| [Currency Data](https://currencylayer.com) | USD (free), * (paid) | * | Yes |
| [Exchange Rates Data](https://exchangeratesapi.io) | USD (free), * (paid) | * | Yes |
| [Abstract](https://www.abstractapi.com) | * | * | Yes |
| [coinlayer](https://coinlayer.com) | * Crypto (Limited standard currencies) | * Crypto (Limited standard currencies) | Yes |
| [Fixer](https://fixer.io) | EUR (free, no SSL), * (paid) | * | Yes |
Expand Down
16 changes: 8 additions & 8 deletions doc/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
</tr>
<tr>
<td><img src="https://assets.apilayer.com/apis/currency_data.png" width="50px"/></td>
<td><a href="https://apilayer.com/marketplace/currency_data-api">Currency Data</a> provides reliable exchange rates and currency conversions for your business up to 168 world currencies.</td>
<td><a href="https://currencylayer.com">Currency Data</a> provides reliable exchange rates and currency conversions for your business up to 168 world currencies.</td>
</tr>
<tr>
<td><img src="https://assets.apilayer.com/apis/exchangerates_data.png" width="50px"/></td>
<td><a href="https://apilayer.com/marketplace/exchangerates_data-api">Exchange Rates Data</a> provides reliable exchange rates and currency conversions for your business with over 15 data sources.</td>
<td><a href="https://exchangeratesapi.io">Exchange Rates Data</a> provides reliable exchange rates and currency conversions for your business with over 15 data sources.</td>
</tr>
<tr>
<td><img src="https://global-uploads.webflow.com/5ebbd0a566a3996636e55959/5ec2ba29feeeb05d69160e7b_webclip.png" width="50px"/></td>
Expand Down Expand Up @@ -78,10 +78,10 @@ $client = new CurlClient(null, null, $options);
$service = new Fixer($client, null, ['api_key' => 'Get your key here: https://fixer.io']);

// Or use the CurrencyData service
$service = new CurrencyData($client, null, ['api_key' => 'Get your key here: https://apilayer.com/marketplace/currency_data-api']);
$service = new CurrencyData($client, null, ['api_key' => 'Get your key here: https://currencylayer.com']);

// Or use the ExchangeRatesData service
$service = new ExchangeRatesData($client, null, ['api_key' => 'Get your key here: https://apilayer.com/marketplace/exchangerates_data-api']);
$service = new ExchangeRatesData($client, null, ['api_key' => 'Get your key here: https://exchangeratesapi.io']);

// Or use the AbstractApi service
$service = new AbstractApi($client, null, ['api_key' => 'Get your key here: https://app.abstractapi.com/users/signup']);
Expand Down Expand Up @@ -150,8 +150,8 @@ use Exchanger\Service\AbstractApi;

$service = new Chain([
new Fixer($client, null, ['api_key' => 'Get your key here: https://fixer.io']),
new CurrencyData($client, null, ['api_key' => 'Get your key here: https://apilayer.com/marketplace/currency_data-api']),
new ExchangeRatesData($client, null, ['api_key' => 'Get your key here: https://apilayer.com/marketplace/exchangerates_data-api']),
new CurrencyData($client, null, ['api_key' => 'Get your key here: https://currencylayer.com']),
new ExchangeRatesData($client, null, ['api_key' => 'Get your key here: https://exchangeratesapi.io']),
new AbstractApi($client, null, ['api_key' => 'Get your key here: https://app.abstractapi.com/users/signup'])
]);
```
Expand Down Expand Up @@ -421,8 +421,8 @@ use Exchanger\Service\ApiLayer\Fixer;

$service = new Chain([
new Fixer($client, null, ['api_key' => 'Get your key here: https://fixer.io']),
new CurrencyData($client, null, ['api_key' => 'Get your key here: https://apilayer.com/marketplace/currency_data-api']),
new ExchangeRatesData($client, null, ['api_key' => 'Get your key here: https://apilayer.com/marketplace/exchangerates_data-api']),
new CurrencyData($client, null, ['api_key' => 'Get your key here: https://currencylayer.com']),
new ExchangeRatesData($client, null, ['api_key' => 'Get your key here: https://exchangeratesapi.io']),
new AbstractApi($client, null, ['api_key' => 'Get your key here: https://app.abstractapi.com/users/signup']),
new CoinLayer($client, null, ['access_key' => 'access_key', 'paid' => false]),
new Exchanger\Service\Fixer($client, null, ['access_key' => 'YOUR_KEY']),
Expand Down
4 changes: 2 additions & 2 deletions src/Service/ApiLayer/CurrencyData.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* ApiLayer Currency Data Service.
*
* @see https://apilayer.com/marketplace/currency_data-api
* @see https://currencylayer.com
*
* @author Florian Voutzinos <florian@voutzinos.com>
*/
Expand All @@ -48,7 +48,7 @@ final class CurrencyData extends HttpService
public function processOptions(array &$options): void
{
if (!isset($options[self::API_KEY_OPTION])) {
throw new NonBreakingInvalidArgumentException('The "api_key" option must be provided to use CurrencyData (https://apilayer.com/marketplace/currency_data-api).');
throw new NonBreakingInvalidArgumentException('The "api_key" option must be provided to use CurrencyData (https://currencylayer.com).');
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Service/ApiLayer/ExchangeRatesData.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* ApiLayer Exchange Rates Data API.
*
* @see https://apilayer.com/marketplace/exchangerates_data-api
* @see https://exchangeratesapi.io
*
* @author Florian Voutzinos <florian@voutzinos.com>
*/
Expand All @@ -48,7 +48,7 @@ final class ExchangeRatesData extends HttpService
public function processOptions(array &$options): void
{
if (!isset($options[self::API_KEY_OPTION])) {
throw new NonBreakingInvalidArgumentException('The "api_key" option must be provided to use Exchange Rates Data (https://apilayer.com/marketplace/exchangerates_data-api).');
throw new NonBreakingInvalidArgumentException('The "api_key" option must be provided to use Exchange Rates Data (https://exchangeratesapi.io).');
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Tests/Service/ApiLayer/CurrencyDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CurrencyDataTest extends ServiceTestCase
public function it_throws_an_exception_if_api_key_option_missing()
{
$this->expectException(NonBreakingInvalidArgumentException::class);
$this->expectExceptionMessage('The "api_key" option must be provided to use CurrencyData (https://apilayer.com/marketplace/currency_data-api).');
$this->expectExceptionMessage('The "api_key" option must be provided to use CurrencyData (https://currencylayer.com).');
new CurrencyData($this->createMock('Http\Client\HttpClient'));
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Tests/Service/ApiLayer/ExchangeRatesDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ExchangeRatesDataTest extends ServiceTestCase
public function it_throws_an_exception_if_api_key_option_missing()
{
$this->expectException(NonBreakingInvalidArgumentException::class);
$this->expectExceptionMessage('The "api_key" option must be provided to use Exchange Rates Data (https://apilayer.com/marketplace/exchangerates_data-api).');
$this->expectExceptionMessage('The "api_key" option must be provided to use Exchange Rates Data (https://exchangeratesapi.io).');
new ExchangeRatesData($this->createMock('Http\Client\HttpClient'));
}

Expand Down

0 comments on commit 4655873

Please sign in to comment.