At the moment if you want to get the exchange for multiple currencies, you'd have to make multiple method calls. As an example, to get the exchange rates for EUR to GBP and EUR to USD, you'd have to do the following:
This could be updated so that the second parameter accepts an array of currencies. By doing this, we can then return the multiple exchange rates at once. We might be able to do all this under-the-hood by making just one call to the API; otherwise we'll have to make multiple calls and build up the array ourselves.
Potential example of proposed change:
$eurUsdExchangeRate = $exchangeRates->exchangeRate('GBP', ['EUR', 'USD']);
// $eurUsdExchangeRate would be equal to:
[
'EUR' => 11111,
'USD' => 22222,
]
At the moment if you want to get the exchange for multiple currencies, you'd have to make multiple method calls. As an example, to get the exchange rates for EUR to GBP and EUR to USD, you'd have to do the following:
This could be updated so that the second parameter accepts an array of currencies. By doing this, we can then return the multiple exchange rates at once. We might be able to do all this under-the-hood by making just one call to the API; otherwise we'll have to make multiple calls and build up the array ourselves.
Potential example of proposed change: