Rates array or catalog
dasoga opened this issue · 2 comments
dasoga commented
What do you think send the rates as array, or maybe send a catalog of rates to make it dynamically, because now I'm building an iOS client, but I had to create an enum for rates, if you add other rate then I'll have to update the client app.
Thanks in advance for your comments.
hakanensari commented
@dasoga The European Central Bank produces the dataset. They do occasionally add or remove currencies; unfortunately I would not be able to anticipate such changes.
dasoga commented
I mean
Instead of this.
{
"base": "USD",
"date": "2018-01-09",
"rates": {
"AUD": 1.2774,
"BGN": 1.6391,
"BRL": 3.2326,
"CAD": 1.2425,
"CHF": 0.98282,
"CNY": 6.5257,
"CZK": 21.4,
"DKK": 6.2411,
"GBP": 0.73978,
"HKD": 7.8212,
"HRK": 6.2416,
"HUF": 259.27,
"IDR": 13442,
"ILS": 3.4442,
"INR": 63.713,
"JPY": 112.56,
"KRW": 1068.4,
"MXN": 19.218,
"MYR": 4.0095,
"NOK": 8.1055,
"NZD": 1.3913,
"PHP": 50.28,
"PLN": 3.5028,
"RON": 3.8996,
"RUB": 57.035,
"SEK": 8.2373,
"SGD": 1.3352,
"THB": 32.25,
"TRY": 3.7582,
"ZAR": 12.348,
"EUR": 0.83808
}
}
Could be better if you return an array of rates.
{
"base": "USD",
"date": "2018-01-09",
"rates": [
"AUD": 1.2774,
"BGN": 1.6391,
"BRL": 3.2326,
"CAD": 1.2425,
"CHF": 0.98282,
"CNY": 6.5257,
"CZK": 21.4,
"DKK": 6.2411,
"GBP": 0.73978,
"HKD": 7.8212,
"HRK": 6.2416,
"HUF": 259.27,
"IDR": 13442,
"ILS": 3.4442,
"INR": 63.713,
"JPY": 112.56,
"KRW": 1068.4,
"MXN": 19.218,
"MYR": 4.0095,
"NOK": 8.1055,
"NZD": 1.3913,
"PHP": 50.28,
"PLN": 3.5028,
"RON": 3.8996,
"RUB": 57.035,
"SEK": 8.2373,
"SGD": 1.3352,
"THB": 32.25,
"TRY": 3.7582,
"ZAR": 12.348,
"EUR": 0.83808
]
}
Thanks for your response