Skip to content

native_minecraft_version and supported_minecraft_versions return null. #53

@itaquito

Description

@itaquito

Hey! While experimenting more with the API (and using it in something I'm developing) I realised that some resources return null on native_minecraft_version and supported_minecraft_versions while others return an empty string on native_minecraft_version and an empty array on supported_minecraft_versions (expected behaviour).
Of course, this only happens on resources that don't have this information.

Such as these 2 resources:
Error: https://www.spigotmc.org/resources/269/ (https://api.spigotmc.org/simple/0.2/index.php?action=getResource&id=269)

{
  "id": "269",
  "title": "BungeePlayerCounter",
  "tag": "Show player's count of each server in a scoreboard",
  "current_version": "1.5.2 beta",
  "native_minecraft_version": null,
  "supported_minecraft_versions": null,
  "icon_link": "https://www.spigotmc.org/styles/default/xenresource/resource_icon.png",
  "author": {
    "id": "7517",
    "username": "AlphartDev"
  },
  "premium": {
    "price": "0.00",
    "currency": ""
  },
  "stats": {
    "downloads": "22408",
    "updates": "11",
    "reviews": {
      "unique": "42",
      "total": "43"
    },
    "rating": "4.45238"
  },
  "description": "(...)"
}

Expected behaviour: https://www.spigotmc.org/resources/313/ (https://api.spigotmc.org/simple/0.2/index.php?action=getResource&id=313)

{
  "id": "313",
  "title": "BungeeTabListPlus",
  "tag": "Customize your tab list",
  "current_version": "3.4.4",
  "native_minecraft_version": "",
  "supported_minecraft_versions": [],
  "icon_link": "https://www.spigotmc.org/data/resource_icons/0/313.jpg?1455645578",
  "author": {
    "id": "9041",
    "username": "CodeCrafter47"
  },
  "premium": {
    "price": "0.00",
    "currency": ""
  },
  "stats": {
    "downloads": "106209",
    "updates": "114",
    "reviews": {
      "unique": "311",
      "total": "356"
    },
    "rating": "4.63987"
  },
  "description": "(...)"
}

I'm not sure what is the cause.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions