Skip to content

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

License

Notifications You must be signed in to change notification settings

Orbis-Software-Services/pnw.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pnw.js

UPDATE! This library will be entirely reconstructed

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

Notice: This is still under development

To start using this library, simple do

npm install @apocalypsecalculator/pnw.js

(I will unscope this package later)

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!

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published