/WynnAPI

an API Wrapper for the Wynncraft API.

Primary LanguageJavaScriptMIT LicenseMIT

WynnAPI

Introduction

This is an API Wrapper for the Wynncraft API, the docs can be found here. Please read the docs before reporting any issues.

Installing

Installing with npm:

npm i wynnapi

Getting Started

Basics

Creating a class:

const WynnAPI = require("wynnapi");
const wynn = new WynnAPI();
wynn.getPlayer("Player").then((player) => console.log(player));

Alternatively you can just call functions directly like this:

const WynnAPI = require("wynnapi");
new WynnAPI().getPlayer("Player").then((player) => console.log(player));

You can also do this:

const WynnAPI = require("wynnapi");
const wynn = new WynnAPI();

async function function_name(username) {
  const player = await wynn.getPlayer(username);
  console.log(player);
}

function_name("0xCosmic");

Examples

Examples can be found in the examples folder.

Response Codes

Response Codes and their meanings can be found here.