Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.25 KB

README.md

File metadata and controls

53 lines (34 loc) · 1.25 KB

Zamboni

While working on an NHL god's website, we needed easy access to player stats and team schedules. ESPN has an API, but its pretty terrible unless your a super-duper-fabulous-partner. Thus, Zamboni was born. A simple screen scraping gem for NHL player & team info.

Btw, that god was this guy:

Pascha

Installation

Add this line to your application's Gemfile:

gem 'Zamboni'

And then execute:

$ bundle

Or install it yourself as:

$ gem install Zamboni

Usage

Because our project is based on a single player, we simply sub-classed Zamboni::Player

class Pavel < Zamboni::Player
end

set the id from ESPN

#http://espn.go.com/nhl/player/_/id/1223/pavel-datsyuk
#------find player id here----------^^^^--------------
class Pavel < Zamboni::Player
  def initialize
    @id = 1223
  end
end

and then call instance methods like .season_stats or info.

pavel = new Pavel
pavel.info['name'] #Pavel Datsyuk
pavel.info['age'] #34

Contributing

  1. Fork it
  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