Project

yahoo_nba

0.0
No commit activity in last 3 years
No release in over 3 years
Get nba stats using yahoo api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
>= 0

Runtime

>= 0
>= 0
 Project Readme

YahooNba

This gem uses the YAHOO Sports API to retrieve stats for NBA players

Installation

Add this line to your application's Gemfile:

gem 'yahoo_nba'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yahoo_nba

Usage

This gem assists in retrieving player keys and player stats using the Yahoo Sports API.

require 'yahoo_nba'
query = YahooNba::Query.new 'your_consumer_key', 'your_consumer_secret'

(to obtain a key, go to http://developer.yahoo.com/)

To get a hash with all the player keys:

player_keys_hash = query.get_all_player_keys_hash

The hash will be in the format:

{"Player Name"=>"key123", "Player2 Name"=> "key234"}

To get nba player stats:

query.get_players_stats_hash_using(player_keys_hash)

To get an invidual player's stats:

query.get_player_stats_hash_with_player_name("LeBron James")

The hash will be in the format returned by the Yahoo Sports API.
Note: There will be a request to the Yahoo API for each player so it will take a while to get the stats for all the players.

For more information see: http://developer.yahoo.com/fantasysports/guide/

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request