Skip to content

barbarosh/sportradar-api

 
 

Repository files navigation

Gem Version Build Status Code Climate Coverage 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 5 📚 - -
NHL 3 📚 - -
NBA 3 📚 -
NCAAMB 3 📚 - -
NCAAFB 1 📚 - -
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)

NFL

It's possible to find the current simulation game:

Sportradar::Api::Nfl.new('o').active_simulation
=>
https://api.sportradar.us/nfl-sim1/games/f45b4a31-b009-4039-8394-42efbc6d5532/boxscore.xml
Live Game: Green Bay Packers vs Minnesota Vikings. Q2 00:08.  game_id='f45b4a31-b009-4039-8394-42efbc6d5532'

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%