Giter VIP home page Giter VIP logo

xenfororesourcemanagerapi's Introduction

XenforoResourceManagerAPI

This project aims to safely expose information from the SpigotMC website in a machine-readable format for use in projects and other systems.

Current Capabilities

Action Description
listResources get information about all resources in the system
getResource get information about a resource by its ID
getResourcesByAuthor get information about all resources created by a specific author by the user id
listResourceCategories get information about available resource categories
getResourceUpdate get information about a specific resource update by its id
getResourceUpdates get information about all of the updates for a specific resource by the resource id
getAuthor get information about an author by the user id
findAuthor get information about an author by the username (exact username match only)

How To Use

All requests must currently be sent via GET to https://api.spigotmc.org/simple/0.2/index.php. To get started, attach a GET parameter action specifying which operation you'd like to perform (seen above). Then, attach the action's GET parameter(s). See below for information on the parameters that each action accepts.

Documentation

listResources

Parameters:
name type required default description
category int no none The resource category to restrict results to (see listResourceCategories)
page int no 1 The page number to retrieve. Items are paginated at 10 results per page.
Response (truncated):
[
  {
    "id":"12",
    "title":"BungeeLobbyKick",
    "tag":"This plugin will move all players to a configured server on command",
    "current_version":"0.2",
    "native_minecraft_version":null,
    "supported_minecraft_versions":null,
    "icon_link":"https:\/\/www.spigotmc.org\/styles\/default\/xenresource\/resource_icon.png",
    "author":{
      "id":"1013",
      "username":"fuzzy_bot"
    },
    "premium":{
      "price":"0.00",
      "currency":""
    },
    "stats":{
      "downloads":"2789",
      "updates":"0",
      "reviews":{
        "unique":"12",
        "total":"12"
      },
      "rating":"4.58333"
    },
    "description":"[B]This plugin will move all players to a configured server when one of these commands is run:[\/B]\n\n[B]\/lobbykick (Kick all players to lobby)[\/B]\n[B]\/lobbykickstop (lobbykick + Runs console command stop)[\/B]\n[B]\/lobbykickrestart ([\/B][B]lobbykick +[\/B][B]Runs console command restart <- this is a spigot feature)[\/B]\n\n\n[B]All of the above commands require the permission \"Lobby.Kick\" or may be run from the console.[\/B]\n\n[B]\/lobbykickplayer playername (kick 1 player, Requires Lobby.Kick.Player permission)[\/B]\n\n[B]The server name to move the players to is in the \"config.yml\" file in the BungeeLobbyKick folder. The default is to move players to the server \"lobby\". You can reload this file using:[\/B]\n\n[B]\/lobbykickreload (rereads config file)[\/B]"
  },
  {
    "id":"13",
    "title":"BungeeKickStop",
    "tag":"Bungee Kick control plugin - move players to a different server when kicked",
    "current_version":"0.1",
    "native_minecraft_version":null,
    "supported_minecraft_versions":null,
    "icon_link":"https:\/\/www.spigotmc.org\/styles\/default\/xenresource\/resource_icon.png",
    "author":{
      "id":"1013",
      "username":"fuzzy_bot"
    },
    "premium":{
      "price":"0.00",
      "currency":""
    },
    "stats":{
      "downloads":"1776",
      "updates":"0",
      "reviews":{
        "unique":"3",
        "total":"3"
      },
      "rating":"5"
    },
    "description":"BungeeKickStop moves players to a configured server when the player is kicked with a specific message.\n \nConfiguration is in the config.txt file. An empty file is generated the first time you start the plugin.\n \ncreate lines in config.txt to setup the kick filters:\n \nservername!!!Kick Text!!!Message &dto &fuser\n \nWhen a player is kicked the kick is evaluated for \"Kick Text\"\nif this is found, the player is sent to \"servername\" server and also told \"Message &dto &fuser\"\n \nwith permission bks.reload use the command \/bksreload to reload the configuration\n \n \n** Note ** This requires the latest version of Bungee!"
  }
]

getResource

