npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easy-roblox-api

v2.0.1

Published

This package is an extremely easy package, to easily get data from the Roblox API.

Downloads

4

Readme

easy-roblox-api

This package is an extremely easy package, to easily get data from the Roblox API.

Installation

Install with NPM:

$ npm install easy-roblox-api

Version

The current version is v2.0.0 - which added the getGroup() function. This is the most stable and recommended version.

Quick Start

Information about a User

This will get a lot of data about user:

const roblox = require('easy-roblox-api');
roblox.getUser("Some rbx username", "username").then(response => {
   console.log(response); 
}).catch(() => {
  console.log("An error occured, most likely that user does't exist!");
});

/* This will log something like this:
{
  id: 1,
  username: 'John Doe',
  description: 'The users description here',
  status: 'The users status here',
  created: '2016-07-04T16:59:11.313Z',
  avatar_url: 'URL to an image of the user's avatar',
  friends: {
    count: 8,
    ids: [array-of-friends-ids]
  },
  followers: {
    count: 14,
    ids: [array-of-followers-ids]
  },
  following: {
    count: 69,
    ids: [array-of-followings-ids]
  }
}*/

As an alternative, you can get user information using an ID:

const roblox = require('easy-roblox-api');
roblox.getUser("140445252", "id").then(response => {
   console.log(response); 
});

If you leave the 2nd parameter of getUser empty, it will assume it is an ID.

Information about a Group

roblox.getGroup("some group", "name").then(res => {
    console.log(res);
}).catch(console.error);

/* This will log something like this:
{
  id: 1,
  name: 'Example name',
  description: 'Example group description',
  owner: { id: 4, username: 'John Doe' },
  membercount: undefined,
  thumbnail: 'some-url-to-a-png',
  shout: {
    content: 'omghi',
    created: '2021-03-11T19:09:57.3352677Z',
    author: { id: 4, username: 'John Doe' }
  },
  roles: [
    { id: 7, name: 'Some role name', membercount: 0 },
    { id: 69, name: 'Some other role name', membercount: 6 }
  ]
}
*/

Just like when getting user data, you can put id instead of name as parameter 2 when getting group data. ID is the default if none is provided.

Support

To get support using the package, report bugs, request updates, or any other sort of request, please use our GitHub issues page, where I will gladly help you.

Documentation

Documentation will be on the wiki on GitHub, but this is coming soon.