Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.11 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.11 KB

Weasel.js

Weasel is a wrapper for the Warcraft Logs API. The name Weasel comes from the sites abbreviation WCL that could be pronounced 'Weasel'... I guess. :)

Installing with NPM

npm install weasel.js

Usage

const api = require('weasel.js');

//Set the public WCL api-key that you get from https://www.warcraftlogs.com/accounts/changeuser
api.setApiKey('abcd123abcd123abcd123abcd123abcd123');

//Optional parameters for the api call.
var params = {};

//Call the function to list guild reports, can be filtered on start time and end time as a UNIX timestamp with the optional parameters @params.
api.getReportsGuild('carpe cerevisi', 'moonglade', 'eu', params, function(err, data) {

    if (err) {
    //We caught an error, log the error object to the console and exit.
        console.log(err);
        return;
    }
    //Success, log the whole data object to the console.
    console.log(data);
});

Wrapper functions and details

Check out the documentation found at the GitHub doc page.