LeagueJS icon indicating copy to clipboard operation
LeagueJS copied to clipboard

Update gettingListByAccount params beginTime,endTime documentation to be seconds

Open giannic opened this issue 2 years ago • 1 comments

Per https://developer.riotgames.com/apis#match-v5/GET_getMatchIdsByPUUID, this should be seconds

Also tried sample code using LeagueJS - Working with seconds (returns populated match id list):

const NOW = Date.now();
leagueJs.Match.gettingListByAccount(puuId, process.env.LEAGUE_API_PLATFORM_ID, {
  beginTime: Math.floor((NOW - 86400000)/1000), // 24 hours ago
  endTime: Math.floor(NOW/1000),                              
})

Not working with milliseconds (returns empty match id list):

const NOW = Date.now();
leagueJs.Match.gettingListByAccount(puuId, process.env.LEAGUE_API_PLATFORM_ID, {
  beginTime: NOW - 86400000, // 24 hours ago
  endTime: NOW,                              
})

giannic avatar Feb 24 '23 02:02 giannic

Gentle nudge on this, thanks!

giannic avatar Mar 27 '23 20:03 giannic

Hey, sorry for the long delay, I didn't get any Notifications from here and were not active on my personal Github since start of 2023.

Colorfulstan avatar Sep 05 '24 23:09 Colorfulstan