RoyaleAPI / cr-api

Clash Royale Analytics, Profiles and Insights. We no longer publish a public API. Please use the official API from Supercell.
https://RoyaleAPI.com
167 stars 20 forks source link

Multi Tags in Battles EndPoint returning all battles in one list. #404

Closed Momoretti closed 4 years ago

Momoretti commented 6 years ago

Issue Report:

  1. Did you encounter this recently, or has this bug always been there? Yes recently (today)
  2. Expected behaviour:

For request player/:tag/battles with only 1 tag shall be a list of 25 battles (not lists in a list) as described in closed issue #401 => it is OK since fix of issue #401

But for request with multiple tags player/:tag1,:tag2/battles, the result shall be a list (for each tag) of lists of 25 battles (previous behaviour of the api). But since fix of issue #401, the result is only a big list of battles of all players (if 2 tags, result is a list of 50 battles).

Request Details:

GET
https://api.royaleapi.com/player/920UP9,QPQPUGGU/battles

Response Details:

Result is:

[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},{}, {}, {}, {}, {}, {}, {}, {}]

Instead of:

[
 [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
 [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
]

I adapted my code accordingly to these new response but maybe it would be useful to get back to previous behavior or to keep this new response but to inform developpers of this API modification.

selfish commented 4 years ago

@Momoretti this is an intended behavior since this endpoint is intended to server as a kind of battle feed ordered by battle time.