Show / Hide Table of Contents

Class TournamentRiotApi

Entry point for the tournament API.

Inheritance
System.Object
TournamentRiotApi
Namespace:RiotSharp
Assembly:RiotSharp.dll
Syntax
public class TournamentRiotApi : object, ITournamentRiotApi

Methods

CreateProvider(Region, String)

Creates a tournament provider and returns its ID.

Declaration
public TournamentProvider CreateProvider(Region region, string url)
Parameters
Type Name Description
Region region

The region in which the provider will be running tournaments.

System.String url

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

Returns
Type Description
TournamentProvider

The ID of the provider.

Implements
ITournamentRiotApi.CreateProvider(Region, String)

CreateProviderAsync(Region, String)

Creates a tournament provider and returns its object.

Declaration
public Task<TournamentProvider> CreateProviderAsync(Region region, string url)
Parameters
Type Name Description
Region region

The region in which the provider will be running tournaments.

System.String url

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

Returns
Type Description
Task<><TournamentProvider>

The ID of the provider.

Implements
ITournamentRiotApi.CreateProviderAsync(Region, String)

CreateTournament(Int32, String)

Creates a tournament and returns its object.

Declaration
public Tournament CreateTournament(int providerId, string name)
Parameters
Type Name Description
System.Int32 providerId

The provider ID to specify the regional registered provider data to associate this tournament.

System.String name

The optional name of the tournament.

Returns
Type Description
Tournament

The ID of the tournament.

Implements
ITournamentRiotApi.CreateTournament(Int32, String)

CreateTournamentAsync(Int32, String)

Creates a tournament and returns its object.

Declaration
public Task<Tournament> CreateTournamentAsync(int providerId, string name)
Parameters
Type Name Description
System.Int32 providerId

The provider ID to specify the regional registered provider data to associate this tournament.

System.String name

The optional name of the tournament.

Returns
Type Description
Task<><Tournament>

The ID of the tournament.

Implements
ITournamentRiotApi.CreateTournamentAsync(Int32, String)

CreateTournamentCode(Int32, Int32, List<Int64>, TournamentSpectatorType, TournamentPickType, TournamentMapType, String)

Create a tournament code for the given tournament id.

Declaration
public string CreateTournamentCode(int tournamentId, int teamSize, List<long> allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata)
Parameters
Type Name Description
System.Int32 tournamentId

The tournament ID

System.Int32 teamSize

The team size of the game. Valid values are 1-5.

List<><System.Int64> allowedSummonerIds

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.

TournamentSpectatorType spectatorType

The spectator type of the game.

TournamentPickType pickType

The pick type of the game.

TournamentMapType mapType

The map type of the game.

System.String metadata

Optional string that may contain any data in any format, if specified at all. Used to denote any custom information about the game.

Returns
Type Description
System.String

The tournament code in string format.

Implements
ITournamentRiotApi.CreateTournamentCode(Int32, Int32, List<Int64>, TournamentSpectatorType, TournamentPickType, TournamentMapType, String)

CreateTournamentCodeAsync(Int32, Int32, List<Int64>, TournamentSpectatorType, TournamentPickType, TournamentMapType, String)

Create a tournament code for the given tournament id.

Declaration
public Task<string> CreateTournamentCodeAsync(int tournamentId, int teamSize, List<long> allowedSummonerIds, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata)
Parameters
Type Name Description
System.Int32 tournamentId

The tournament ID

System.Int32 teamSize

The team size of the game. Valid values are 1-5.

List<><System.Int64> allowedSummonerIds

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.

TournamentSpectatorType spectatorType

The spectator type of the game.

TournamentPickType pickType

The pick type of the game.

TournamentMapType mapType

The map type of the game.

System.String metadata

Optional string that may contain any data in any format, if specified at all. Used to denote any custom information about the game.

Returns
Type Description
Task<><System.String>

The tournament code in string format.

Implements
ITournamentRiotApi.CreateTournamentCodeAsync(Int32, Int32, List<Int64>, TournamentSpectatorType, TournamentPickType, TournamentMapType, String)

CreateTournamentCodes(Int32, Int32, TournamentSpectatorType, TournamentPickType, TournamentMapType, String, Int32)

Create multiple tournament codes for the given tournament id.

