openplanet-nl/plugin-manager

use of author and donateurl in openplanet plugin api is deprecated

Closed this issue · 0 comments

sylae commented

according to openplanet website code, author and donateurl are deprecated in favor of subkeys in the authoruser object. looks like it should be just a quick two-liner code change.

m_author = js["author"];
m_version = Version(js["version"]);
m_shortDescription = js["shortdescription"];
if (js.HasKey("description")) {
m_description = js["description"];
}
m_donateURL = js["donateurl"];

(note that with adding plugin source/issues links, i think it might be worth holding off on this until that's pushed? here's the api output i have rn for that with deprecated stuff removed:)

{
  "id": 311,
  "identifier": "DID",
  "name": "Diegetic Information Display (DID)",
  "authoruser": {
    "username": "sylae",
    "displayname": "MisfitMaid",
    "sponsorurl": "https://patreon.com/MisfitMaid",
    "is_team": true,
    "is_verified": true
  },
  "version": "0.4.2",
  "shortdescription": "Shows time, speed, lap count, and other essentials next to your car",
  "description": "<trimmed>",
  "filesize": 0,
  "signed": true,
  "broken": true,
  "featured": true,
  "posttime": 1674050209,
  "updatetime": 1680192879,
  "downloads": 1245,
  "image": "imgu/1673654465_a20c8ac8feb298c7c6c85605d2ee35b94f88a5f4.jpg",
  "url": "plugin/did",
  "screenshots": [
    "imgu/1673654482_1adf4f18a67f205c4e8b47488b097ea332e58ab4.jpg",
    "imgu/1673654482_2633bca24a03e6727a1d0526a57d44dccb4723f7.jpg",
    "imgu/1673654482_ea4cbd9eac06e8faafb05dc2865e764c6d4a3c37.jpg",
    "imgu/1676332673_48f5c7e398a572316bea136cffd43f0902796213.jpg"
  ],
  "tags": [
    {
      "type": "Game",
      "name": "Trackmania",
      "class": "",
      "tooltip": ""
    }
  ],
  "links": {
    "source": "https://github.com/MisfitMaid/DiegeticInfoDisplay",
    "issues": null,
    "donate": "https://patreon.com/MisfitMaid"
  }
}