New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scottbarr-yahoo_currency

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scottbarr-yahoo_currency

  • 0.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= YahooCurrency

Retrieve currency exchange rates from Yahoo! Finance.

== The Yahoo! Finance Service

URL to fetch the AUD to USD exchange rate

http://download.finance.yahoo.com/d/quotes.csv?s=AUDUSD=X&f=nl1d1t1

Although the Yahoo! service supports multiple rates values from one request, this class does not yet support this functionality yet.

$ curl "http://download.finance.yahoo.com/d/quotes.csv?s=USDCAD=X+JPYUSD=X+GBPUSD=X+USDJPY=X+EURUSD=X&f=nl1d1t1" "USD to CAD",1.0191,"6/18/2008","2:45am" "JPY to USD",0.0093,"6/18/2008","2:45am" "GBP to USD",1.9514,"6/18/2008","2:44am" "USD to JPY",108.085,"6/18/2008","2:45am" "EUR to USD",1.5493,"6/18/2008","2:44am"

== Features

  • So easy to use, even a baby could find out what his currency is trading at.
  • Tested with Ruby 1.8.7 and 1.9.1

== Example

exchange_rate = YahooCurrency.get_rate!("JPY", "USD") exchange_rate.from #=> "JPY" exchange_rate.to #=> "USD" exchange_rate.rate #=> 0.0111 exchange_rate.timestamp #=> Wed Feb 11 22:20:00 +0800 2009

== References

== License

(The MIT License)

Copyright (c) 2009 Global IT Creations Pte Ltd http://www.globalitcreations.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FAQs

Package last updated on 10 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc