Class: Referee::Player
Class Method Summary collapse
-
.draftees(id) ⇒ Object
Returns a list of players the specified player drafted.
-
.followers(id) ⇒ Object
Returns a list of followers of the specified player.
-
.following(id) ⇒ Object
Returns a list of the players following the specified player.
-
.info(id) ⇒ Object
Returns the information for the specified player.
-
.likes(id) ⇒ Object
Returns a list of shots liked by the player.
-
.shots(id, options = {}) ⇒ Object
Returns most recent shots for the specified player.
-
.shots_from_following(id, options = {}) ⇒ Object
Returns most recent shots from the players the specified player is following.
Methods included from HTTParty::Icebox
Class Method Details
.draftees(id) ⇒ Object
Returns a list of players the specified player drafted. GET /players/:id/draftees
40 41 42 |
# File 'lib/referee/player.rb', line 40 def self.draftees(id) get('/players/' + id.to_s + '/draftees') end |
.followers(id) ⇒ Object
Returns a list of followers of the specified player. GET /players/:id/followers
28 29 30 |
# File 'lib/referee/player.rb', line 28 def self.followers(id) get('/players/' + id.to_s + '/followers') end |
.following(id) ⇒ Object
Returns a list of the players following the specified player. GET /players/:id/following
34 35 36 |
# File 'lib/referee/player.rb', line 34 def self.following(id) get('/players/' + id.to_s + '/following') end |
.info(id) ⇒ Object
Returns the information for the specified player. GET /players/:id
22 23 24 |
# File 'lib/referee/player.rb', line 22 def self.info(id) get('/players/' + id.to_s) end |
.likes(id) ⇒ Object
Returns a list of shots liked by the player. GET /players/:id/shots/likes
46 47 48 |
# File 'lib/referee/player.rb', line 46 def self.likes(id) get('/players/' + id.to_s + '/shots/likes') end |
.shots(id, options = {}) ⇒ Object
Returns most recent shots for the specified player. Supports pagination. GET /players/:id/shots
10 11 12 |
# File 'lib/referee/player.rb', line 10 def self.shots(id, ={}) get('/players/' + id.to_s + '/shots', :query => ) end |
.shots_from_following(id, options = {}) ⇒ Object
Returns most recent shots from the players the specified player is following. Supports pagination. GET /players/:id/shots/following
16 17 18 |
# File 'lib/referee/player.rb', line 16 def self.shots_from_following(id, ={}) get('/players/' + id.to_s + '/shots/following', :query => ) end |