NBA.rb

Gem Version Build Status

NBA.rb is a Ruby library for retrieving NBA League players, teams and divisions.

Insipred by @sferik's MLB.rb.

Installation

gem install nba

Usage Examples

$ irb
>> require 'nba'
>> NBA::Team.all.first.name                    # => "Atlanta Hawks"
>> NBA::Team.all.first.division                # => "Southeast Division"
>> NBA::Team.all.first.founded                 # => 1946
>> NBA::Team.all.first.players.first.name      # => "Al Horford"
>> NBA::Team.all.first.players.first.number    # => 15
>> NBA::Team.all.first.players.first.position  # => ["Forward-center"]

Supported Ruby Versions

This library aims to support and is tested against the following Ruby implementations:

  • Ruby 1.8.7
  • Ruby 1.9.2
  • Ruby 1.9.3
  • Ruby 2.0.0
  • Ruby 2.1.0
  • Rubinius
  • JRuby

If something doesn't work on one of these interpreters, it's a bug.

This library may inadvertently work (or seem to work) on other Ruby implementations, however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.

Colophon

NBA was built with the following tools:

And, special thanks to @sfeirk!

Contributing

  1. Fork it ( http://github.com/larrylv/nba/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright (c) 2010-2014 Larry Lv. See LICENSE for details.