0.03
No release in over a year
Ruby wrapper for interacting with the SportRadar API. SportRadar has over 23 published APIs. This library aims to support them incrementally. Contributions welcome!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Gem Version Build Status Code Climate Coverage Status Dependency Status

Sportradar API

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

SportRadar APIs

Current API Versions

🙋 = 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 📚 👍

Installation

Add this line to your application's Gemfile:

gem 'sportradar-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sportradar-api

Usage

TODO: Add some usage instructions.

Configuration

Manage your ruby environment through .ruby-version and .ruby-gemset files.

Create .env for environment variables. Follow the .env.sample for guidance.

Simulation Games

http://developer.sportradar.us/page/Live_Game_Simulation

Soccer

sim = Sportradar::Api::Soccer.new('na', 't', true)
summary = sim.match_summary(sim.simulation_match)
boxscore = sim.match_boxscore(sim.simulation_match)

Football

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

Development

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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/beneggett/sportradar-api.