StarCitizenWiki / API

The star-citizen.wiki API. Automatically scrapes Comm-Links, Stats and In-Game Data.
https://api.star-citizen.wiki
MIT License
29 stars 5 forks source link

Empty item descriptions are arrays #108

Closed kingultron99 closed 9 months ago

kingultron99 commented 9 months ago

Wasnt completely sure how to title this, however i've recently noticed that some items (I've experienced it more with hardpoint items so far) return an empty array as the value for description if that item doesnt posses one, rather than null or undefined.

for example, take this snippet from the reclaimer's hardpoints:

{
      "name": "hardpoint_powerplant",
      "position": null,
      "min_size": 4,
      "max_size": 4,
      "class_name": "POWR_AEGS_S04_Reclaimer_SCItem",
      "health": 6000,
      "type": "PowerPlant",
      "sub_type": "Power",
      "item": {
        "uuid": "ae9cec5a-0917-441d-802b-3d96d79478cc",
        "name": "Main Powerplant",
        "description": [],
        "size": 4,
        "mass": 2880,
        "grade": null,
        "class": null,
        "manufacturer_description": null,
        "manufacturer": {
          "name": "Unknown Manufacturer",
          "code": "UNKN",
          "link": "https://api.star-citizen.wiki/api/v2/manufacturers/Unknown+Manufacturer"
        },
        "type": "PowerPlant",
        "sub_type": "Power",
        "power_plant": {
          "power_output": 47500
        },
        "tags": [],
        "required_tags": [],
        "interactions": [
          "Enablepowerplant",
          "Disablepowerplant"
        ],
        "ports": [],
        "updated_at": "2023-12-15T10:06:53.000000Z",
        "version": "3.22.0-LIVE.9003376"
      }
},

it contains [] as the item description. this is usually a string or an object of type: { en_EN: string; de_DE: string } if you're not using a set locale in the api requests.

octfx commented 9 months ago

Will fix this in the next release :)

kingultron99 commented 9 months ago

wonderful work as always @octfx