Parameters:
name type required default description
id int yes none The id of the resource to retrieve
Response:
{
  "id":"2",
  "title":"HubKick",
  "tag":"Send players to lobby on kick. \/lobby \/ hub",
  "current_version":"1.7.1",
  "native_minecraft_version":null,
  "supported_minecraft_versions":[
    "1.7",
    "1.8",
    "1.9"
  ],
  "icon_link":"https:\/\/www.spigotmc.org\/data\/resource_icons\/0\/2.jpg?1482076430",
  "author":{
    "id":"106",
    "username":"LaxWasHere"
  },
  "premium":{
    "price":"0.00",
    "currency":""
  },
  "stats":{
    "downloads":"7719",
    "updates":"22",
    "reviews":{
      "unique":"11",
      "total":"11"
    },
    "rating":"5"
  },
  "description":"[CENTER][I][B][URL='https:\/\/discord.gg\/SvFEBGW'][IMG]https:\/\/i.imgur.com\/inmwaK3.png[\/IMG] [\/URL]| [URL='https:\/\/www.paypal.me\/LaxWasHere'][IMG]https:\/\/i.imgur.com\/h5YgdLC.png[\/IMG][\/URL] | [URL='https:\/\/github.com\/AwesomePowered\/HubKick'][IMG]https:\/\/i.imgur.com\/ikjLwXh.png[\/IMG][\/URL][\/B][\/I][\/CENTER]\n[I][B]Info[\/B]\nWhen a player get's kicked from the server, this plugin will forward him\/her to the server you specified in the config.yml.\nKick everyone and shutdown the server or just kick everyone.\n\n[B]Configuration[\/B]\n[code]#Hub is the server you want the players to be sent to.\nHubServer: hub\n\n#Enable this and it will pick a hub on random when kicked\nHubs:\n- Hub\n- Lobby\nrandomHubs: false\n\n#Regex pattern for forcekicking a player. No touchy touchy pls\nignorePattern: '(\\bafk|AFK|-f\\b)'\n\n#Prefix\nprefix: '&4[&aHubKick&4]'\n\n#Message to be sent when kicking everyone\/ shutting down the server.\nKickallMessage: '&a&lServer shutting down, you have been kicked to the hub!'\n\n#Should the plugin send the users on hub on kick?\nHubOnKick: true\n[\/code]\n\n[B]Installation[\/B]\n [\/I]\n[LIST]\n[I]\n[LIST][*]Drop the HubKick.jar at your \/plugins folder[\/LIST]\n[LIST][*]Restart Server[\/LIST]\n[LIST][*]Get Kicked[\/LIST][\/I]\n[\/LIST]\n[I][B]Commands:[\/B]\n[CODE]\/hub (sends you to he hub server)\n\/lobby (same as above)\n\/alltolobby (sends everyone to lobby)\n\/lobbyall (Same as above)\n\/sendplayer(Sends player to a server)\n\/sendp(^)\n\/shutdown (sends everyone to lobby and shuts down the server)\n\/forcekick (kicked the player off the network) (or simply add -f to a kick message)\n\/fkick (same as above)\n[\/CODE]\n\n[B]Permissions:[\/B]\n [\/I]\n[LIST]\n[I]\n[LIST][*]hubkick.command[\/LIST]\n[LIST][*]hubkick.kickall[\/LIST]\n[LIST][*]hubkick.send[\/LIST]\n[LIST][*]hubkick.shutdown[\/LIST]\n[LIST][*]hubkick.forcekick[\/LIST][\/I]\n[\/LIST]\n[I][URL='https:\/\/github.com\/AwesomePowered\/HubKick']Github[\/URL][\/I]"
}

getResourcesByAuthor

Parameters:
name type required default description
id int yes none The id of the author to restrict results to (see findAuthor)
page int no 1 The page number to retrieve. Items are paginated at 10 results per page.
Response (truncated):
[
  {
    "id":"57242",
    "title":"spark",
    "tag":"spark is a performance profiling plugin\/mod for Minecraft clients, servers and proxies.",
    "current_version":"1.6.1",
    "native_minecraft_version":"",
    "supported_minecraft_versions":[
      "1.8",
      "1.9",
      "1.10",
      "1.11",
      "1.12",
      "1.13",
      "1.14",
      "1.15",
      "1.16",
      "1.17"
    ],
    "icon_link":"https:\/\/www.spigotmc.org\/data\/resource_icons\/57\/57242.jpg?1615457966",
    "author":{
      "id":"100356",
      "username":"Luck"
    },
    "premium":{
      "price":"0.00",
      "currency":""
    },
    "stats":{
      "downloads":"16589",
      "updates":"10",
      "reviews":{
        "unique":"49",
        "total":"53"
      },
      "rating":"4.89796"
    },
    "description":"[CENTER][B][SIZE=7][IMG]https:\/\/i.imgur.com\/cJ4sYV5.png[\/IMG]  [\/SIZE][\/B]\n[SIZE=4][B]spark is a performance profiling plugin\/mod for Minecraft clients, servers and proxies.[\/B][\/SIZE]\n[\/CENTER]\n[B]Useful Links[\/B]\n[LIST]\n[*][B][URL='https:\/\/spark.lucko.me\/']Website[\/URL][\/B] - browse the project homepage\n[*][B][URL='https:\/\/spark.lucko.me\/docs']Documentation[\/URL][\/B] - read documentation and usage guides\n[*][B][URL='https:\/\/spark.lucko.me\/download']Downloads[\/URL][\/B] - latest development builds\n[\/LIST]\n[B][SIZE=5]What does it do?[\/SIZE][\/B]\nspark is made up of a number of components, each detailed separately below.\n[LIST]\n[*][B]CPU Profiler[\/B]: Diagnose performance issues.\n[*][B]Memory Inspection[\/B]: Diagnose memory issues.\n[*][B]Server Health Reporting[\/B]: Keep track of overall server health.\n[\/LIST]\n\n[B][SIZE=6]\u26a1 CPU Profiler[\/SIZE][\/B]\nspark's profiler can be used to diagnose performance issues: \"lag\", low tick rate, high CPU usage, etc.\n\nIt is:\n[LIST]\n[*][B]Lightweight[\/B] - can be ran in production with minimal impact.\n[*][B]Easy to use[\/B] - no configuration or setup necessary, just install the plugin\/mod.\n[*][B]Quick to produce results[\/B] - running for just ~30 seconds is enough to produce useful insights into problematic areas for performance.\n[*][B]Customisable[\/B] - can be tuned to target specific threads, sample at a specific interval, record only \"laggy\" periods, etc\n[*][B]Highly readable[\/B] - simple tree structure lends itself to easy analysis and interpretation. The viewer can also apply deobfuscation mappings.\n[\/LIST]\nIt works by sampling statistical data about the systems activity, and constructing a call graph based on this data. The call graph is then displayed in an online viewer for further analysis by the user.\n\nThere are two different profiler engines:\n[LIST]\n[*]Native [ICODE]AsyncGetCallTrace[\/ICODE] + [ICODE]perf_events[\/ICODE] - uses [URL='https:\/\/github.com\/jvm-profiling-tools\/async-profiler']async-profiler[\/URL] ([I]only available on Linux x86_64 systems[\/I])\n[*]Built-in Java [ICODE]ThreadMXBean[\/ICODE] - an improved version of the popular [URL='https:\/\/github.com\/sk89q\/WarmRoast']WarmRoast profiler[\/URL] by sk89q.\n[\/LIST]\n[B]\n[SIZE=6]\u26a1 Memory Inspection[\/SIZE][\/B]\nspark includes a number of tools which are useful for diagnosing memory issues with a server.\n[LIST]\n[*][B]Heap Summary[\/B] - take & analyse a basic snapshot of the servers memory\n[LIST]\n[*]A simple view of the JVM's heap, see memory usage and instance counts for each class\n[*]Not intended to be a full replacement of proper memory analysis tools. (see below)\n[\/LIST]\n[\/LIST]\n[LIST]\n[*][B]Heap Dump[\/B] - take a full (HPROF) snapshot of the servers memory\n[LIST]\n[*]Dumps (& optionally compresses) a full snapshot of JVM's heap.\n[*]This snapshot can then be inspected using conventional analysis tools.\n[\/LIST]\n[\/LIST]\n[LIST]\n[*][B]GC Monitoring[\/B] - monitor garbage collection activity on the server\n[LIST]\n[*]Allows the user to relate GC activity to game server hangs, and easily see how long they are taking & how much memory is being free'd.\n[*]Observe frequency\/duration of young\/old generation garbage collections to inform which GC tuning flags to use\n[\/LIST]\n[\/LIST]\n[B][SIZE=6]\u26a1 Server Health Reporting[\/SIZE][\/B]\nspark can report a number of metrics summarising the servers overall health.\n\nThese metrics include:\n[LIST]\n[*][B]TPS[\/B] - ticks per second, to a more accurate degree indicated by the \/tps command\n[*][B]Tick Durations[\/B] - how long each tick is taking (min, max and average)\n[*][B]CPU Usage[\/B] - how much of the CPU is being used by the server process, and by the overall system\n[*][B]Memory Usage[\/B] - how much memory is being used by the process\n[*][B]Disk Usage[\/B] - how much disk space is free\/being used by the system\n[\/LIST]\nAs well as providing tick rate averages, spark can also monitor individual ticks - sending a report whenever a single tick's duration exceeds a certain threshold. This can be used to identify trends and the nature of performance issues, relative to other system or game events.\n\n\n[SIZE=5][B]Us[SIZE=5]a[\/SIZE]ge[\/B][\/SIZE]\nTo install, just add the [B]spark.jar[\/B] file to your servers plugins directory.\n\nInformation about [URL='https:\/\/spark.lucko.me\/docs\/Command-Usage']how to use commands[\/URL] can be found in the docs.\n\nIf you\u2019d like help analysing a profiling report, or just want to chat, feel free to join us on [URL='https:\/\/discord.gg\/PAGT2fu']Discord[\/URL].\n\n\n[B][SIZE=5]Guides[\/SIZE][\/B]\nThere are a few small \"guides\" available in the docs, covering the following topics.\n[LIST]\n[*][URL='https:\/\/spark.lucko.me\/docs\/guides\/The-tick-loop']The tick loop[\/URL]\n[*][URL='https:\/\/spark.lucko.me\/docs\/guides\/Finding-lag-spikes']Finding the cause of lag spikes[\/URL]\n[\/LIST]"
  },
  {
    "id":"28140",
    "title":"LuckPerms",
    "tag":"A permissions plugin for Minecraft servers (Bukkit\/Spigot, BungeeCord & more)",
    "current_version":"5.3.47",
    "native_minecraft_version":"",
    "supported_minecraft_versions":[
      "1.7",
      "1.8",
      "1.9",
      "1.10",
      "1.11",
      "1.12",
      "1.13",
      "1.14",
      "1.15",
      "1.16",
      "1.17"
    ],
    "icon_link":"https:\/\/www.spigotmc.org\/data\/resource_icons\/28\/28140.jpg?1490821714",
    "author":{
      "id":"100356",
      "username":"Luck"
    },
    "premium":{
      "price":"0.00",
      "currency":""
    },
    "stats":{
      "downloads":"1466009",
      "updates":"42",
      "reviews":{
        "unique":"826",
        "total":"926"
      },
      "rating":"4.77603"
    },
    "description":"[RIGHT][URL='https:\/\/luckperms.net\/download']Looking for the BungeeCord download? Click here![\/URL][\/RIGHT]\n[CENTER][IMG]https:\/\/raw.githubusercontent.com\/LuckPerms\/branding\/master\/banner\/banner.png[\/IMG][\/CENTER]\n[IMG]https:\/\/i.imgur.com\/7vjPbyM.png[\/IMG]\nLuckPerms is a permissions plugin for Minecraft servers (Bukkit\/Spigot, BungeeCord & more). It allows server admins to control what features players can use by creating groups and assigning permissions.\n\nIt is:\n[LIST]\n[*][B]fast[\/B] - written with performance and scalability in mind.\n[*][B]reliable[\/B] - trusted by thousands of server admins, and the largest of server networks.\n[*][B]easy to use[\/B] - setup permissions using commands, directly in config files, or using the web editor.\n[*][B]flexible[\/B] - supports a variety of data storage options, and works on lots of different server types.\n[*][B]extensive[\/B] - a plethora of customization options and settings which can be changed to suit your server.\n[*][B]free[\/B] - available for download and usage at no cost, and permissively licensed so it can remain free forever.\n[\/LIST]\nFor more information, see the wiki article on [URL='https:\/\/luckperms.net\/wiki\/Why-LuckPerms']Why LuckPerms?[\/URL]\n\n[IMG]https:\/\/i.imgur.com\/E5SUQSP.png[\/IMG]\nThe latest downloads & other useful links can be found on the project homepage at [URL='https:\/\/luckperms.net\/']luckperms.net[\/URL].\n\nThe plugin has extensive [URL='https:\/\/luckperms.net\/wiki']documentation available on the wiki[\/URL]. Please use the resources there before coming to us directly for support.\n\nSupport for the plugin is provided on [URL='https:\/\/discord.gg\/luckperms']Discord[\/URL]. If you have a question which cannot be answered by reading the wiki, the best place to ask it is there.\n\nIf you would like to report a bug, please [URL='https:\/\/github.com\/lucko\/LuckPerms\/issues']open a ticket on GitHub[\/URL].\n\n[IMG]https:\/\/i.imgur.com\/3kfqrp1.png[\/IMG]\n[URL='https:\/\/bisecthosting.com\/luck'][IMG]https:\/\/i.imgur.com\/fpcKnbV.png[\/IMG][\/URL]\n[CENTER]LuckPerms is proudly sponsored by [URL='https:\/\/bisecthosting.com\/luck']BisectHosting[\/URL].[\/CENTER]\n\nThey've kindly offered LuckPerms users a massive [B]25% off[\/B] the first month of any of their game server hosting plans. To get the discount, just enter the promo code [B]luck[\/B] at checkout!\n\n[IMG]https:\/\/i.imgur.com\/zflMO8M.png[\/IMG]\nMost of the other available permission plugins date back a number of years, and were created in the early Bukkit era. Almost without exception, they've been abandoned by their original authors, and receive no updates, support or bug fixes.\n\nLuckPerms is still a growing and active resource, and I endeavour to reply to all bug reports, issues and feature requests in a timely manner.\n\nLuckPerms supports fully automatic migration and data transfer from existing permissions plugins.\nFor more information about this process, please [URL='https:\/\/luckperms.net\/wiki\/Migration']read the wiki page[\/URL].\n\n[IMG]https:\/\/i.imgur.com\/CzC56lP.png[\/IMG]\nPlease don't post bug reports\/suggestions in the review section. Bugs should be reported by [URL='https:\/\/github.com\/lucko\/LuckPerms\/issues']opening a ticket on GitHub[\/URL].\n\nIf you just have a question, the best place to ask is in our Discord server. Either myself or somebody else will hopefully be able to assist.\n\nThis plugin took me while to make, so if you find it useful, a nice review would be appreciated. :) On the other hand, if you have suggestions, I'd love to hear those too!\n\n[B]If you're having issues using the plugin, please contact me BEFORE making a review. I *cannot* give support in the review section.[\/B]"
  }
]

listResourceCategories

Parameters: none
Response (truncated):
[
  {
    "id":"2",
    "title":"Bungee - Spigot",
    "description":"Spigot plugins that interact with BungeeCord."
  },
  {
    "id":"3",
    "title":"Bungee - Proxy",
    "description":"Bungee plugins that interact directly with the proxy plugins folder."
  },
  {
    "id":"4",
    "title":"Spigot",
    "description":"Plugins which work on a standard Spigot install."
  },
  {
    "id":"5",
    "title":"Transportation",
    "description":""
  },
  {
    "id":"6",
    "title":"Chat",
    "description":""
  },
  {
    "id":"7",
    "title":"Tools and Utilities",
    "description":""
  },
  {
    "id":"8",
    "title":"Misc",
    "description":""
  },
  {
    "id":"9",
    "title":"Libraries \/ APIs",
    "description":""
  },
  {
    "id":"10",
    "title":"Transportation",
    "description":""
  }
]

getResourceUpdate

Parameters:
name type required default description
id int yes none The id of the resource update to retrieve (see getResourceUpdates)
Response:
{
  "id":"352711",
  "resource_id":"6245",
  "title":"2.10.9 back to normal",
  "message":"[B][SIZE=6]2.10.9\n[\/SIZE][\/B]\n[LIST]\n[*][SIZE=4]Fixed issues with maven repo regarding Jetbrains annotations when using other IDE's[\/SIZE]\n[\/LIST]\n[SIZE=4]Like this update to pay respects[\/SIZE]\n[LIST]\n[*][SIZE=4]Updated deprecation methods in PlaceholderAPI class. Now normal methods of setPlaceholders will not nag you regardless if you use Player or OfflinePlayer.. This also resolves issues with plugins providing placeholders as both methods pre 2.10.7 are functional from PlaceholderHook. Use onRequest or onPlaceholderRequest.... Doesn't matter until we hit 3.0.0.  [\/SIZE]\n[*][SIZE=4]Fixed a few bugs that probably wont be noticed but if you really care about them you can follow the trail if you are on the hunt [\/SIZE]\n[\/LIST]\n[URL]https:\/\/github.com\/PlaceholderAPI\/PlaceholderAPI\/commits\/master[\/URL]\n\nThis update was mainly focused on people who actually hook into PlaceholderAPI so I hope this resolves any issues you may have with deprecated methods or stuff not working. I really don't want people using the dev repo as a way to release updates however they are a good way for everyone to test. Based on the feedback I felt this was the thing to do as we don't want to break things until PAPI3 drops.\n[SIZE=4]\n\n\n[\/SIZE]"
}

getResourceUpdates

Parameters:
name type required default description
id int yes none The id of the resource for which to retrieve updates
page int no 1 The page number to retrieve. Items are paginated at 10 results per page.
Response (truncated):
[
  {
    "id":"2",
    "resource_id":"2",
    "title":"HubKick",
    "message":"[CENTER][I][B][URL='https:\/\/discord.gg\/SvFEBGW'][IMG]https:\/\/i.imgur.com\/inmwaK3.png[\/IMG] [\/URL]| [URL='https:\/\/www.paypal.me\/LaxWasHere'][IMG]https:\/\/i.imgur.com\/h5YgdLC.png[\/IMG][\/URL] | [URL='https:\/\/github.com\/AwesomePowered\/HubKick'][IMG]https:\/\/i.imgur.com\/ikjLwXh.png[\/IMG][\/URL][\/B][\/I][\/CENTER]\n[I][B]Info[\/B]\nWhen a player get's kicked from the server, this plugin will forward him\/her to the server you specified in the config.yml.\nKick everyone and shutdown the server or just kick everyone.\n\n[B]Configuration[\/B]\n[code]#Hub is the server you want the players to be sent to.\nHubServer: hub\n\n#Enable this and it will pick a hub on random when kicked\nHubs:\n- Hub\n- Lobby\nrandomHubs: false\n\n#Regex pattern for forcekicking a player. No touchy touchy pls\nignorePattern: '(\\bafk|AFK|-f\\b)'\n\n#Prefix\nprefix: '&4[&aHubKick&4]'\n\n#Message to be sent when kicking everyone\/ shutting down the server.\nKickallMessage: '&a&lServer shutting down, you have been kicked to the hub!'\n\n#Should the plugin send the users on hub on kick?\nHubOnKick: true\n[\/code]\n\n[B]Installation[\/B]\n [\/I]\n[LIST]\n[I]\n[LIST][*]Drop the HubKick.jar at your \/plugins folder[\/LIST]\n[LIST][*]Restart Server[\/LIST]\n[LIST][*]Get Kicked[\/LIST][\/I]\n[\/LIST]\n[I][B]Commands:[\/B]\n[CODE]\/hub (sends you to he hub server)\n\/lobby (same as above)\n\/alltolobby (sends everyone to lobby)\n\/lobbyall (Same as above)\n\/sendplayer(Sends player to a server)\n\/sendp(^)\n\/shutdown (sends everyone to lobby and shuts down the server)\n\/forcekick (kicked the player off the network) (or simply add -f to a kick message)\n\/fkick (same as above)\n[\/CODE]\n\n[B]Permissions:[\/B]\n [\/I]\n[LIST]\n[I]\n[LIST][*]hubkick.command[\/LIST]\n[LIST][*]hubkick.kickall[\/LIST]\n[LIST][*]hubkick.send[\/LIST]\n[LIST][*]hubkick.shutdown[\/LIST]\n[LIST][*]hubkick.forcekick[\/LIST][\/I]\n[\/LIST]\n[I][URL='https:\/\/github.com\/AwesomePowered\/HubKick']Github[\/URL][\/I]"
  },
  {
    "id":"17",
    "resource_id":"2",
    "title":"Added \/lobby|\/hub command",
    "message":"New commands.\n \n[LIST]\n[*]\/hub\n[*]\/lobby\n[\/LIST]"
  },
  {
    "id":"66",
    "resource_id":"2",
    "title":"Added permission",
    "message":"Added permission to \/hub, \/lobby command\n \n[B]hubkick.command[\/B]"
  },
  {
    "id":"87",
    "resource_id":"2",
    "title":"Fixed commands",
    "message":"Fixed \/lobby \/hub commands not working."
  },
  {
    "id":"119",
    "resource_id":"2",
    "title":"Metrics",
    "message":"Added Metrics"
  }
]

