IsThereAnyDeal / API

16 stars 0 forks source link

/games/info/v2 'assets' field can be both an object and an array #6

Closed maxpilotto closed 2 weeks ago

maxpilotto commented 6 months ago

/games/info/v2's assets is an empty array if there are no assets available and an object otherwise. Is this intentional?

Example requests:

https://api.isthereanydeal.com/games/info/v2?id=018d937e-e961-7196-9d00-bd878301c57e&key=KEY

{
    "id": "018d937e-e961-7196-9d00-bd878301c57e",
    "slug": "summer-pack",
    "title": "SUMMER PACK",
    "type": "package",
    "assets": []
}

https://api.isthereanydeal.com/games/info/v2?id=018d937e-e9b0-7127-a7ba-b3ac75b89b7c&key=KEY

{
    "id": "018d937e-e9b0-7127-a7ba-b3ac75b89b7c",
    "slug": "crusader-kings-ii-horse-lords-collection",
    "title": "Crusader Kings II: Horse Lords Collection",
    "type": "dlc",
    "assets": {
        "boxart": "https://dbxce1spal1df.cloudfront.net/018d937e-e9b0-7127-a7ba-b3ac75b89b7c/boxart.jpg",
        "banner145": "https://dbxce1spal1df.cloudfront.net/018d937e-e9b0-7127-a7ba-b3ac75b89b7c/banner145.jpg",
        "banner300": "https://dbxce1spal1df.cloudfront.net/018d937e-e9b0-7127-a7ba-b3ac75b89b7c/banner300.jpg",
        "banner400": "https://dbxce1spal1df.cloudfront.net/018d937e-e9b0-7127-a7ba-b3ac75b89b7c/banner400.jpg"
    },
tfedor commented 2 weeks ago

It wasn't intentional. Will be fixed in tomorrow's release.