lolapi icon indicating copy to clipboard operation
lolapi copied to clipboard

CurrentGame.getBySummonerId(summonerId, [options, ]callback)

Open mrkoala30 opened this issue 9 years ago • 2 comments

could not work please check :(

mrkoala30 avatar Jan 01 '16 10:01 mrkoala30

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.

queckezz avatar Feb 19 '16 10:02 queckezz

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.

shawnhouser avatar Feb 23 '17 03:02 shawnhouser