getAuthor

Parameters:
name type required default description
id int yes none The id of the author to retrieve
Response:
{
  "id":"1",
  "username":"md_5",
  "resource_count":"12",
  "identities":{
    "twitter":"md__5"
  },
  "avatar":"https:\/\/www.gravatar.com\/avatar\/b53fd878a84d268da2b6456e0b96cae5.jpg?s=96"
}

findAuthor

Parameters:
name type required default description
name str yes none The exactly matching username of the desired user, with escape sequences if necessary
Response:
{
  "id":"12157",
  "username":"simpleauthority",
  "resource_count":"8",
  "identities":{
    "discord":"simple#5957"
  },
  "avatar":"https:\/\/www.spigotmc.org\/data\/avatars\/l\/12\/12157.jpg?1623588345"
}

xenfororesourcemanagerapi's People

Contributors

darbyjack avatar md-5 avatar simpleauthority avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xenfororesourcemanagerapi's Issues

Lower the cache TTL for author-related endpoints

Currently the API seems to be cached by Cloudflare which may lead to unexpected behaviour when awaiting some specific result.
I suggest disabling the Cloudflare cache for the api.spigotmc.org subdomain using a page rule.

Ability to get the resource update article / changelog

Would be great if I can get the update article of my resources, so then I can make a discord bot that will announce the update + the change log at the same time without me writing it by my own at my discord channel

API returning wrong resurces?

Using action listResources
Fetching category id 25 (i assume this is category id for SKRIPT) page 1:
first result is MineRewards which when looked into spigot is supposed to be Tools And Utilities.
the second page returns Lucky Block - Vers. Español which is actually in the skript category.
Whats going on here?

Also: Is there a list of category ids and their respective name on the spigot page?

Get ID of newest member/author

Obtain the ID of the newest member/author to see how many members/authors there currently are in SpigotMC which can be helpful for some people like @OpticFusion1 a lot (because one of his projects is currently looping from 1 to Integer.MAX_VALUE).

Make getAuthor return purchased resources

So, I was thinking, instead of #8 which would require more work and seems to be harder to implement, the getAuthor method could return the IDs of the purchased resources of the user. I think this would be a really good way for authors to verify real buyers I don't know whether some people will consider it a privacy issue.

Add JSON requests instead of URI requests

Modern REST-APIs do not use URI requests, meaning that an URI is appended by PHP-Flags. As URIs are almost always somehow logged and users tend to use HTTP over HTTPS any confidential data would be visible to anyone on the same network, this is no longer the as-is-Standard. Instead, a call should be made by calling an Endpoint with the correct payload, containing a JSON object specifying anything relevant to the endpoint.

This brings several nice and easy features:

  1. Security
  2. Ease of Expansion (i.e. new features in an endpoint only need appending the JSON)
  3. Developing requests in Websites, Plugins or even other programs is done by following standards for making REST-calls

Please consider this before adding authentication for services like requested in #8

Authors not found (404) even though they exist

A lot of authors return 404s via the API, even though both their resource overview and profile page exist and are publicly accessible.

Possibly related to #17

A few examples:

https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=45870 => https://www.spigotmc.org/resources/authors/45870/

https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=797245 => https://www.spigotmc.org/resources/authors/797245/

https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=800551 => https://www.spigotmc.org/resources/authors/800551/

https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=798575 => https://www.spigotmc.org/resources/authors/798575/

API Missing Important Information

