dolejska-daniel / riot-api

Riot League of Legends & DataDragon API wrappers for PHP7 and PHP8.
GNU General Public License v3.0
112 stars 25 forks source link

getMatchlistByAccount Doesn't accept arrays for queue and season #41

Closed cohenu closed 5 years ago

cohenu commented 5 years ago

Describe the bug Ever since v3.0.2 getMatchlistByAccount doesn't accept arrays when the documentation lists the fields as int|array. The fields are:

The method returns the following error:

 LeagueAPI: Request is invalid. Bad request - Query parameter 'season' must be numeric

The match list endpoint should be able to retrieve data for multiple queues/seasons/champions.

To Reproduce Steps to reproduce the behavior:

  1. Initialize an instance of LeagueAPI
  2. Make a requests using getMatchlistByAccount and set one of the affected fields as an array of integers

Expected behavior Should return a match list with the supplied filters applied.

Screenshots Not relevant

Server (please complete the following information):

Additional context Seems like a constraint was placed on the fields and it no longer accepts arrays.

extrail commented 5 years ago

@dolejska-daniel We didn't test other endpoints but this might affect any endpoint that accepts arrays. Just a heads up.

dolejska-daniel commented 5 years ago

As per API Documentation, arrays (Set[int]) should be supported by API endpoint. I'll contact API guys about that.

dolejska-daniel commented 5 years ago

So there was a problem when building URL query parameters, the parameters are accepted in kind of non-standard way on the API. Should be fixed now.

cohenu commented 5 years ago

@dolejska-daniel Hey, i noticed the fix was pushed to master but a new version wasn't pushed to composer.

dolejska-daniel commented 5 years ago

Whoops, forgot! Fixed 😸.