Home Reference Source
import TournamentEndpoint from 'kayn/lib/Endpoints/TournamentEndpoint.js'
public class | source

TournamentEndpoint

Extends:

Endpoint~Endpoint → TournamentEndpoint

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

config: *

public

create: *

public

get: *

public

limiter: *

public
public

update: *

Method Summary

Public Methods
public

createTournamentCode(tournamentID: number, body: object): *

Create a tournament code for the given tournament.

public

getTournamentByCode(tournamentCode: string): *

Returns the tournament code DTO associated with a tournament code string.

public

lobbyEvents(tournamentCode: string): *

Gets a list of lobby events by tournament code.

public

register(providerID: number, name: string): *

Creates a tournament and returns its ID.

public

registerProviderData(region: string, url: url): *

Creates a tournament provider and return its ID.

public

updateTournamentCode(tournamentCode: string, body: object): *

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

Public Constructors

public constructor() source

Public Members

public config: * source

public create: * source

public get: * source

public limiter: * source

public serviceName: string source

public update: * source

Public Methods

public createTournamentCode(tournamentID: number, body: object): * source

Create a tournament code for the given tournament.

Implements POST /lol/tournament/v3/codes.

Params:

NameTypeAttributeDescription
tournamentID number

The ID of the tournament from /lol/tournament/v3/tournaments.

body object

The optional POST body to pass in. See official docs.

Return:

*

public getTournamentByCode(tournamentCode: string): * source

Returns the tournament code DTO associated with a tournament code string.

Implements GET /lol/tournament/v3/codes/{tournamentCode}.

Params:

NameTypeAttributeDescription
tournamentCode string

The code of the tournament.

Return:

*

public lobbyEvents(tournamentCode: string): * source

Gets a list of lobby events by tournament code.

Implements GET /lol/tournament/v3/lobby-events/by-code/{tournamentCode}.

Params:

NameTypeAttributeDescription
tournamentCode string

The short code to look up lobby events for.

Return:

*

public register(providerID: number, name: string): * source

Creates a tournament and returns its ID.

Implements POST /lol/tournament/v3/tournaments.

Params:

NameTypeAttributeDescription
providerID number

The ID of the provider from /lol/tournament/v3/providers.

name string

An optional name to pass in. It'll only be used if the length is > 0.

Return:

*

public registerProviderData(region: string, url: url): * source

Creates a tournament provider and return its ID.

Implements POST /lol/tournament/v3/providers.

Params:

NameTypeAttributeDescription
region string

A region string ('na'/'euw'). Just use kayn's REGIONS dictionary.

url url

The provider's callback URL to which tournament game results in this region should be posted. See official docs.

Return:

*

public updateTournamentCode(tournamentCode: string, body: object): * source

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

Implements PUT /lol/tournament/v3/codes/{tournamentCode}.

Params:

NameTypeAttributeDescription
tournamentCode string

The code of the tournament to update.

body object

The update body. This shouldn't be empty (it would be pointless).

Return:

*