# APIMachine

## Here's what you can do:

* Get players' last seen time.
* Set PlaceholderAPI placeholders as values

I think that's basically everything you need?\
LMK if you have any suggestions/bug reports

The plugin is extremely lightweight as of now, and I do not intend to keep it that way.

## Discord

Join my Discord [here](https://discord.gg/GGCqxwY2nQ) for any suggestions or bug reports, support, or even just to talk.

## Screenshots

![](https://1668668288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnPGsSo0EFLhCFAaVK5ji%2Fuploads%2FlHz8k19zUGcBAA2aFBLH%2Fimage.png?alt=media\&token=8b235544-57fd-472d-b702-b4a2314be8c2)

## Default Configuration

```yaml
# https://mallusrgreat.gitbook.io/mallusrgreats-plugins/
port: 4567
# ^^ The port the API will run on. If changed, requires restart.

# You can create custom endpoints here.
## INFO
##  require_player
##    If the endpoint requires a player. If you named the endpoint "hello", then the link will be "/api/hello/(username)" if it is set to true.
##    If true, the in-built placeholders "{username}" and "{last_seen}" are available.
##    The format of the in-built variable "{last_seen}" is yyyy/MM/dd HH:mm:ss
##  object
##    The actual keys and values to be specified in the object.
##    You can have PlaceholderAPI placeholder values using "{papi:%placeholder%}".
endpoints:
  users:
    require_player: true
    object:
      username: "{username}"
      last_seen: "{last_seen}"
      balance: "{papi:%vault_eco_balance%}"

  global:
    require_player: false
    object:
      server_name: "{papi:%server_name%}"

```
