Project

cbs

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby client for the CBS Sports API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 0.11.0
~> 3.5
 Project Readme

CBS Sports

Simply Ruby Wrapper for the CBS Sports API

Installation

gem install cbs

Usage

You can configure the client globally:

CBS.configure do |c|
  c.sport = 'football'
end

cbs = CBS::Client.new

... or locally:

cbs = CBS::Client.new(sport: 'baseball')

... or on a per-request basis:

cbs = CBS::Client.new
cbs.players(sport: 'hockey')

To list players:

cbs.players(sport: 'baseball')

To search for a player:

cbs.player_search('Carson Wentz', sport: 'football')

To get a player profile:

# Carson Wentz player `id` is '1907522'
cbs.profile(1907522)

To list teams:

cbs.teams(sport: 'football')