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

Tournament endpoint not returning a List if only 1 result. #377

Closed ZeNeLLiE closed 6 years ago

ZeNeLLiE commented 6 years ago

https://api.royaleapi.com/tournaments/open?1k=1&max=1

if only 1 result returned,

{
    "tag": "UYC99UG",
    "name": "Weekly Super League Tournament",
    "open": true,
    "maxPlayers": 1000,
    "currentPlayers": 1000,
    "status": "inProgress",
    "createTime": 1529353712,
    "prepTime": 7200,
    "startTime": null,
    "endTime": null,
    "duration": 3600,
    "description": "Gain exclusive access to FUTURE tournaments by joining the Super League community: superleague.com/joinclash",
    "updatedAt": 1529364413,
    "maxCapacity": 1000,
    "playerCount": 1000,
    "preparationDuration": 7200,
    "type": "open",
    "members": []
}

expected result:

[
    {
        "tag": "UYC99UG",
        "name": "Weekly Super League Tournament",
        "open": true,
        "maxPlayers": 1000,
        "currentPlayers": 1000,
        "status": "inProgress",
        "createTime": 1529353712,
        "prepTime": 7200,
        "startTime": null,
        "endTime": null,
        "duration": 3600,
        "description": "Gain exclusive access to FUTURE tournaments by joining the Super League community: superleague.com/joinclash",
        "updatedAt": 1529364413,
        "maxCapacity": 1000,
        "playerCount": 1000,
        "preparationDuration": 7200,
        "type": "open",
        "members": []
    }
] 
selfish commented 6 years ago

Fixed on dev server - should go live this week