When you visit a plugin's overview page, you are able to see the "total" amount of reviews in the small selection tab (https://prnt.sc/uwx8tk) and the "unique" amount of reviews in the information box (https://prnt.sc/uwx9cu). However, the API only returns the "total" amount of reviews only, which after a quick conversation with a SpigotMC resource staff member, we established this doesn't make sense, and I was instructed to open an issue about this here. If possible, please add the ability to retrieve this data.

Get information to members (getMemberById)

In some cases a verification of the spigot profile is needed. It would be helpful, if the API offers a endpoint to get the username and current Status of a member. This could help to create a bot checking if the user set a specific key as his/her status to verify this user is legit. This would over time also reduce the massive leaking of spigot premium-ressources, as developers can limit support for people using illegal copies.

Example GET index.php?action=getMemberById&id=41621:

{
  "id": "41621",
  "username": "SourceWriters",
  "currentStatus": "Working on RWG v5",
   "etc": "..."
}

Get latest profile post by user

Hi there,

It would be really nice to see getAuthor also return the latest profile post by the specified user. By doing that, verification bots for Discord could easily link discord users with their equivalent spigot account.

Send 404 when the resource or author is not found

Hello!

Right now when you search for a resource/author that doesn't exist you get an interesting response:

{
  "id": null,
  "title": null,
  "tag": null,
  "current_version": null,
  "native_minecraft_version": null,
  "supported_minecraft_versions": null,
  "icon_link": "https://www.spigotmc.org/styles/default/xenresource/resource_icon.png",
  "author": {
    "id": null,
    "username": null
  },
  "premium": {
    "price": null,
    "currency": null
  },
  "stats": {
    "downloads": null,
    "updates": null,
    "reviews": {
      "unique": null,
      "total": null
    },
    "rating": null
  },
  "description": null
}
{
  "id": null,
  "username": null,
  "resource_count": null,
  "identities": {},
  "avatar": "https://www.spigotmc.org/styles/spigot/xenforo/avatars/avatar_male_l.png"
}

My suggestion is just adding a 404 error when this happens:

{"code":404,"message":"Resource not found."}

By doing this way, we (devs that use the API) can easily catch the error rather than checking if a value is null.

Also.... Thanks for this amazing tool.

List number of resources & resources per page in API response

When sending a request to paginated endpoints such as listResources and getResourcesByAuthor, there is no way to know how many pages of resources there are without sending another request with a different page number and expecting an empty response (indicating a blank page).

This could be fixed by returning the total number of resources, and the number of resources per page (should this change in the future) in the API response.

Example GET index.php?action=getResourcesByAuthor&id=138900&page=1:

{
  "meta": {
    "total_items": "20",
    "items_per_page": "10"
  },
  "items": [
    {
      "id": "23696",
      "title": "Quests [1.8-1.17] | Set up goals for players",
      "tag": "Allow your players to do quests in return for rewards",
      "etc": "..."
    }
  ]
}

Identities privacy settings are discarded

In the privacy settings on the forums there is an option to choose who can view your identities. This option is discarded when accessing information through this API as one can perform the getAuthor action and view user's identities that one can't view on the forums.

Identities should be exposed via this API only if a user has set them visible to the public.

Add supported versions

It would be useful, if the getResource action would also return the "Tested Minecraft versions" output from a resource (Maybe either as a JSON array or as a comma-separated String)

It could perhaps be called something like mc_versions.

Endpoint to get resource list

It would be cool to have an endpoint similar to getResourcesByAuthor (maybe getResources) which returned a similar list as the author endpoint with all available resources (like the normal resource listing on the page does). It should include a parameter to specify the ordering as well as filtering for the category that gets displayed. (Edited to include all resources and have categories/sorting via parameter)

This would need some kind of pagination though as the list of resources would obviously be a lot longer than the author list and should probably not be all returned in one array.

Improve documentation

I need to thoroughly document all possible responses.

Notably I need to clarify that the native minecraft version might be formatted as a standard "decimal" (i.e. 1.16, 1.17) or it may appear as the word legacy which might be confusing to some (but hopefully, not an issue for too much longer if people will start updating.)

But I digress, I need to work on something a bit more comprehensive. Maybe on the Spigot Wiki or something?

Thoughts?

Wrong default icon

Hey! When you try to get the icon of a resource that doesn't have one, you get the link of the default one. Everything good on that, except that is showing the wrong default icon...

This is the default icon the API shows: https://www.spigotmc.org/styles/default/xenresource/resource_icon.png
But this is the one Spigot uses: https://static.spigotmc.org/styles/spigot/xenresource/resource_icon.png (or https://www.spigotmc.org/styles/spigot/xenresource/resource_icon.png) I'm not sure which URL you should use, probably the first one. For sure md_5 knows.

Thanks again.

`native_minecraft_version` and `supported_minecraft_versions` return null.

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.

The paginated pages in the api are in reverse order to spigot pages

Ok, so my resource AutoPivkup has 5 pages of updates. On spigot page "1" it contains the most recent updates and page "5" has the oldest updates for the plugin. When using &page=1 I get the 5th and oldest page of updates on spigot and when I use &page=5 I get the latest updates. The use of 1 &page=# should be changed to match the content on the same page as if you were viewing it on spigot.

