1.0.4 • Published 3 years ago

@apocalypsecalculator/pnw.js v1.0.4

Weekly downloads
19
License
Apache-2.0
Repository
github
Last release
3 years ago

pnw.js

A powerful Node.js library for easy interaction with the Politics and War API

To start using this library, simple do

npm install pnw.js

This library is Promise-based.

There is an api client, as well as a user client. Use the user client at your own risk as it may be against the game rules at any given moment.

Example usage of the API client:

const pnw = require('pnw.js');
const client = new pnw.APIClient('apikey');
client.keyInfo().then(info => {
   console.log(info.nation_id);
});

Example usage of the user client:

const pnw = require('pnw.js');
const userclient = new pnw.UserClient('email', 'password');
userclient.login().then(s => {
   userclient.commend(somenationid).then(res => {
      console.log(res);
   })
}).catch(err => console.log(err));

This is still under development, check back in a few days!

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago