Project

espn

0.01
No commit activity in last 3 years
No release in over 3 years
A ruby wrapper for the ESPN Developer API. Their API allows you to get sports, leagues, scores, standings, the latest news and more. This is a wrapper around that API so you can pull it into your applications with ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies

Runtime

 Project Readme

On December 8th, 2014, the ESPN API will no longer be active. You can read more about this in their announcement.

ESPN

Simply Ruby Wrapper for the ESPN Developer API.

Build Status Gem Version

Installation

gem install espn

Examples

First, setup your client:

client = ESPN::Client.new(api_key: 'your_api_key_here')

Next, make calls against the ESPN API.

Sports

The Sports API is what they call a 'Helper' API. This allows you to pull out data for different sections of the API. The Sports API is not documented, but you can see how it works on their API explorer.

client.sports(:mlb)
# => [#<Hashie::Mash name="baseball"...>]

Athletes

For more information about the Athletes API, view the documentation.

client.athletes(:mlb)
# => [#<Hashie::Mash fullName="Chase Utley"...>]

client.athlete(12345, :nfl).fullName
# => #<Hashie::Mash fullName="LeSean McCoy"...>

Audio

For more information about the Audio API, view the documentation.

client.audio(podcast_id: 5)
# => [#<Hashie::Mash id=8656148 premium=false description=...>]

ESPN Now

For more information about the ESPN NOW API, view the documentation.

client.now
# => [#<Hashie::Mash headline="Halladay's future"...>]

Headlines

For more information about the Headlines API, view the documentation.

client.headlines(:mlb)
# => [#<Hashie::Mash headline="Ronnie Brewer has deal with Rockets"...>]

client.headline(12345, :nfl)
# => #<Hashie::Mash headline="Eagles won't be good this year"...>

Medals

For more information about the Medals API, view the documentation.

client.medals
# => #<Hashie::Mash season=#<Hashie::Mash...> sports=[] competitors=[]...>

Research Notes

For more information about the Resarch Notes API, view the documentation.

client.notes
# => [#<Hashie::Mash headline="Cowboys Stink"...>]

client.note(8659824)
# => #<Hashie::Mash headline="Cowboys Stink"...>

Scores & Schedules

For more information about the Scores & Schedules API, view the documentation.

client.scores(:mlb)
# => [#<Hashie::Mash competitions=[#<Hashie::Mash competitors=[]...]...>]

client.score(12345)
# => #<Hashie::Mash competitions=[#<Hashie::Mash competitors=[]...]...>

Standings

For more information about the Standings API, view the documentation.

client.standings(:nba)
# => [#<Hashie::Mash name="Eastern" groups=[]...>]

Teams

For more information about the Teams API, view the documentation.

client.teams(:mlb)
# => [#<Hashie::Mash name="Phillies"...>]

client.team(12345, :nfl)
# => #<Hashie::Mash name="Eagles"...>

Video

For more information about the Video API, view the documentation.

client.videos
# => [#<Hashie::Mash name="Video Channel" videos=[]...>]

More Information

This is a Ruby Wrapper around the ESPN developer API. If you want to see how their API works, you can visit their developer center.

Inspiration

A ton of inspiration was taken from Octokit. Thanks to those guys for showing the world how API Wrappers should work.

Copyright

Copyright (c) 2013 Andrew Thorp. See LICENSE for details.

Attribution

ESPN API