Sha256: bbd3a21449d5c436bfdf46384a45f24f1f0984c6959785658fecd6ebc6b33716

Contents?: true

Size: 1.29 KB

Versions: 9

Compression:

Stored size: 1.29 KB

Contents

= MLB.rb
==== MLB.rb is a Ruby library for retrieving current Major League Baseball players, managers, teams, divisions, and leagues.
== Installation
  $ gem install mlb -s http://gemcutter.org
== Usage
  $ 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"
== Credits
Many thanks to:
* Freebase[http://www.freebase.com]
* httparty[http://github.com/jnunemaker/httparty]
Also, thanks to beer[http://www.21st-amendment.com].

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mlb-0.2.6 README.rdoc
mlb-0.2.5 README.rdoc
mlb-0.2.4 README.rdoc
mlb-0.2.3 README.rdoc
mlb-0.2.2 README.rdoc
mlb-0.2.1 README.rdoc
mlb-0.2.0 README.rdoc
mlb-0.1.2 README.rdoc
mlb-0.1.1 README.rdoc