UNPKG

blox-api

Version:

Roblox web API wrapper for Node.js

66 lines (65 loc) 1.72 kB
import { IRobloxSession } from ".."; /** * A roleset for a Roblox group */ export interface IRoleset { id: number; name: string; rank: number; memberCount: number; } /** * A reference to a Roblox group */ export declare class GroupReference { /** * Session used for authenticating API calls */ private session; /** * ID of the group on Roblox */ groupId: number; /** * Create a new [[GroupReference]] * * @param groupId The ID of the group on Roblox * @param session A session used for authenticating API calls */ constructor(groupId: number, session: IRobloxSession); /** * Get a list of rolesets within the group */ getRoles(): Promise<Array<IRoleset>>; /** * Get the roleset of a group corresponding to a specific rank * * @param rank Rank of the roleset */ getRolesetByRank(rank: number): Promise<IRoleset | undefined>; /** * Updates a user's rank in the group to a new rank * * @param userId ID of the user to update * @param newRank New rank for the user */ setUserRank(userId: number, newRank: number): Promise<void>; /** * Exiles a user from the group * * @param userId User to exile */ exileUser(userId: number): Promise<void>; /** * Get the internal join request ID for a specific user * * @param username Username of the pending user */ getJoinRequestId(username: string): Promise<string | undefined>; /** * Accept a user's request to join a group * * @param username Username of the pending user */ acceptJoinRequest(username: string): Promise<void>; }