Skip to content

Commit 892dc06

Browse files
author
Herbert Maschke
committed
Add 'source' parameter to exchangerate.host API
1 parent d31e57e commit 892dc06

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `exchange` will be documented in this file.
44

5+
## v1.3.2 - to be released [#16](https://github.com/worksome/exchange/pull/16)
6+
7+
Add 'source' parameter to exchangerate.host API
8+
59
## v1.2.0 - 2022-07-21
610

711
### Changed

config/exchange.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@
3030
'access_key' => env('FIXER_ACCESS_KEY'),
3131
],
3232

33+
/*
34+
|--------------------------------------------------------------------------
35+
| exchangerate.host: https://exchangerate.host
36+
|--------------------------------------------------------------------------
37+
*/
38+
'exchangerate' => [
39+
// or any at: https://api.exchangerate.host/sources
40+
'source' => 'ecb',
41+
],
42+
3343
/*
3444
|--------------------------------------------------------------------------
3545
| Cache

src/ExchangeRateProviders/FixerProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ private function makeRequest(string $baseCurrency, array $currencies): Collectio
5050
'access_key' => $this->accessKey,
5151
'base' => $baseCurrency,
5252
'format' => 1,
53+
'source' => config('exchange.services.exchangerate.source', 'ecb'),
5354
'symbols' => implode(',', $currencies),
5455
])
5556
->throw()

0 commit comments

Comments
 (0)