New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Badge request: Sponge plugin #4565
Comments
Thanks for the request and detailed info @pie-flavor!
Are you sure that's the case? It seems like an API key is required as part of the authentication call to create the session https://ore.spongepowered.org/api#/Authentification/authenticate |
Yes, it says:
If you run from PowerShell: $session = (irm https://ore.spongepowered.org/api/v2/authenticate -method post).session
$project = irm https://ore.spongepowered.org/api/v2/projects/luckperms -headers @{Authorization="OreApi session=`"$session`""} then you will get LuckPerms's project info with no API token required. |
I think if we were going to implement this, we'd want to find a way to cache the session so that we don't have to make 2 API requests to render every badge. |
Sessions seem to last for three hours, so it would indeed be beneficial to cache them. Storing the session key as property in the service class and getting a new one when it expires could be a simple way of handling this! @pie-flavor would you like to give this a go? We've got a nice little tutorial to get you going. 馃槈 |
馃搵 Description
These badges would be for Sponge plugins via Ore. They would be in the following formats (taking LuckPerms as an example):
馃敆 Data
Ore's public API is documented here. There's no API key required, although it requires a session to be created.
LuckPerms's API response looks like this:
URL: https://ore.spongepowered.org/api/v2/projects/luckperms
馃帳 Motivation
Sponge is a platform for server-side modding of Minecraft servers, and is Spigot's main competitor in that field. shields.io already has great badges for Spigot plugins via Spiget, but no such badges for Sponge plugins via Ore (the official plugin repository). This would allow Sponge plugin developers to display information in badge format about their Sponge plugins on GitHub or a documentation site.
The text was updated successfully, but these errors were encountered: