Open DevMunashe opened 10 years ago
Wait.... what is the expected behavior by passing two "from" and two "to". Should I return the rate of EUR-INR, ERU-EUR, USD-INR and USD-EUR?
I don't this this is a good idea.
If you want more then one rate you could make more queries. Or you can subscribe to a service providing you with multiple exchange rates for a selected base currency.
Would it be possible to get support for a '?to=USD&from=GBP&from=EUR'? Not sure about others, but for my purpose this would cut down a bunch of requests.
Should be possible in a way like this:
// you only want to provide one value for $from /?from=eur&to=gbp,usd,chf
// get each of the currency from the parameter $currencies = explode(',',$to);
// output them in json
{
"from":"eur",
"rate":{
"gbp":1.234,
"usd":2.134,
"chf":3.124
}
}
I would like to have more than rate returned after making a single request. For exmple i want USD to GBP and i also want want EUR to USD in the same request
something like the following http://rate-exchange.appspot.com/currency?from=EUR&to=INR&from=USD&to=EUR