Coder Social home page Coder Social logo

romvnly-gaming / restplaceholderapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fredthedoggy/restplaceholderapi

0.0 0.0 0.0 102 KB

A Rest API to Interface with PlaceholderAPI

Home Page: https://www.spigotmc.org/resources/rest-placeholderapi.90266/

License: GNU General Public License v3.0

Java 100.00%

restplaceholderapi's Introduction

What Is RestPlaceholderAPI?

RestPlaceholderAPI (RestPAPI) is a small lightweight plugin, that allows you to easily parse placeholders from an external application, like a Discord bot, or Forums.

โš ๏ธ Warning: RestPAPI Does nothing by itself, it just allows for external applications to parse placeholders via a simple Rest (http) API

Spigot Page / Downloads

https://www.spigotmc.org/resources/rest-placeholderapi.90266/

How Does it Work?

RestPAPI parses a specific placeholder, as a specific player when you make a Get request to your server, in the format: http://backend.ip: port//<placeholder-without-%>, so an example would be http://example.com:8080/da8a8993-adfa-4d29-99b1-9d0f62fbb78d/player_name (returns json containing "Fredthedoggy")

Security:

RestPAPI has a List of "Tokens" in the config (It starts with 2 randomly generated Java UUIDs, but can be changed). You must send the header "Token" with the value of one of the tokens in the config, or you will get a 401 (unauthorized) message.

Plugin Support:

While it supports placeholderAPI, allowing it to support most PlaceholderAPI supported plugins, some placeholders will return an empty string, due to the fact that they cannot parse as an offline player, but will work when the player is online

Example Responses:

{"status":"401","message":"Unauthorized"}

Without Authorization Header

{"status":"404","message":"Invalid URI"}

With The Wrong URL Scheme

{"status": "200", "message":"Fredthedoggy"}

Valid Placeholder (%player_name%)

restplaceholderapi's People

Contributors

dkim19375 avatar fredthedoggy avatar romvnly-gaming avatar

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.