examples/es5/v4/grabbing-matches-by-champions-out-of-a-ranked-match-list.js
function main(kayn) {
    const config = {
        query: 420,
        champion: 67,
        season: 7,
    }

    kayn.Summoner.by.name('Contractz').callback(function(error, summoner) {
        // Note that the grabbing of a matchlist is currently limited by pagination.
        // This API request only returns the first list.
        kayn.Matchlist.by
            .accountID(summoner.accountId)
            .region('na')
            .query(config)
            .callback(function(error, matchlist) {
                console.log(matchlist.totalGames, matchlist.matches.length)
            })
    })
}
function main(kayn) {
    const config = {
        query: 420,
        champion: 67,
        season: 7,
    }

    kayn.Summoner.by.name('Contractz').callback(function(error, summoner) {
        // Note that the grabbing of a matchlist is currently limited by pagination.
        // This API request only returns the first list.
        kayn.Matchlist.by
            .accountID(summoner.accountId)
            .region('na')
            .query(config)
            .callback(function(error, matchlist) {
                console.log(matchlist.totalGames, matchlist.matches.length)
            })
    })
}
function main ( kayn ) { const config = { query : 420 , champion : 67 , season : 7 , } kayn . Summoner . by . name ( 'Contractz' ) . callback ( function ( error , summoner ) { // Note that the grabbing of a matchlist is currently limited by pagination. // This API request only returns the first list. kayn . Matchlist . by . accountID ( summoner . accountId ) . region ( 'na' ) . query ( config ) . callback ( function ( error , matchlist ) { console . log ( matchlist . totalGames , matchlist . matches . length ) } ) } ) }
Out of a player's ranked matchlist, grabs every match where they played a certain champion.
Out of a player s ranked matchlist grabs every match where they played a certain champion .