Module: CBS::Client::Players

Included in:
CBS::Client
Defined in:
lib/cbs/client/players.rb

Instance Method Summary collapse

Instance Method Details

#player_search(name, opts = {}, team_name: nil) ⇒ Object



16
17
18
19
20
21
# File 'lib/cbs/client/players.rb', line 16

def player_search(name, opts={}, team_name: nil)
  opts.merge!(name: name)
  opts.merge!(team_name: team_name) if team_name

  get('players/search', opts).body.players
end

#players(opts = {}) ⇒ Object



5
6
7
# File 'lib/cbs/client/players.rb', line 5

def players(opts={})
  get('players/list', opts).body.players
end

#profile(player_id, opts = {}) ⇒ Object



9
10
11
12
13
14
# File 'lib/cbs/client/players.rb', line 9

def profile(player_id, opts={})
  opts.merge!(player_id: player_id)


  get('players/profile', opts).body.player_profile.player
end