Class: PlaylyfeClient::V2::Team
- Defined in:
- lib/playlyfe_client/v2/team.rb
Instance Attribute Summary collapse
-
#access ⇒ Object
readonly
Returns the value of attribute access.
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#game_id ⇒ Object
readonly
Returns the value of attribute game_id.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
Attributes inherited from Team
#connection, #created_at, #game, #id, #name
Instance Method Summary collapse
-
#events(start_time = nil, end_time = nil) ⇒ Object
results are cached if start_time is nil (events for last 24 hours), otherwise direct call to Playlyfe is made.
- #leaderboards ⇒ Object
- #members ⇒ Object
Methods inherited from Team
Instance Attribute Details
#access ⇒ Object (readonly)
Returns the value of attribute access.
7 8 9 |
# File 'lib/playlyfe_client/v2/team.rb', line 7 def access @access end |
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
7 8 9 |
# File 'lib/playlyfe_client/v2/team.rb', line 7 def definition @definition end |
#game_id ⇒ Object (readonly)
Returns the value of attribute game_id.
7 8 9 |
# File 'lib/playlyfe_client/v2/team.rb', line 7 def game_id @game_id end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
7 8 9 |
# File 'lib/playlyfe_client/v2/team.rb', line 7 def owner @owner end |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
7 8 9 |
# File 'lib/playlyfe_client/v2/team.rb', line 7 def roles @roles end |
Instance Method Details
#events(start_time = nil, end_time = nil) ⇒ Object
results are cached if start_time is nil (events for last 24 hours), otherwise direct call to Playlyfe is made
18 19 20 21 22 23 24 |
# File 'lib/playlyfe_client/v2/team.rb', line 18 def events(start_time=nil,end_time=nil) if start_time.nil? @events ||= PlaylyfeClient::V2::EventCollection.new(game, game.connection.get_team_events_array(self.id), self) else PlaylyfeClient::V2::EventCollection.new(game, game.connection.get_team_events_array(self.id,start_time, end_time), self) end end |
#leaderboards ⇒ Object
13 14 15 |
# File 'lib/playlyfe_client/v2/team.rb', line 13 def leaderboards @game.leaderboards.for_teams end |
#members ⇒ Object
9 10 11 |
# File 'lib/playlyfe_client/v2/team.rb', line 9 def members @members ||= fill_members end |