Skip to content

Commit 409c80f

Browse files
author
Artur Smolarek
committed
xChangeApi.com support
1 parent 7acf348 commit 409c80f

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Here is the list of the currently implemented services:
8484
| [Open Exchange Rates](https://openexchangerates.org) | USD (free), * (paid) | * | Yes |
8585
| [Xignite](https://www.xignite.com) | * | * | Yes |
8686
| [Currency Converter API](https://www.currencyconverterapi.com) | * | * | Yes (free but limited or paid) |
87+
| [xChangeApi.com](https://xchangeapi.com) | * | * | Yes |
8788
| Array | * | * | Yes |
8889

8990
Additionally, you can add your own services as long as they implement the `ExchangeRateService` interface.

doc/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ $swap = (new Builder())
342342
->add('currency_converter', ['access_key' => 'secret', 'enterprise' => false])
343343
->add('open_exchange_rates', ['app_id' => 'secret', 'enterprise' => false])
344344
->add('xignite', ['token' => 'token'])
345+
->add('xchangeapi', ['api-key' => 'secret'])
345346
->add('array', [
346347
[
347348
'EUR/USD' => 1.1,

tests/Service/FactoryTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use Exchanger\Service\WebserviceX;
2828
use Exchanger\Service\Xignite;
2929
use Exchanger\Service\RussianCentralBank;
30+
use Exchanger\Service\XchangeApi;
3031
use Http\Mock\Client;
3132
use PHPUnit\Framework\TestCase;
3233
use Swap\Service\Factory;
@@ -61,6 +62,7 @@ public function servicesProvider()
6162
['xignite', Xignite::class, ['token' => 'token']],
6263
['russian_central_bank', RussianCentralBank::class],
6364
['cryptonator', Cryptonator::class],
65+
['xchangeapi', XchangeApi::class, ['api-key' => 'api-key']]
6466
];
6567
}
6668

0 commit comments

Comments
 (0)