Struct toornament::Toornament
[−]
[src]
pub struct Toornament { /* fields omitted */ }
Main structure. Should be your point of start using the service.
This struct covers all the toornament
API.
Methods
impl Toornament
[src]
fn with_application<S: Into<String>>(
api_token: S,
client_id: S,
client_secret: S
) -> Result<Toornament>
api_token: S,
client_id: S,
client_secret: S
) -> Result<Toornament>
Creates new Toornament
object with client credentials
which is your user API_Token, application's client id and secret.
You may obtain application's credentials here (You must be logged in to open the page).
This method connects to the toornament service and if there is a error it returns the Error
object and on success it returns Toornament
object.
fn disciplines(&self, id: Option<DisciplineId>) -> Result<Disciplines>
Returns either a collection of disciplines if id is None or a disciplines with the detail of his features
fn tournaments(
&self,
id: Option<TournamentId>,
with_streams: bool
) -> Result<Tournaments>
&self,
id: Option<TournamentId>,
with_streams: bool
) -> Result<Tournaments>
Returns a collection of public tournaments filtered and sorted by the given query parameters. A maximum of 20 tournaments will be returned. Only public tournaments are visible. if id is None or a detailed information about one tournament. The tournament must be public.
fn edit_tournament(&self, tournament: Tournament) -> Result<Tournament>
Updates some of the editable information on a tournament. if tournament.id
is set otherwise creates a tournament.
fn delete_tournament(&self, id: TournamentId) -> Result<()>
fn my_tournaments(&self) -> Result<Tournaments>
fn matches(
&self,
id: TournamentId,
match_id: Option<MatchId>,
with_games: bool
) -> Result<Matches>
&self,
id: TournamentId,
match_id: Option<MatchId>,
with_games: bool
) -> Result<Matches>
fn matches_by_discipline(
&self,
id: DisciplineId,
filter: Option<MatchFilter>
) -> Result<Matches>
&self,
id: DisciplineId,
filter: Option<MatchFilter>
) -> Result<Matches>
fn update_match(
&self,
id: TournamentId,
match_id: MatchId,
updated_match: Match
) -> Result<Match>
&self,
id: TournamentId,
match_id: MatchId,
updated_match: Match
) -> Result<Match>
fn match_result(
&self,
id: TournamentId,
match_id: MatchId
) -> Result<MatchResult>
&self,
id: TournamentId,
match_id: MatchId
) -> Result<MatchResult>
fn set_match_result(
&self,
id: TournamentId,
match_id: MatchId,
result: MatchResult
) -> Result<MatchResult>
&self,
id: TournamentId,
match_id: MatchId,
result: MatchResult
) -> Result<MatchResult>
fn match_games(
&self,
id: TournamentId,
match_id: MatchId,
with_stats: bool
) -> Result<Games>
&self,
id: TournamentId,
match_id: MatchId,
with_stats: bool
) -> Result<Games>
fn match_game(
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber,
with_stats: bool
) -> Result<Game>
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber,
with_stats: bool
) -> Result<Game>
fn update_match_game(
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber,
game: Game
) -> Result<Game>
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber,
game: Game
) -> Result<Game>
fn match_game_result(
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber
) -> Result<MatchResult>
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber
) -> Result<MatchResult>
fn update_match_game_result(
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber,
result: MatchResult,
update_match: bool
) -> Result<MatchResult>
&self,
id: TournamentId,
match_id: MatchId,
game_number: GameNumber,
result: MatchResult,
update_match: bool
) -> Result<MatchResult>
fn tournament_participants(
&self,
id: TournamentId,
filter: TournamentParticipantsFilter
) -> Result<Participants>
&self,
id: TournamentId,
filter: TournamentParticipantsFilter
) -> Result<Participants>
fn create_tournament_participant(
&self,
id: TournamentId,
participant: Participant
) -> Result<Participant>
&self,
id: TournamentId,
participant: Participant
) -> Result<Participant>
fn update_tournament_participants(
&self,
id: TournamentId,
participants: Participants
) -> Result<Participants>
&self,
id: TournamentId,
participants: Participants
) -> Result<Participants>
fn get_tournament_participant(
&self,
id: TournamentId,
participant_id: ParticipantId
) -> Result<Participant>
&self,
id: TournamentId,
participant_id: ParticipantId
) -> Result<Participant>
fn update_tournament_participant(
&self,
id: TournamentId,
participant_id: ParticipantId,
participant: Participant
) -> Result<Participant>
&self,
id: TournamentId,
participant_id: ParticipantId,
participant: Participant
) -> Result<Participant>
fn delete_tournament_participant(
&self,
id: TournamentId,
participant_id: ParticipantId
) -> Result<()>
&self,
id: TournamentId,
participant_id: ParticipantId
) -> Result<()>
fn tournament_permissions(&self, id: TournamentId) -> Result<Permissions>
fn create_tournament_permission(
&self,
id: TournamentId,
permission: Permission
) -> Result<Permission>
&self,
id: TournamentId,
permission: Permission
) -> Result<Permission>
fn tournament_permission(
&self,
id: TournamentId,
permission_id: PermissionId
) -> Result<Permission>
&self,
id: TournamentId,
permission_id: PermissionId
) -> Result<Permission>
fn update_tournament_permission_attributes(
&self,
id: TournamentId,
permission_id: PermissionId,
attributes: PermissionAttributes
) -> Result<Permission>
&self,
id: TournamentId,
permission_id: PermissionId,
attributes: PermissionAttributes
) -> Result<Permission>
fn delete_tournament_permission(
&self,
id: TournamentId,
permission_id: PermissionId
) -> Result<()>
&self,
id: TournamentId,
permission_id: PermissionId
) -> Result<()>
fn tournament_stages(&self, id: TournamentId) -> Result<Stages>
fn tournament_videos(
&self,
id: TournamentId,
filter: TournamentVideosFilter
) -> Result<Videos>
&self,
id: TournamentId,
filter: TournamentVideosFilter
) -> Result<Videos>