The SportRadar API extensively covers league & sports data. This gem wraps it up, marshals the data into Ruby Objects we know and love.
Currently (July 2016) the SportRadar API has 23 documented APIs.
Our goal is to incrementally integrate with them. Contributions are welcome
🙋 = Basic API wrapped/object mapping in progress ✅ = API implemented and wrapped in proper objects
API | Version | Docs | Implemented? | Priority |
---|---|---|---|---|
NFL | 1 | 📚 | ✅ | 👍 |
MLB | 6 | 📚 | ✅ | 👍 |
NHL | 3 | 📚 | - | - |
NBA | 3 | 📚 | ✅ | 👍 |
NCAAMB | 3 | 📚 | ✅ | 👍 |
NCAAFB | 3 | 📚 | ✅ | 👍 |
Golf | 2 | 📚 | - | - |
NASCAR | 3 | 📚 | - | - |
Odds | 1 | 📚 | 🙋 | 👍 |
Content | 3 | 📚 | ✅ | 👍 |
Images | 2 | 📚 | ✅ | 👍 |
Live Images | 1 | 📚 | ✅ | 👍 |
Olympics | 2 | 📚 | - | - |
Soccer | 2 | 📚 | ✅️ | 👍 |
NCAAWB | 3 | 📚 | - | - |
MMA | 1 | 📚 | - | - |
Cricket | 1 | 📚 | - | - |
WNBA | 3 | 📚 | - | - |
NCAAMH | 3 | 📚 | - | - |
NPB | 1 | 📚 | - | - |
Rugby | 1 | 📚 | - | - |
Tennis | 1 | 📚 | - | - |
ESPORTS | 1 | 📚 | - | - |
Simulation APIs | 1 | 📚 | ✅ | 👍 |
Add this line to your application's Gemfile:
gem 'sportradar-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sportradar-api
TODO: Add some usage instructions.
Manage your ruby environment through .ruby-version
and .ruby-gemset
files.
Create .env
for environment variables. Follow the .env.sample
for guidance.
http://developer.sportradar.us/page/Live_Game_Simulation
sim = Sportradar::Api::Soccer.new('na', 't', true)
summary = sim.match_summary(sim.simulation_match)
boxscore = sim.match_boxscore(sim.simulation_match)
It's possible to use simulation games from Sportradar. This allows you to see what data looks like during a game (including non game APIs), useful for development during the offseason.
sims = Sportradar::Api::Football::Nfl.simulations # => returns array of simulation games. Only 1 is inprogress at a time
sims.each(&:get_pbp).detect(&:started?)
nfl = Sportradar::Api::Football::Nfl.simulation # => returns Sportradar::Api::Football::Nfl instance with a sim api. useful for mid season stats, standings, etc
sims = Sportradar::Api::Football::Ncaafb.simulations # => returns array of simulation games. Only 1 is inprogress at a time
sims.each(&:get_pbp).detect(&:started?)
ncaafb = Sportradar::Api::Football::Ncaafb.simulation # => returns Sportradar::Api::Football::Ncaafb instance with a sim api. useful for mid season stats, standings, etc
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/beneggett/sportradar-api.