Skip to content

MATCH V3

Chau Nguyen edited this page Aug 7, 2017 · 8 revisions

docs

Note that this section has two different namespaces (Match and Matchlist).

Get match by match ID.

/lol/match/v3/matches/{matchId}

Standard Params

  • getMatchById(id, [options], [region], [cb])
  • Namespaced Functions: Match.by.id
k.Match.by.id(2392431795, KindredAPI.print)
k.Match.by.id(2392431795, { forAccountId: 2392431795 }, KindredAPI.print) 

Object Param + Callback

  • getMatch({ region, id/matchId (int), options (object) }, cb)
  • Namespaced Functions: Match.getMatch, Match.get
k.Match.get({ id: 2482174957 }, KindredAPI.print)
k.Match.get({
  id: 2478544123,
  options: {
    forAccountId: 31643150,
    forPlatformId: 'NA1'
  }
}).then(data => console.log(data))
  .catch(err => console.error(err))

Get matchlist for ranked games played on given account ID and platform ID and filtered using given filter parameters.

/lol/match/v3/matchlists/by-account/{accountId}

Standard Params

  • getMatchlistByAccountId(accId, [options], [region], [cb])
  • Namespaced Functions: Matchlist.by.account
k.Matchlist.by.account(47776491, KindredAPI.print)

const options = {
    queue: [QUEUES.TEAM_BUILDER_RANKED_SOLO, QUEUES.RANKED_FLEX_SR],
    champion: 79
}

k.Matchlist.by.account(47776491, options, KindredAPI.print)

k.Matchlist.by.account(47776491, REGIONS.NORTH_AMERICA)
           .then(data => console.log(data))
           .catch(error => console.error(error))

k.Matchlist.by.account(47776491, options, REGIONS.NORTH_AMERICA, KindredAPI.print)
  • getMatchlistById(id, [options], [region], [cb])
  • Namespaced Functions: Matchlist.by.id
k.Matchlist.by.id(32932398, KindredAPI.print)
  • getMatchlistByName(name, [options], [region], [cb])
  • Namespaced Functions: Matchlist.by.name
k.Matchlist.by.name('Contractz', KindredAPI.print)

const opts = {
  queue: [QUEUES.TEAM_BUILDER_RANKED_SOLO, QUEUES.RANKED_FLEX_SR],
  champion: 81 // Ezreal
}

k.Matchlist.by.name('Contractz', opts, KindredAPI.print)

Object Param + Callback

  • getMatchlist({ region, accountId/accId (int), id/summonerId/playerId (int), name (str), options (object) }, cb)
  • Namespaced Functions: Matchlist.getMatchlist, Matchlist.get, Summoner.getMatchlist, Summoner.matchlist
k.Matchlist.get({ accId: 47776491 }, KindredAPI.print)
k.Matchlist.get({ id: 32932398 }, KindredAPI.print)
k.Matchlist.get({ name: 'Contractz' }, KindredAPI.print)

const config = {
    name: 'Contractz',
    options: {
        queue: [QUEUES.TEAM_BUILDER_RANKED_SOLO, QUEUES.RANKED_FLEX_SR],
        champion: 79
    }
}

k.Matchlist.get(config, KindredAPI.print)

Get matchlist for last 20 matches played on given account ID and platform ID.

/lol/match/v3/matchlists/by-account/{accountId}/recent

Standard Params

N/A

Object Param + Callback

  • getRecentMatchlist({ region, accountId/accId (int), id/summonerId/playerId (int), name (str) }, cb)
  • Namespaced Functions: Matchlist.getRecentMatchlist, Matchlist.recent, Summoner.getMatchHistory, Summoner.matchHistory
k.Matchlist.recent({ accId: 47776491 }, KindredAPI.print)
k.Matchlist.recent({ id: 32932398 }, KindredAPI.print)
k.Matchlist.recent({ name: 'Contractz' }, KindredAPI.print)

const config = {
    name: 'SKT T1 Peanut',
    region: REGIONS.KOREA
}

k.Summoner
 .matchHistory(config)
 .then(data => console.log(data))
 .catch(error => console.error(error))

Get match timeline by match ID.

/lol/match/v3/timelines/by-match/{matchId}

Standard Params

  • getMatchTimelineById(id, [region], [cb])
  • Namespaced Functions: Match.Timeline.by.id
k.Match.Timeline
 .by.id(2478544123)
 .then(data => console.log(data))
 .catch(error => console.error(error))

k.Match.Timeline
 .by.id(2711264368, REGIONS.KOREA)
 .then(data => console.log(data))
 .catch(error => console.error(error))

k.Match.Timeline.by.id(2478544123, KindredAPI.print)

Object Param + Callback

  • getMatchTimeline({ region, id/matchId (int) }, cb)
  • Namespaced Functions: Match.getMatchTimeline, Match.getTimeline, Match.timeline
k.Match.timeline({ id: 2478544123 }, KindredAPI.print)

const config = {
    id: 2711264368,
    region: REGIONS.KOREA
}

k.Match.timeline(config, KindredAPI.print)