claudiowilson/LeagueJS

getMatchHistory return 403: forbidden

Closed this issue · 3 comments

other methods work fine, just getMatchHistory returns 403:forbidden, here is the code:

LolApi.getMatchHistory 40200522, null, (e, matchlist) ->
if e?
console.log e
return

Same problem!!
Error getting match history: 403 Forbidden undefined

help pls

The match history endpoint was deprecated by Riot 3 months ago so that would explain the 403.
Instead of match history, matchlist and match are used for retrieving similar data.

Matchlist: https://developer.riotgames.com/api/methods#!/1053/3617
Match: https://developer.riotgames.com/api/methods#!/1058/3656

Heres the forum thread discussing the deprecation: https://developer.riotgames.com/api/methods#!/1053/3617

This library hasn't been updated yet so currently it doesn't support either of the new methods.
If you're looking for an alternative, I would suggest 'lolapi': https://github.com/emmorts/lolapi

Unfortunately I haven't been doing much with the LoL API, and haven't been maintaining it as well as I should have. I'll try and update this as soon as possible