pm-api-wrapper
v1.0.1
Published
PenguinMod API in an single package.
Downloads
2
Readme
PM API Wrapper
A Node.js wrapper for interacting with the PM API endpoints.
Installation
npm install pm-api-wrapper
Usage
Initialization
const pmAPI = require('pm-api-wrapper');
Functions
isBanned(options)
Check if a user is banned.
options.username
- The username of the user to check.
isViewable(options)
Check if a user's profile is viewable.
options.username
- The username of the user to check.
canRankup(options)
Check if a user can rank up.
options.username
- The username of the user to check.
isDonator(options)
Check if a user is a donator.
options.username
- The username of the user to check.
getRank(options)
Get the rank of a user.
options.username
- The username of the user to check.
getFollowers(options)
Get the number of followers of a user.
options.username
- The username of the user to check.
projectCount(options)
Get the number of projects of a user.
options.username
- The username of the user to check.
getBadges(options)
Get the badges of a user.
options.username
- The username of the user to check.
getThumbnail(options)
Get the thumbnail URL of a project.
options.id
- The ID of the project.
getPfp(options)
Get the profile picture URL of a user.
options.username
- The username of the user.
getProjects(options)
Get the projects of a user.
options.username
- The username of the user.
getFront()
Get the front page projects.
Example
const user = 'exampleUser';
(async () => {
try {
const isBanned = await pmAPI.isBanned({ username: user });
console.log(`${user}: ${isBanned}`);
} catch (error) {
console.error(error);
}
})();
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- This package uses Axios for making HTTP requests, any other package used will be listed here.