pointercrate
v0.1.0
Published
Unofficial Pointercrate API wrapper written in TypeScript
Downloads
4
Maintainers
Readme
PointercrateJS
Unofficial Pointercrate API wrapper written in TypeScript
Installation
Features
PointercrateJS contains function wrappers for 84% of endpoints, separated into classes. If you want to use a newly added endpoint that was not added to this library yet, use BasePointercrate#fetchRequest
or BaseAuthPointercrate#fetchAuthRequest
.
Example 1: Get info on Zettabyte by Jenkins
const { Pointercrate } = require("pointercrate");
const pointercrate = new Pointercrate();
console.log(pointercrate.getDemon(22)); // { body: { data: { ... } }, headers: { ... } }
console.log(pointercrate.getDemons({ name: "Zettabyte" })); // { body: [ { ... } ], headers: { ... } }
Example 2: Create account then log in
const { BasicAuthPointercrate } = require("pointercrate");
const pointercrate = new BasicAuthPointercrate("am9uZG91Z2g0NDQ6MjVjTWYzWDZlR1VIcTdrYQ=="); // jondough444:25cMf3X6eGUHq7ka
// Generated by passwordsgenerator.net
console.log(pointercrate.createAccount({ name: "jondough444", password: "25cMf3X6eGUHq7ka" })); // { body: { data: { ... } }, headers: { ... } }
console.log(pointercrate.loginAccount()); // { body: { data: { ... }, token: "<omitted>" }, headers: { ... } }
License
This project is licensed under the MIT License.