Ability to specify query parameters for matchlist
aj-r opened this issue · 2 comments
For the matchlist endpoint, it is critical to be able to pass query parameters (beginTime
, beginIndex
, etc.) - without those parameters, its use case is very limited.
Or is there a way to do this that I'm missing?
docs: https://github.com/cnguy/kayn#adding-query-parameters-to-a-request
example in my own project: https://github.com/cnguy/OneTricks/blob/master/stats/StatsGenerator.js#L133
Hello! Yes, you can pass query parameters via the query
method.
You can chain multiple query
's like:
kayn.Matchlist.by.summonerID(123456).query({ beginIndex: 0 }).query({ endIndex: 50 })
or just pass in the entire object:
kayn.Matchlist.by.summonerID(123456).query({ beginIndex: 0, endIndex: 50 })
Is this what you're looking for?
All requests can be passed the region
and/or query
methods.
To verify that your query parameters are being passed, make sure debugging is set on so that you can see the URL being produced by the method.
Oh awesome, that's exactly what I was looking for. Thanks!