Declaration
public List<string> CreateTournamentCodes(int tournamentId, int teamSize, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata, int count = 1)
Parameters
Type Name Description
System.Int32 tournamentId

The tournament ID

System.Int32 teamSize

The team size of the game. Valid values are 1-5.

TournamentSpectatorType spectatorType

The spectator type of the game.

TournamentPickType pickType

The pick type of the game.

TournamentMapType mapType

The map type of the game.

System.String metadata

Optional string that may contain any data in any format, if specified at all. Used to denote any custom information about the game.

System.Int32 count

The number of codes to create (max 1000).

Returns
Type Description
List<><System.String>

A list of tournament codes in string format.

Implements
ITournamentRiotApi.CreateTournamentCodes(Int32, Int32, TournamentSpectatorType, TournamentPickType, TournamentMapType, String, Int32)

CreateTournamentCodesAsync(Int32, Int32, TournamentSpectatorType, TournamentPickType, TournamentMapType, String, Int32)

Create multiple tournament codes for the given tournament id.

Declaration
public Task<List<string>> CreateTournamentCodesAsync(int tournamentId, int teamSize, TournamentSpectatorType spectatorType, TournamentPickType pickType, TournamentMapType mapType, string metadata, int count = 1)
Parameters
Type Name Description
System.Int32 tournamentId

The tournament ID

System.Int32 teamSize

The team size of the game. Valid values are 1-5.

TournamentSpectatorType spectatorType

The spectator type of the game.

TournamentPickType pickType

The pick type of the game.

TournamentMapType mapType

The map type of the game.

System.String metadata

Optional string that may contain any data in any format, if specified at all. Used to denote any custom information about the game.

System.Int32 count

The number of codes to create (max 1000).

Returns
Type Description
Task<><List<><System.String>>

A list of tournament codes in string format.

Implements
ITournamentRiotApi.CreateTournamentCodesAsync(Int32, Int32, TournamentSpectatorType, TournamentPickType, TournamentMapType, String, Int32)

GetInstance(String, Int32, Int32)

Get the instance of RiotApi.

Declaration
public static TournamentRiotApi GetInstance(string apiKey, int rateLimitPer10s = 10, int rateLimitPer10m = 500)
Parameters
Type Name Description
System.String apiKey

The api key.

System.Int32 rateLimitPer10s

The 10 seconds rate limit for your production api key.

System.Int32 rateLimitPer10m

The 10 minutes rate limit for your production api key.

Returns
Type Description
TournamentRiotApi

The instance of RiotApi.

GetTournamentCodeDetails(String)

Returns the details of a certain tournament code.

Declaration
public TournamentCodeDetail GetTournamentCodeDetails(string tournamentCode)
Parameters
Type Name Description
System.String tournamentCode

The tournament code in string format.

Returns
Type Description
TournamentCodeDetail

TournamentCodeDetail object with details of the tournament code.

Implements
ITournamentRiotApi.GetTournamentCodeDetails(String)

GetTournamentCodeDetailsAsync(String)

Returns the details of a certain tournament code.

Declaration
public Task<TournamentCodeDetail> GetTournamentCodeDetailsAsync(string tournamentCode)
Parameters
Type Name Description
System.String tournamentCode

The tournament code in string format.

Returns
Type Description
Task<><TournamentCodeDetail>

TournamentCodeDetail object with details of the tournament code.

Implements
ITournamentRiotApi.GetTournamentCodeDetailsAsync(String)

GetTournamentLobbyEvents(String)

Gets a list of lobby events by tournament code.

Declaration
public List<TournamentLobbyEvent> GetTournamentLobbyEvents(string tournamentCode)
Parameters
Type Name Description
System.String tournamentCode

A tournament code in string format.

Returns
Type Description
List<><TournamentLobbyEvent>

List of TournamentLobbyEvents.

Implements
ITournamentRiotApi.GetTournamentLobbyEvents(String)

GetTournamentLobbyEventsAsync(String)

Gets a list of lobby events by tournament code.

Declaration
public Task<List<TournamentLobbyEvent>> GetTournamentLobbyEventsAsync(string tournamentCode)
Parameters
Type Name Description
System.String tournamentCode

A tournament code in string format.

Returns
Type Description
Task<><List<><TournamentLobbyEvent>>

List of TournamentLobbyEvents.

