class ChgkRating::Models::Tournament
Public Instance Methods
Returns information about a single TournamentTeam
in the current tournament
@raise [ChgkRating::Error::NotFound] Error
raised when the requested Team
cannot be found. @return [ChgkRating::Models::TournamentTeam] The requested TournamentTeam
. @param team_or_id [String, Integer or Team] Team
to search for.
# File lib/chgk_rating/models/tournament.rb, line 35 def team(team_or_id) ChgkRating::Models::TournamentTeam.new team_or_id, tournament: self, lazy: true end
Returns an array-like TournamentTeams collection specifying which teams participated in the current tournament
@return [ChgkRating::Collection::Ratings] The collection of teams.
# File lib/chgk_rating/models/tournament.rb, line 26 def team_list ChgkRating::Collections::TournamentTeams.new tournament: self end
Returns an array-like TournamentPlayers collection containing roster for a team at the current tournament.
@raise [ChgkRating::Error::NotFound] Error
raised when the requested Team
cannot be found. @return [ChgkRating::Collection::TournamentPlayers] The collection of results. @param team_or_id [String, Integer or ChgkRating::Models::Team] Team
to load players for.
# File lib/chgk_rating/models/tournament.rb, line 9 def team_players(team_or_id) ChgkRating::Collections::TournamentPlayers.new tournament: self, team: team_or_id end
Returns an array-like TournamentTeamResults collection with results for a given team in the current tournament
@raise [ChgkRating::Error::NotFound] Error
raised when the requested Team
cannot be found. @return [ChgkRating::Collection::TournamentTeamResults] The collection of results. @param team_or_id [String, Integer or ChgkRating::Models::Team] Team
to load results for.
# File lib/chgk_rating/models/tournament.rb, line 19 def team_results(team_or_id) ChgkRating::Collections::TournamentTeamResults.new tournament: self, team: team_or_id end
Private Instance Methods
# File lib/chgk_rating/models/tournament.rb, line 41 def api_path 'tournaments' end