https://api.spigotmc.org/simple/0.2/index.php?action=getResourceUpdates&id=70157&page=5
https://www.spigotmc.org/resources/autopickup-1-18-support.70157/updates?page=5

Add icon URL to getResource option

The getResource option should have an additional value, where the Icon URL of the resource is provided.
This could/should perhaps return the URL for the default resource icon, if none is set.

[Suggestion] Expose Resource Version in `getResourceUpdate` Response

Hello, I am very excited to see an official API for Spigot resources! Thank you for your hard work getting this up and running. My suggestion is for the getResourceUpdate route to return a field, containing the version of the resource update. This would be the same version as specified on the resource's "Version History" page. See below for an example.

Example

GET ?action=getResourceUpdate&id=17

{
  "id": "17",
  "resource_id": "2",
  "resource_version": "1.0",
  "title": "Added /lobby|/hub command",
  "message": "New commands.\n \n[LIST]\n[*]/hub\n[*]/lobby\n[/LIST]"
}

This field would be useful in several use cases that I am happy to elaborate on if needed. While adding any information to an API response is computationally expensive, I think this is an acceptable trade-off. Resource update versions cannot change (resource ID 17 will always have version 1.0), and this information is already pre-existing on the resource's page, the API just needs to fetch it.

Include category in endpoints returning resource information

It would be useful to include the name and id of the category of a resource in the different endpoints returning resource information. Currently the only thing that can be checked is if the resource is in the premium category or not by checking the price.

Include external download URL in resource information

It would be nice if the resource endpoints could include a field for the latest external download URL if that is set.

The thinking behind this is that downloading from Spigot directly via the api will most likely not happen for various reasons (see #7) so being able to at least access external downloads and then let them handle whether or not they want automatic downloads would be the next best option imo..

Currently that information is only accessible via the redirect of the download button link which of course is locked behind cloudflare. :S

Requests blocked

Hey!
Just noticed Spiget seems to be blocked from the API and receives 1020 CloudFlare errors as of recently.
Was wondering if you had some insight as to why that's happening?

Endpoints for authenticating an application with user credentials

Example:
https://api.spigotmc.org/simple/0.2/index.php?action=login&username=John&password=JohnsPassword123
The above url responds with something like this:

{
  "access-token": "9hu88asch90asf79hasf89hsh89ßadh98ßas",
  "expiration-date": "timestamp in miliseconds"
}

The returned access-token can then be used for following requests by the application to do stuff on behalf of the user or fetch private user information like the bought plugins.

Alternatively, we could do it similar to how GitHub does it, by letting the user create access-tokens with specified permissions on spigotmc.org when logged in. The user then gives that token to the application, so there is no need of sharing the actual credentials.

My use case would be the following:

I have been working on a software called AutoPlug for some time.
AutoPlug simplifies server maintenance and among other things, you can automatically update spigot plugins.
Since there is no rest-api for authenticating users I can't provide premium plugin updating for my users, but
I have found a way to simulate a headless browser via Java and use it to login my users to spigotmc.org.
But this method is quite time-consuming, resource intensive and unnecessary. So it would be really
advantageous for everyone if there was an endpoint like in the example above available.

Premium Verifier

It may be very useful a way to check if a premium resource DownloadID is valid

Ability To Verify Discord

Ik CabeBabe has a verification tool where you can link your spigot account to discord, would be cool if there was some sort of api so that we can implement that on our custom bots.
Not sure if this is outside the scope of this or not but I thought id post it here see what you guys think

Suggestion: improvements to getResourceUpdate

Hi there!

I am currently attempting to write an update notification system for one of my plugins. Old wikis point me to the legacy API endpoint, but I figured using this would be better.

While doing some testing I noticed that the getResourceUpdate action is rather confusing. This endpoint seemed most logical to use for checking for updates. Especially since the getResource does not have a field that gives you the ID of the last resource update.

Some of my notes:

getResourceUpdate includes the resource description

The first entry in the return array is the current resource page. This is not an update and is rather confusing. I would suggest removing this one from the response. Getting this information can already be done by using getResource.

No information about the pagination

The result is an array. This array can contain up to 10 results and is paginated. That's all clear. However, the max amount of pages is not sent. Getting the latest update would require going through all pages.
Edit: Noticed just that this is also referenced by issue #54
Deferring to #54 for the above.

No way of sorting the result

In order to get the last resource updates, it would be very useful to be able to sort it by resource updated descending.
This would allow users to get the last couple of updates.

See #64

Now I am not sure how achievable these suggestions are, but I wanted to point them out anyway! An action getLastResourceUpdate?resource= would also help greatly but I am not sure if would fit in with the current API.

I am well aware that getResource gives you the current version string, but if possible I would like to parse the update description in order to notify users of why they should actually update ;)

PS: I would love to help with this so if you want me to PR some of the features feel free to ask.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.