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

devapi and api return lists for single tag requests sometimes #392

Closed fourjr closed 6 years ago

fourjr commented 6 years ago

Issue Report:

  1. Did you encounter this recently, or has this bug always been there? Very recently
  2. Expected behaviour: A list should not appear if only one tag is given

I managed to reproduce this on my browser with devapi. image

My application, that uses api kept reporting that the data returned was an array instead of an object.

This does not happen 100% of the time.

Request Details:

GET
https://api.royaleapi.com/player/2P0LYQ/chests
https://devapi.royaleapi.com/player/2P0LYQ/chests

Response Details:

[
  {
    "upcoming": [
      "silver",
      "silver",
      "silver",
      "silver",
      "gold",
      "silver",
      "silver",
      "silver",
      "silver"
    ],
    "superMagical": 129,
    "magical": 17,
    "legendary": 52,
    "epic": 53,
    "giant": 92
  }
]
selfish commented 6 years ago

I'm completely unable to reproduce this =\ Is it still happening in dev server?

Gr8z commented 6 years ago

cannot reproduce on devapi nor api

selfish commented 6 years ago

@fourjr - please close if irrelevant

fourjr commented 6 years ago

i just got it again 🤔

selfish commented 6 years ago

sigh

fourjr commented 6 years ago

The first time i requested, it was an object, second time onwards, became an array.. happened for 3 other tags

selfish commented 6 years ago

This was a cache issue. Surely, it must be resolved now. Please reopen if still occurring (I was able to find steps to reproduce, and eliminated the issue)