C# Class RiotSharp.TournamentRiotApi

Entry point for the tournament API.
Inheritance: ITournamentRiotApi
Mostra file Open project: BenFradet/RiotSharp Class Usage Examples

Public Methods

Method 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

Method 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 method

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). ///
return RiotSharp.TournamentEndpoint.TournamentProvider

CreateProviderAsync() public method

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). ///
return Task

CreateTournament() public method

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.
return RiotSharp.TournamentEndpoint.Tournament

CreateTournamentAsync() public method

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.
return Task

CreateTournamentCode() public method

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. ///
return string

CreateTournamentCodeAsync() public method

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. ///
return Task

CreateTournamentCodes() public method

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).
return List

CreateTournamentCodesAsync() public method

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).
return Task>

GetInstance() public static method

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.
return TournamentRiotApi

GetTournamentCodeDetails() public method

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

GetTournamentCodeDetailsAsync() public method

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

GetTournamentLobbyEvents() public method

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

GetTournamentLobbyEventsAsync() public method

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

GetTournamentMatch() public method

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.
return RiotSharp.MatchEndpoint.MatchDetail

GetTournamentMatchAsync() public method

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.
return Task

GetTournamentMatchId() public method

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.
return long

GetTournamentMatchIdAsync() public method

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.
return Task

UpdateTournamentCode() public method

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.
return bool

UpdateTournamentCodeAsync() public method

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.
return Task