C# Class RiotSharp.TournamentRiotApi

Entry point for the tournament API.
Inheritance: ITournamentRiotApi
Afficher le fichier Open project: BenFradet/RiotSharp Class Usage Examples

Méthodes publiques

Méthode Description
CreateProvider ( Region region, string url ) : RiotSharp.TournamentEndpoint.TournamentProvider

Creates a tournament provider and returns its ID.

CreateProviderAsync ( Region region, string url ) : Task

Creates a tournament provider and returns its object.

CreateTournament ( int providerId, string name ) : Tournament

Creates a tournament and returns its object.

CreateTournamentAsync ( int providerId, string name ) : Task

Creates a tournament and returns its object.

CreateTournamentCode ( int tournamentId, int teamSize, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata ) : string

Create a tournament code for the given tournament id.

CreateTournamentCodeAsync ( int tournamentId, int teamSize, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata ) : Task

Create a tournament code for the given tournament id.

CreateTournamentCodes ( int tournamentId, int teamSize, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata, int count = 1 ) : List

Create multiple tournament codes for the given tournament id.

CreateTournamentCodesAsync ( int tournamentId, int teamSize, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata, int count = 1 ) : Task>

Create multiple tournament codes for the given tournament id.

GetInstance ( string apiKey, int rateLimitPer10s = 10, int rateLimitPer10m = 500 ) : TournamentRiotApi

Get the instance of RiotApi.

GetTournamentCodeDetails ( string tournamentCode ) : TournamentCodeDetail

Returns the details of a certain tournament code.

GetTournamentCodeDetailsAsync ( string tournamentCode ) : Task

Returns the details of a certain tournament code.

GetTournamentLobbyEvents ( string tournamentCode ) : List

Gets a list of lobby events by tournament code.

GetTournamentLobbyEventsAsync ( string tournamentCode ) : Task>

Gets a list of lobby events by tournament code.

GetTournamentMatch ( Region region, long matchId, string tournamentCode, bool includeTimeline ) : RiotSharp.MatchEndpoint.MatchDetail

Retrieve match by match ID and tournament code.

GetTournamentMatchAsync ( Region region, long matchId, string tournamentCode, bool includeTimeline ) : Task

Retrieve match by match ID and tournament code.

GetTournamentMatchId ( Region region, string tournamentCode ) : long

Retrieve match IDs by tournament code.

GetTournamentMatchIdAsync ( Region region, string tournamentCode ) : Task

Retrieve match IDs by tournament code.

UpdateTournamentCode ( string tournamentCode, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType ) : bool

Update the pick type, map, spectator type, or allowed summoners for a code.

UpdateTournamentCodeAsync ( string tournamentCode, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType ) : Task

Update the pick type, map, spectator type, or allowed summoners for a code.

Private Methods

Méthode Description
BuildTournamentUpdateBody ( List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType ) : object>.Dictionary
GetInstance ( ) : TournamentRiotApi
TournamentRiotApi ( string apiKey, int rateLimitPer10s, int rateLimitPer10m ) : Newtonsoft.Json

Method Details

CreateProvider() public méthode

Creates a tournament provider and returns its ID.
public CreateProvider ( Region region, string url ) : RiotSharp.TournamentEndpoint.TournamentProvider
region Region The region in which the provider will be running tournaments.
url string /// The provider's callback URL to which tournament game results in this region should be posted. The URL /// must be well-formed, use the http or https protocol, and use the default port for the protocol (http URLs must use /// port 80, https URLs must use port 443). ///
Résultat RiotSharp.TournamentEndpoint.TournamentProvider

CreateProviderAsync() public méthode

Creates a tournament provider and returns its object.
public CreateProviderAsync ( Region region, string url ) : Task
region Region The region in which the provider will be running tournaments.
url string /// The provider's callback URL to which tournament game results in this region should be posted. The URL /// must be well-formed, use the http or https protocol, and use the default port for the protocol (http URLs must use /// port 80, https URLs must use port 443). ///
Résultat Task

CreateTournament() public méthode

Creates a tournament and returns its object.
public CreateTournament ( int providerId, string name ) : Tournament
providerId int The provider ID to specify the regional registered provider data to associate this tournament.
name string The optional name of the tournament.
Résultat RiotSharp.TournamentEndpoint.Tournament

CreateTournamentAsync() public méthode

Creates a tournament and returns its object.
public CreateTournamentAsync ( int providerId, string name ) : Task
providerId int The provider ID to specify the regional registered provider data to associate this tournament.
name string The optional name of the tournament.
Résultat Task

CreateTournamentCode() public méthode

Create a tournament code for the given tournament id.
public CreateTournamentCode ( int tournamentId, int teamSize, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata ) : string
tournamentId int The tournament ID
teamSize int The team size of the game. Valid values are 1-5.
allowedSummonerIds List /// Optional list of participants in order to validate the players eligible to join the /// lobby. NOTE: We currently do not enforce participants at the team level, but rather the aggregate of teamOne and /// teamTwo. We may add the ability to enforce at the team level in the future. ///
spectatorType TournamentSpectatorType The spectator type of the game.
pickType TournamentPickType The pick type of the game.
mapType TournamentMapType The map type of the game.
metadata string /// Optional string that may contain any data in any format, if specified at all. Used to denote any /// custom information about the game. ///
Résultat string

CreateTournamentCodeAsync() public méthode

Create a tournament code for the given tournament id.
public CreateTournamentCodeAsync ( int tournamentId, int teamSize, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata ) : Task
tournamentId int The tournament ID
teamSize int The team size of the game. Valid values are 1-5.
allowedSummonerIds List /// Optional list of participants in order to validate the players eligible to join the /// lobby. NOTE: We currently do not enforce participants at the team level, but rather the aggregate of teamOne and /// teamTwo. We may add the ability to enforce at the team level in the future. ///
spectatorType TournamentSpectatorType The spectator type of the game.
pickType TournamentPickType The pick type of the game.
mapType TournamentMapType The map type of the game.
metadata string /// Optional string that may contain any data in any format, if specified at all. Used to denote any /// custom information about the game. ///
Résultat Task

CreateTournamentCodes() public méthode

Create multiple tournament codes for the given tournament id.
public CreateTournamentCodes ( int tournamentId, int teamSize, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata, int count = 1 ) : List
tournamentId int The tournament ID
teamSize int The team size of the game. Valid values are 1-5.
spectatorType TournamentSpectatorType The spectator type of the game.
pickType TournamentPickType The pick type of the game.
mapType TournamentMapType The map type of the game.
metadata string /// Optional string that may contain any data in any format, if specified at all. Used to denote any /// custom information about the game. ///
count int The number of codes to create (max 1000).
Résultat List

CreateTournamentCodesAsync() public méthode

Create multiple tournament codes for the given tournament id.
public CreateTournamentCodesAsync ( int tournamentId, int teamSize, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata, int count = 1 ) : Task>
tournamentId int The tournament ID
teamSize int The team size of the game. Valid values are 1-5.
spectatorType TournamentSpectatorType The spectator type of the game.
pickType TournamentPickType The pick type of the game.
mapType TournamentMapType The map type of the game.
metadata string /// Optional string that may contain any data in any format, if specified at all. Used to denote any /// custom information about the game. ///
count int The number of codes to create (max 1000).
Résultat Task>

GetInstance() public static méthode

Get the instance of RiotApi.
public static GetInstance ( string apiKey, int rateLimitPer10s = 10, int rateLimitPer10m = 500 ) : TournamentRiotApi
apiKey string The api key.
rateLimitPer10s int The 10 seconds rate limit for your production api key.
rateLimitPer10m int The 10 minutes rate limit for your production api key.
Résultat TournamentRiotApi

GetTournamentCodeDetails() public méthode

Returns the details of a certain tournament code.
public GetTournamentCodeDetails ( string tournamentCode ) : TournamentCodeDetail
tournamentCode string The tournament code in string format.
Résultat RiotSharp.TournamentEndpoint.TournamentCodeDetail

GetTournamentCodeDetailsAsync() public méthode

Returns the details of a certain tournament code.
public GetTournamentCodeDetailsAsync ( string tournamentCode ) : Task
tournamentCode string The tournament code in string format.
Résultat Task

GetTournamentLobbyEvents() public méthode

Gets a list of lobby events by tournament code.
public GetTournamentLobbyEvents ( string tournamentCode ) : List
tournamentCode string A tournament code in string format.
Résultat List

GetTournamentLobbyEventsAsync() public méthode

Gets a list of lobby events by tournament code.
public GetTournamentLobbyEventsAsync ( string tournamentCode ) : Task>
tournamentCode string A tournament code in string format.
Résultat Task>

GetTournamentMatch() public méthode

Retrieve match by match ID and tournament code.
public GetTournamentMatch ( Region region, long matchId, string tournamentCode, bool includeTimeline ) : RiotSharp.MatchEndpoint.MatchDetail
region Region The region of the match.
matchId long The ID of the match.
tournamentCode string The tournament code of the match.
includeTimeline bool Flag indicating whether or not to include match timeline data.
Résultat RiotSharp.MatchEndpoint.MatchDetail

GetTournamentMatchAsync() public méthode

Retrieve match by match ID and tournament code.
public GetTournamentMatchAsync ( Region region, long matchId, string tournamentCode, bool includeTimeline ) : Task
region Region The region of the match.
matchId long The ID of the match.
tournamentCode string The tournament code of the match.
includeTimeline bool Flag indicating whether or not to include match timeline data.
Résultat Task

GetTournamentMatchId() public méthode

Retrieve match IDs by tournament code.
public GetTournamentMatchId ( Region region, string tournamentCode ) : long
region Region The region of the match.
tournamentCode string The tournament code of the match.
Résultat long

GetTournamentMatchIdAsync() public méthode

Retrieve match IDs by tournament code.
public GetTournamentMatchIdAsync ( Region region, string tournamentCode ) : Task
region Region The region of the match.
tournamentCode string The tournament code of the match.
Résultat Task

UpdateTournamentCode() public méthode

Update the pick type, map, spectator type, or allowed summoners for a code.
public UpdateTournamentCode ( string tournamentCode, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType ) : bool
tournamentCode string The tournament code to update
allowedSummonerIds List List of summoner id's.
spectatorType TournamentSpectatorType The spectator type.
pickType TournamentPickType The pick type.
mapType TournamentMapType The map type.
Résultat bool

UpdateTournamentCodeAsync() public méthode

Update the pick type, map, spectator type, or allowed summoners for a code.
public UpdateTournamentCodeAsync ( string tournamentCode, List allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType ) : Task
tournamentCode string The tournament code to update
allowedSummonerIds List List of summoner id's.
spectatorType TournamentSpectatorType The spectator type.
pickType TournamentPickType The pick type.
mapType TournamentMapType The map type.
Résultat Task