UNPKG

pointercrate

Version:

Unofficial Pointercrate API wrapper written in TypeScript

42 lines (33 loc) 2.06 kB
<div align="center"> <a href="https://bwbjustin.github.io/pointercratejs"><img src="https://i.imgur.com/j00aWdy.png" alt="PointercrateJS Logo"></a> <br> <a href="https://npm.im/pointercrate"><img alt="npm" src="https://img.shields.io/npm/v/pointercrate"></a> <a href="https://npm.im/pointercrate"><img alt="npm" src="https://img.shields.io/npm/dt/pointercrate"></a> <a href="https://npm.im/pointercrate"><img alt="NPM" src="https://img.shields.io/npm/l/pointercrate"></a> <br> <strong>Disclaimer: This library is not entirely finished yet!</strong> </div> # PointercrateJS Unofficial Pointercrate API wrapper written in TypeScript # Installation [![NPM](https://nodei.co/npm/pointercrate.png?mini=true)](https://nodei.co/npm/pointercrate) # 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 ```js 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 ```js 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: { ... } } ``` <!-- More examples soon I guess??? --> # License This project is licensed under the [MIT License](./LICENSE).