lolapi
lolapi copied to clipboard
CurrentGame.getBySummonerId(summonerId, [options, ]callback)
could not work please check :(
Open Source is not a free service. Please provide some more info about your code, what specifically doesn't work, where it fails etc. You won't get any help this way.
I was able to get this to work by changing line 18 in /lib/api/currentGame.js
options.platformId = config.platforms[options.region];
options.platformId = config.platforms[options.region].id;
The error I was getting was
Error: Param platformId must be string or an array of strings
And was being caused because util.fillUri
expects either strings or ints to be in the options, and could not handle when there was an object.
The object platformId
that was being passed from CurrentGame.getSummonerById()
looked like this platformId: { id: 'NA1', host: 'na.api.pvp.net' }
I don't know how to resolve issues / submit fixes, I'm new to github, if someone else can do that before I can figure out how that would be great.
Edit: This appears to only be a problem when downloading with npm, when downloading directly from github, this problem is already fixed.