# unofficial-dfapi

> A wrapper for the unofficial API for the DiamondFire Minecraft server.

Latest version **1.1.3** (published 2019-03-30) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install unofficial-dfapi
pnpm add unofficial-dfapi
yarn add unofficial-dfapi
bun add unofficial-dfapi
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2019-03-30 |
| First published | 2019-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | iamthe32bit |
| Keywords | diamondfire, dfapi |

## Links

- npm: https://www.npmjs.com/package/unofficial-dfapi
- npm.io page: https://npm.io/package/unofficial-dfapi

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.88.0

## Recent versions

- 1.1.3 (latest) — 2019-03-30
- 1.1.2 — 2019-03-21
- 1.1.1 — 2019-02-16
- 1.1.0 — 2019-02-14
- 1.0.2 — 2019-02-13
- 1.0.1 — 2019-02-13
- 1.0.0 — 2019-02-13

## README

# unofficial-dfapi

The wrapper for the unofficial DiamondFire API

### Docs

These docs are actually just examples, because I'm too lazy to write actual documentation. Cheers!

#### Initialization

```js
const DF = require("unofficial-dfapi");
const client = new DF("your API key here");
```

#### Running commands
```js
// code from above
client.request({
command: "dfapi_run",
plot: 666
}).then(response => {
    console.log(response); // dab
}).catch(err => {
    console.error(err); // Invalid Authorization header
                        // The API key is incorrect.
});
```

#### Events
```js
// code from above
client.on("queued", data => {
   console.log(data); // https://diamondfire.glitch.me/send-message?command=dfapi_run&plot=666
});
client.on("response", res => {
   console.log(res.statusCode); // 200 
});
```

If you need more help, join the [DFAPI Discord server](https://i-watch-ani.me/derpy).

---
_Source: https://npm.io/package/unofficial-dfapi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
