A basic client to query Yahoo! Finance API.
Work in process, it might work, or not. It seems that Yahoo! disabled that kind of API access lately.
It was created to support https://github.com/fleveque/dividend-portfolio pet project.
Install the gem and add to the application's Gemfile by executing:
bundle add yahoo_finance_client
or add this line to your application's Gemfile:
gem "yahoo_finance_client"
And then execute:
$ bundle install
If bundler is not being used to manage dependencies, install the gem by executing:
gem install yahoo_finance_client
You should be able to get stock data by calling this method and passing a string with the stock ticker:
YahooFinanceClient::Stock.get_quote("AAPL")
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
RuboCop is used as linter and can be run using rake rubocop
Bug reports and pull requests are welcome on GitHub at https://github.com/fleveque/yahoo_finance_client.
This gem is licensed under the GNU General Public License v3.0. See the LICENSE.txt file for details.