Implements
ITournamentRiotApi.GetTournamentLobbyEventsAsync(String)

GetTournamentMatch(Region, Int64, String, Boolean)

Retrieve match by match ID and tournament code.

Declaration
public MatchDetail GetTournamentMatch(Region region, long matchId, string tournamentCode, bool includeTimeline)
Parameters
Type Name Description
Region region

The region of the match.

System.Int64 matchId

The ID of the match.

System.String tournamentCode

The tournament code of the match.

System.Boolean includeTimeline

Flag indicating whether or not to include match timeline data.

Returns
Type Description
MatchDetail

MatchDetail object.

Implements
ITournamentRiotApi.GetTournamentMatch(Region, Int64, String, Boolean)

GetTournamentMatchAsync(Region, Int64, String, Boolean)

Retrieve match by match ID and tournament code.

Declaration
public Task<MatchDetail> GetTournamentMatchAsync(Region region, long matchId, string tournamentCode, bool includeTimeline)
Parameters
Type Name Description
Region region

The region of the match.

System.Int64 matchId

The ID of the match.

System.String tournamentCode

The tournament code of the match.

System.Boolean includeTimeline

Flag indicating whether or not to include match timeline data.

Returns
Type Description
Task<><MatchDetail>

MatchDetail object.

Implements
ITournamentRiotApi.GetTournamentMatchAsync(Region, Int64, String, Boolean)

GetTournamentMatchId(Region, String)

Retrieve match IDs by tournament code.

Declaration
public long GetTournamentMatchId(Region region, string tournamentCode)
Parameters
Type Name Description
Region region

The region of the match.

System.String tournamentCode

The tournament code of the match.

Returns
Type Description
System.Int64

The match id of the match played with the tournament code entered.

Implements
ITournamentRiotApi.GetTournamentMatchId(Region, String)

GetTournamentMatchIdAsync(Region, String)

Retrieve match IDs by tournament code.

Declaration
public Task<long> GetTournamentMatchIdAsync(Region region, string tournamentCode)
Parameters
Type Name Description
Region region

The region of the match.

System.String tournamentCode

The tournament code of the match.

Returns
Type Description
Task<><System.Int64>

The match id of the match played with the tournament code entered.

Implements
ITournamentRiotApi.GetTournamentMatchIdAsync(Region, String)

UpdateTournamentCode(String, List<Int64>, Nullable<TournamentSpectatorType>, Nullable<TournamentPickType>, Nullable<TournamentMapType>)

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

Declaration
public bool UpdateTournamentCode(string tournamentCode, List<long> allowedSummonerIds, TournamentSpectatorType? spectatorType, TournamentPickType? pickType, TournamentMapType? mapType)
Parameters
Type Name Description
System.String tournamentCode

The tournament code to update

List<><System.Int64> allowedSummonerIds

List of summoner id's.

System.Nullable<><TournamentSpectatorType> spectatorType

The spectator type.

System.Nullable<><TournamentPickType> pickType

The pick type.

System.Nullable<><TournamentMapType> mapType

The map type.

Returns
Type Description
System.Boolean

Success value.

Implements
ITournamentRiotApi.UpdateTournamentCode(String, List<Int64>, Nullable<TournamentSpectatorType>, Nullable<TournamentPickType>, Nullable<TournamentMapType>)

UpdateTournamentCodeAsync(String, List<Int64>, Nullable<TournamentSpectatorType>, Nullable<TournamentPickType>, Nullable<TournamentMapType>)

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

Declaration
public Task<bool> UpdateTournamentCodeAsync(string tournamentCode, List<long> allowedSummonerIds, TournamentSpectatorType? spectatorType, TournamentPickType? pickType, TournamentMapType? mapType)
Parameters
Type Name Description
System.String tournamentCode

The tournament code to update

List<><System.Int64> allowedSummonerIds

List of summoner id's.

System.Nullable<><TournamentSpectatorType> spectatorType

The spectator type.

System.Nullable<><TournamentPickType> pickType

The pick type.

System.Nullable<><TournamentMapType> mapType

The map type.

Returns
Type Description
Task<><System.Boolean>

Success value.

Implements
ITournamentRiotApi.UpdateTournamentCodeAsync(String, List<Int64>, Nullable<TournamentSpectatorType>, Nullable<TournamentPickType>, Nullable<TournamentMapType>)
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX