Coder Social home page Coder Social logo

someapp / sports_data_api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rlovelett/sports_data_api

0.0 2.0 0.0 645 KB

A Ruby interface to the Sports Data API. API supports NFL, MLB, NHL, and NBA.

Home Page: http://developer.sportsdatallc.com/api_gallery

License: Other

sports_data_api's Introduction

SportsDataApi Build Status Coverage Status

SportsDataApi is an attempt to make a Ruby interface to the SportsData API. The goal is to eventaully support the full API. Pull requests that extend the API support are always welcome.

SportsDataโ€™s comprehensive data coverage includes all major U.S. sports, plus hundreds of leagues throughout the world. Their live game analysts capture every possible event of every game, in real time and with accuracy standards developed from years of experience.

Author

Ryan Lovelett ( @rlovelett )

Drop me a message for any questions, suggestions, requests, bugs or submit them to the issue log.

API Support

Installation

Add this line to your application's Gemfile:

gem 'sports_data_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sports_data_api

Usage

The specs for this Gem should give you some idea of how to make use of the API. For now they will be the usage information. As always Pull Requests for better documentation are welcome.

Testing

The tests for the API have been mocked using VCR and WebMock.

Actual calls to the Sports Data LLC have been mocked out to prevent storage of valid API credentials and making superflous API calls while testing. As such, in order to generically run the tests (without actually hitting) the server the only thing that needs to be done is to run the specs (e.g., bundle exec rake spec or bundle exec guard start).

However, if you want to refresh the actual server API responses you will need to re-record all of the VCR cassettes. This can be achieved simply by performing the following two steps:

  1. Delete all the cassettes (rm spec/cassettes/*.yml)
  2. Run specs passing the API key as environment variable (SPORTS_DATA_API_KEY=realapikey bundle exec rake spec)

Contributing

  1. Fork it
  2. Create a topic branch (git checkout -b topic)
  3. Make your changes
  4. Squash your changes into one commit
  5. Create new Pull Request against this squashed commit

sports_data_api's People

Contributors

rlovelett avatar rottmanj avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.