wynn.js

0.0.3 • Public • Published

Wynn.js

A wrapper library for the wynncraft api Currently does not cover all api endpoints

Example usage

Players

Get a specific player by username:

const wynn = require('wynn.js')

wynn.players.get('Hoi_A').then(player => {
  // returns object containing all player information as defined in the API Docs
}).catch(err => console.error(err))

Search for all players on wynncraft:

wynn.players.search('salte').then(results => {
  // returns array of usernames
}).catch(err => console.error(err))

Items

Listing items by category:

wynn.items.getCategoryItems('all').then(items => {
  // returns all items that belong to a category
}).catch(err => console.error(err))

let categories = wynn.items.getCategories() // Returns an array of possible categories
console.log(categories)

Search for an item by name:

wynn.items.search('harp').then(items => {
  // returns all items that have match the passed name
}).catch(err => console.error(err))

Readme

Keywords

none

Package Sidebar

Install

npm i wynn.js

Weekly Downloads

2

Version

0.0.3

License

AGPL-3.0

Unpacked Size

37.3 kB

Total Files

6

Last publish

Collaborators

  • hoi_a