SportsDatabase
A ruby client to help with interacting to http://www.sportsdatabase.com/api. Currently tested and working on Ruby 2.2.1.
JSONP is returned from the API and this gem will handle the calls made to the API as well as parsing the JSONP returned.
Installation
Add this line to your application's Gemfile:
gem 'sports_database'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sports_database
Usage
Example call:
require 'sports_database'
client = SportsDatabase::Client.new({ api_key: "guest", sport: "ncaabb" })
client.query("full name, school name, team @ season=2014 and team=PURD")
client.query("full name, school name, team", "season=2014 and team=PURD")
result = client.query("date,points,o:points@team=Bears and season=2011 and site")
result.success?
result.fail?
result.status_code
result.data
Contributing
- Fork it ( https://github.com/[my-github-username]/sdb_api_client/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request