0.0.3 • Published 7 years ago

minecraft-jsonapi v0.0.3

Weekly downloads
3
License
UNLICENCED
Repository
github
Last release
7 years ago

Features

Simple yet powerful minecraft JSONAPI module

Actual real life documentation

Documentation

Method docs

rest

Usage

Import

const Minecraft = require("minecraft-jsonapi");

Options

const options = {
  host: "127.0.0.1",
  port: "25565",
  https: false,
  username: "username",
  password: "password",
};

Rest Call

const minecraft = Minecraft.createRequest();

const resultPromise = minecraft.add("server.performance").dispatch(options);

resultPromise.then(console.log).catch(console.error);

Streaming API

const minecraft = Minecraft.createRequest();

minecraft.add("console", []).add("chat", []).follow(options, console.log)