Class: CBS::Client
- Inherits:
-
Object
- Object
- CBS::Client
- Defined in:
- lib/cbs/client.rb,
lib/cbs/client/teams.rb,
lib/cbs/client/players.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#sport ⇒ Object
Returns the value of attribute sport.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #api_url ⇒ Object
-
#initialize(opts = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Teams
Methods included from Players
#player_search, #players, #profile
Methods included from Request
Constructor Details
#initialize(opts = {}) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 |
# File 'lib/cbs/client.rb', line 13 def initialize(opts={}) = CBS..merge(opts) Configuration::VALID_OPTIONS_KEYS.each do |key| send("#{key}=", [key]) end end |
Instance Attribute Details
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
10 11 12 |
# File 'lib/cbs/client.rb', line 10 def open_timeout @open_timeout end |
#sport ⇒ Object
Returns the value of attribute sport.
11 12 13 |
# File 'lib/cbs/client.rb', line 11 def sport @sport end |
#timeout ⇒ Object
Returns the value of attribute timeout.
9 10 11 |
# File 'lib/cbs/client.rb', line 9 def timeout @timeout end |
Instance Method Details
#api_url ⇒ Object
20 21 22 |
# File 'lib/cbs/client.rb', line 20 def api_url "http://api.cbssports.com/fantasy/" end |