Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dwifte/robloxjs

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dwifte/robloxjs

Roblox API Wrapper written in NodeJS using fetch.

  • 1.2.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

RobloxJS

Roblox API written as a nodejs module.

How to install

npm i https://github.com/DwifteJB/RobloxJS

How to use

Requiring

const robloxjs = require("@dwifte/robloxjs")

Place Class

Get Details of Place

<a href=https://github.com/S0ftwareUpd8/roblox-api#get-place-details>API Documentation

(async () => {
    let Place = await new robloxjs.Place(2506738224) // Place ID
    let placeDetails = await Place.getDetails()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Settings of Place

<a href=https://github.com/S0ftwareUpd8/roblox-api#get-place-settings>API Documentation

(async () => {
    let Place = await new robloxjs.Place(2506738224) // Place ID
    let PlaceSettings = await Place.getSettings()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Universe ID of Place

<a href=https://github.com/S0ftwareUpd8/roblox-api#get-universe-containing-place>API Documentation

(async () => {
    let Place = await new robloxjs.Place(2506738224) // Place ID
    let UniverseJSON = await Place.getUniverse()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Game Instances

<a href=https://games.roblox.com/docs#!/GameInstances/get_v1_games_placeId_servers_serverType>API Documentation

(async () => {
    let Place = await new robloxjs.Place(2506738224) // Place ID
    let gameInstances = await Place.getGameInstances()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Player Class

Get Avatar Icons

<a href=https://thumbnails.roblox.com/docs#!/Avatar/get_v1_users_avatar_headshot>API DOCUMENTATION

(async () => {
    let Player = await new robloxjs.Player(1) // Player ID
    let onlineStatus = await Player.getAvatar()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!


(async () => {
    let Player = await new robloxjs.Player(1) // Player ID
    let onlineStatus = await Player.getAvatarBust()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!

    
(async () => {
    let Player = await new robloxjs.Player(1) // Player ID
    let onlineStatus = await Player.getAvatarHeadshot()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!

Get Online Status

<a href=https://github.com/S0ftwareUpd8/roblox-api#get-online-status-of-an-user>API DOCUMENTATION

(async () => {
    let Player = await new robloxjs.Player(1) // Player ID
    let onlineStatus = await Player.getOnlineStatus()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Player's Created Games

<a href=https://github.com/matthewdean/roblox-web-apis#get-a-users-profile-games>API DOCUMENTATION

(async () => {
    let Player = await new robloxjs.Player(1) // Player ID
    let createdGames = await Player.getCreatedGames()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Player's General Info

<a href=https://users.roblox.com/docs#!/Users/get_v1_users_userId>API DOCUMENTATION

(async () => {
    let Player = await new robloxjs.Player(1) // Player ID
    let generalInfo = await Player.getInfo()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Player's older Usernames

<a href=https://users.roblox.com/docs#!/Users/get_v1_users_userId>API DOCUMENTATION

(async () => {
    let Player = await new robloxjs.Player(1) // Player ID
    let olderUsernames = await Player.getOldUsernames()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Universe Class

How do I get a universe ID?

Well, simply use the Get Universe ID of Place section from the Player Class

Get all places connected to Universe

<a href=https://github.com/S0ftwareUpd8/roblox-api#get-places-in-an-universe>API DOCUMENTATION

(async () => {
    let Universe = await new robloxjs.Universe(1337) // Universe ID
    let UniversePlaces = await Universe.getPlaces()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Info

<a href=https://github.com/S0ftwareUpd8/roblox-api#get-info-about-an-universe>API DOCUMENTATION

(async () => {
    let Universe = await new robloxjs.Universe(1337) // Universe ID
    let UniverseInfo = await Universe.getInfo()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Get Price of Game

<a href=https://games.roblox.com/docs#!/Games/get_v1_games_games_product_info>API DOCUMENTATION

(async () => {
    let Universe = await new robloxjs.Universe(1337) // Universe ID
    let UniversePrices = await Universe.getPrice()
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Other Methods

Get IDs from Usernames

<a href=https://users.roblox.com/docs#!/Users/post_v1_usernames_users>API DOCUMENTATION

(async () => {
    let IDS = await robloxjs.getPlayerIDFromUsernames(["RobsPlayz", "Roblox"], false) // IDS IN ARRAY, EXCLUDE BANNED MEMBERS?
})(); // EVERYTHING MUST BE DONE IN AN ASYNC ENVIRONMENT!!

Special Thanks

Special thanks to <a href=https://github.com/S0ftwareUpd8/roblox-api>roblox-api & <a href=https://github.com/matthewdean/roblox-web-apis>roblox-web-apis for the documentation on the API

Keywords

FAQs

Package last updated on 11 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc