cnguy / kayn

superagent-inspired Node.js lib (w/ **some** TypeScript support) for accessing Riot's League of Legend's API (discord: cnguy#3614)
MIT License
134 stars 34 forks source link

Current LeaguePositions issue #75

Closed ThaWill closed 5 years ago

ThaWill commented 5 years ago
 kayn.Summoner.by.name('hide on bush')
        .region(REGIONS.KOREA)
        .then(summoner => {
            const id = summoner.id;
            kayn.LeaguePositions.by.summonerID(id).then(rank => {
                //. . .
            })
        })

When I try to get all the leagues of 'hide on bush' I get the following error, Is this an issue or am I doing it wrong?

(node:9644) DeprecationWarning: Collection#filterArray: use Collection#filter instead
TypeError: Cannot read property 'by' of undefined
    at kayn.Summoner.by.name.region.then.summoner (C:\Users\VICTOR\Desktop\es-shiba-discord\index.js:61:38)
cnguy commented 5 years ago

Hi, sorry for the late response. This has been deprecated in June 17th and in v0.9.10. Riot removed these endpoints.

https://github.com/cnguy/kayn/blob/master/CHANGELOG.md#0910-breaking