Class: CBS::Client

Inherits:
Object
  • Object
show all
Includes:
Players, Teams, Request
Defined in:
lib/cbs/client.rb,
lib/cbs/client/teams.rb,
lib/cbs/client/players.rb

Defined Under Namespace

Modules: Players, Teams

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Teams

#teams

Methods included from Players

#player_search, #players, #profile

Methods included from Request

#get

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={})
  options = CBS.options.merge(opts)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Attribute Details

#open_timeoutObject

Returns the value of attribute open_timeout.



10
11
12
# File 'lib/cbs/client.rb', line 10

def open_timeout
  @open_timeout
end

#sportObject

Returns the value of attribute sport.



11
12
13
# File 'lib/cbs/client.rb', line 11

def sport
  @sport
end

#timeoutObject

Returns the value of attribute timeout.



9
10
11
# File 'lib/cbs/client.rb', line 9

def timeout
  @timeout
end

Instance Method Details

#api_urlObject



20
21
22
# File 'lib/cbs/client.rb', line 20

def api_url
  "http://api.cbssports.com/fantasy/"
end