Match class


A representation of a league of legends match.

Signature:

export declare class Match 

Constructor

new Match (client: Client, data: MatchData, champions: Collection<string, Champion>, items: Collection<string, Item>, runeTrees: Collection<string, RuneTree>, summonerSpells: Collection<string, SummonerSpell>)

Constructs a new instance of the Match class.

Parameters:

ParameterTypeDescription
clientClientThe client requesting the data.
dataMatchDataThe raw match data from the API.
championsCollection < String, Champion >The champions involved in the match.
itemsCollection < String, Item >The items used in the match.
runeTreesCollection < String, RuneTree >The rune trees in the game.
summonerSpellsCollection < String, SummonerSpell >The summoner spells in the game.

Properties

createdTimestamp

The timestamp of creation of the match (before summoners spawn on the rift).

Type: Number


duration

The duration of the match (in seconds).

Type: Number


endTimestamp

The timestamp of the end of the match.

Type: Number


gameId

The ID of the game.

Type: Number


gameMode

The game mode for the match.

Type: GameMode


gameName

The name of the match.

Type: String


gameType

The type of game.

Type: GameType


gameVersion

The version of the game.

Type: String


id

The match ID.

Type: String


map

The map on which the match was played.

Type: GameMap


queue

The queue type of the match.

Type: Queue


region

The region in which the match was played.

Eg: NA or EUW.

Type: Region


startTimestamp

The timestamp of the beginning of the match (when summoners spawn on the rift).

Type: Number


teams

The 2 teams participating in the match.

They are mapped by their map sides (blue and red).

Type: Collection < 'blue' | 'red', Team >


tournamentCode

The tournament code of the match (if it is the part of a tournament).

Type: String


version

The data version of the match.

Type: String


Methods

.fetchTimeline ()

Fetch the timeline of the match.

Signature:

fetchTimeline(): Promise<MatchTimeline>;

Return type: Promise < MatchTimeline >