Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yahoo_nba

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yahoo_nba

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 14 Apr 2012

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