1.1.3 • Published 5 years ago

unofficial-dfapi v1.1.3

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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

const DF = require("unofficial-dfapi");
const client = new DF("your API key here");

Running commands

// 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

// 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.

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago