google_currency icon indicating copy to clipboard operation
google_currency copied to clipboard

Migrate from calculator to converter?

Open xdmx opened this issue 13 years ago • 13 comments

In few days google will shut down the igoogle product (http://www.google.com/ig), which is the one used by the gem for the rate exchange (http://www.google.com/ig/calculator). This will probably cause problems fetching the new rates. Should be a migration to http://www.google.com/finance/converter a better option?

xdmx avatar Oct 28 '13 21:10 xdmx

That'd be awesome. Please submit a pull request.

semmons99 avatar Oct 29 '13 00:10 semmons99

@xdmx are you looking at this? I can look into this today.

A problem with using Google Finance Converter is that results show a maximum of 4 decimal places. This affects precision. E.g. 1 KRW = 0.0094 USD but the converter would return 0.009. The converter will also fail to convert some currencies presumably because of this decimal point issue. E.g. 1 VND = 0.000047 USD but the converter would fail (and return "Could not convert.")

Having said that, being able to have some exchange rates from the Finance Converter would be better than having none at all from the shutdown of iGoogle.

yinquanteo avatar Oct 29 '13 03:10 yinquanteo

Should we wait till Nov 1 to see if Google removes their www.google.com/ig/calculator service?

yinquanteo avatar Oct 29 '13 09:10 yinquanteo

@yinquanteo I'm not, feel free to check it out

One thing that I've noticed is that the converted supports more rates than the calculator, eg 1 USD to BDT, with the converter works, but the calculator returns an error

There is also this one: http://rate-exchange.appspot.com/currency?from=USD&to=EUR but I have no idea if it's by google or some user, and if it's safe to use it.

I guess that it'd be better be ready with a branch working with the converter (or another service), so if google decides to shut down the calculator we have a working alternative that just needs to be merged and released as a new gem. What do you think?

xdmx avatar Oct 29 '13 12:10 xdmx

That seems like a smart idea. 

  • shane

On Tue, Oct 29, 2013 at 8:52 AM, xdmx [email protected] wrote:

@yinquanteo I'm not, feel free to check it out One thing that I've noticed is that the converted supports more rates than the calculator, eg 1 USD to BDT, with the converter works, but the calculator returns an error There is also this one: http://rate-exchange.appspot.com/currency?from=USD&to=EUR but I have no idea if it's by google or some user, and if it's safe to use it.

I guess that it'd be better be ready with a branch working with the converter (or another service), so if google decides to shut down the calculator we have a working alternative that just needs to be merged and released as a new gem. What do you think?

Reply to this email directly or view it on GitHub: https://github.com/RubyMoney/google_currency/issues/22#issuecomment-27299929

semmons99 avatar Oct 29 '13 12:10 semmons99

@xdmx Yup, that's a great idea!

Also, http://rate-exchange.appspot.com is using the iGoogle calculator to power their service. Source: https://github.com/hippasus/ExchangeRates/blob/master/src/currency_rates.py#L13

yinquanteo avatar Oct 29 '13 13:10 yinquanteo

I created a rm-igoogle branch.

This is the commit that uses Google Finance Converter instead of iGoogle Calculator: 05743c0fb51dfd9ce9338bb32bd0044b27e3656f

Let's wait and see after Nov 1 if we should merge this in master.

yinquanteo avatar Oct 31 '13 08:10 yinquanteo

Google just shut down the calculator, the branch should be merged in the master and release a new gem version: http://www.google.com/ig/calculator?hl=en&q=100USD=?INR

xdmx avatar Nov 04 '13 23:11 xdmx

@yinquanteo pull request?

semmons99 avatar Nov 05 '13 00:11 semmons99

@semmons99 I've already pushed to a remote branch called rm-igoogle on RubyMoney/google_currency.

Would you like me to merge into master?

yinquanteo avatar Nov 05 '13 03:11 yinquanteo

@yinquanteo yeah, just make sure to do it with a PR

semmons99 avatar Nov 05 '13 03:11 semmons99

Done

yinquanteo avatar Nov 05 '13 03:11 yinquanteo

v3.0.0 was just pushed to rubygems.org w/ the new backend.

semmons99 avatar Nov 05 '13 04:11 semmons99