# 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

![](/files/lpOcb4AhgYtt2eLK3vDf)

## 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%}"

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mallusrgreat.gitbook.io/mallusrgreats-plugins/apimachine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
