Go to file
Erik Michaels-Ober c79bb2ed42 Operator ? should be surrounded with a single space 2015-08-14 19:49:10 +02:00
cache Pretty-format JSON cache/fixture 2014-01-04 16:11:55 +01:00
lib Operator ? should be surrounded with a single space 2015-08-14 19:49:10 +02:00
spec Remove emtpy line from end of block in spec 2014-12-11 13:43:44 +01:00
.gitignore Add Yardstick 2013-12-31 06:08:57 +01:00
.rspec Update rubocop dependency to >= 0.23 2014-06-22 16:13:08 +02:00
.rubocop.yml Update rubocop dependency to >= 0.23 2014-06-22 16:13:08 +02:00
.travis.yml Flip secret bit to enable Docker builds 2014-08-21 22:24:50 +02:00
.yardopts Update YARD task 2013-01-27 10:49:25 -08:00
CONTRIBUTING.md Add Yardstick 2013-12-31 06:08:57 +01:00
Gemfile Update rubocop dependency to >= 0.27 2014-10-31 13:58:15 +01:00
LICENSE.md Update copyright year [ci skip] 2013-02-09 07:51:26 -08:00
README.md Require Ruby 1.9.3 or higher 2014-07-20 22:11:32 +02:00
Rakefile Update rubocop dependency to >= 0.23 2014-06-22 16:13:08 +02:00
mlb.gemspec Ruby 1.9.3 shipped with rubygems 1.8.6.1, so minimum rubygems version is redundant 2015-08-14 19:31:42 +02:00

README.md

MLB.rb

Gem Version Build Status Dependency Status Code Climate Coverage Status

MLB.rb is a Ruby library for retrieving current Major League Baseball players, managers, teams, divisions, and leagues.

Installation

gem install mlb

Documentation

http://rdoc.info/gems/mlb

Usage Examples

$ irb
>> require 'mlb'
>> MLB::Team.all.first.name                   # => "Arizona Diamondbacks"
>> MLB::Team.all.first.league                 # => "National League"
>> MLB::Team.all.first.division               # => "National League West"
>> MLB::Team.all.first.manager                # => "Bob Melvin"
>> MLB::Team.all.first.wins                   # => 82
>> MLB::Team.all.first.losses                 # => 80
>> MLB::Team.all.first.founded                # => 1998
>> MLB::Team.all.first.mascot                 # => nil
>> MLB::Team.all.first.ballpark               # => "Chase Field"
>> MLB::Team.all.first.logo_url               # => "http://img.freebase.com/api/trans/image_thumb/wikipedia/images/en_id/13104064"
>> MLB::Team.all.first.players.first.name     # => "Alex Romero"
>> MLB::Team.all.first.players.first.number   # => 28
>> MLB::Team.all.first.players.first.position # => "Right fielder"

Supported Ruby Versions

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

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

MLB was built with the following tools:

Copyright (c) 2010-2013 Erik Michaels-Ober. See LICENSE for details.