js-blox
v1.0.0
Published
A lightweight Node.js wrapper for Roblox public APIs to fetch user data, game info, avatars, and thumbnails.
Maintainers
Readme
🎮 Roblox API Helper
A lightweight Node.js wrapper for Roblox public APIs to fetch user data, game info, avatars, and thumbnails.
📦 Installation
npm install js-blox🚀 Usage
const roblox = require('js-blox');
// Get user by username
roblox.getUserByUsername('Builderman')
.then(user => console.log(user))
.catch(err => console.error(err));
// Get user by ID
roblox.getUserById(156)
.then(user => console.log(user))
.catch(err => console.error(err));
// Get game information
roblox.getUniverseInfo(1234567)
.then(game => console.log(game))
.catch(err => console.error(err));
// Get user avatar headshot
roblox.getUserHeadshot(156)
.then(thumbnail => console.log(thumbnail))
.catch(err => console.error(err));📚 API Reference
User Functions
getUserByUsername(username)- Get user info by usernameusername(string): Roblox username- Returns: Promise with user data
getUserById(userId)- Get user info by IDuserId(number): Roblox user ID- Returns: Promise with user data
getUserPresence(userId)- Get user's online presenceuserId(number): Roblox user ID- Returns: Promise with presence data
Game Functions
getUniverseInfo(universeId)- Get game/universe informationuniverseId(number): Roblox universe ID- Returns: Promise with universe data
getPlaceInfo(placeId)- Get place informationplaceId(number): Roblox place ID- Returns: Promise with place data
Avatar Functions
getUserAvatar(userId)- Get user's avatar datauserId(number): Roblox user ID- Returns: Promise with avatar data
getCurrentlyWearing(userId)- Get items user is currently wearinguserId(number): Roblox user ID- Returns: Promise with wearing items data
Thumbnail Functions
getGameThumbnail(universeId, size?)- Get game thumbnailuniverseId(number): Roblox universe IDsize(string, optional): Thumbnail size (default: "512x512")- Returns: Promise with thumbnail data
getUserHeadshot(userId, size?)- Get user avatar headshotuserId(number): Roblox user IDsize(string, optional): Thumbnail size (default: "150x150")- Returns: Promise with thumbnail data
getUserBust(userId, size?)- Get user avatar bustuserId(number): Roblox user IDsize(string, optional): Thumbnail size (default: "150x150")- Returns: Promise with thumbnail data
getUserFullBody(userId, size?)- Get full user avataruserId(number): Roblox user IDsize(string, optional): Thumbnail size (default: "420x420")- Returns: Promise with thumbnail data
📁 Project Structure
roblox-api-helper/
├── api/
│ ├── users.js # User-related functions
│ ├── games.js # Game-related functions
│ ├── avatars.js # Avatar-related functions
│ └── thumbnails.js # Thumbnail-related functions
├── utils/
│ └── request.js # HTTP request utility
├── index.js # Main entry point
├── package.json
└── README.md⚠️ Disclaimer
This package is not affiliated with or endorsed by Roblox Corporation. Use at your own risk and respect Roblox's Terms of Service and API usage guidelines.
