This is the rate exchange JSON/JSONP APIs project which is deployed at http://rate-exchange.appspot.com/.
Currently only currency rate exchange is supported.
By invoking the currency API, just send a request to /currency
as follow:
/currency?from=USD&to=EUR&q=1&callback=jsonpCallback
And note that the parameter q
and callback
is optional.
Here are some samples:
Request | Response |
---|---|
/currency?from=USD&to=EUR |
{ |
/currency?from=USD&to=EUR&q=2 |
{ |
/currency?from=USD&to=EUR&callback=jsonpCallback |
jsonpCallback({ |
/currency?from=USD&to=EUR&q=2&callback=jsonpCallback |
jsonpCallback({ |
/currency?from=USD |
{ |
By invoking the temperature API, send a request to /temperature
as follows:
/temperature?mode=C2F&q=37
The mode can be C2F
(Celsius to Fahrenheit) or F2C
(Fahrenheit to Celsius). A jsonp callback
parameter is optional. The response is as:
{"v": 98.6, "mode": "C2F", "qty": 37.0}