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 🙏

© 2026 – Pkg Stats / Ryan Hefner

wired-api-wrapper-node

v1.0.6

Published

A lightweight TypeScript wrapper for Habbo's public API and WIRED variable endpoints.

Readme

wired-api-wrapper-node

A lightweight TypeScript wrapper for the Habbo public API and WIRED variable endpoints.

Installation

npm install wired-api-wrapper-node

Requires Node.js >= 18 (for the built-in global fetch). There are no runtime dependencies.

Basic Usage

Initializing the API Client

Import the primary API class and your desired hotel configuration:

import { HabboPublicAPI, Hotel } from 'wired-api-wrapper-node';

// Create an instance targeting the .COM hotel
const api = HabboPublicAPI.fromHotel(Hotel.COM);

Accessing Standard Endpoints

Once instantiated, use the resource methods to query public data, for example:

// Fetch achievements list
const achievements = await api.achievements().all();

// Fetch room details by ID
const room = await api.rooms().byId(roomId);

Wired Variables Endpoints

To interact with WIRED variables, call the variables() method on your API instance with the room ID and your read/write keys:

const varApi = api.variables(roomId, wiredReadKey, wiredWriteKey);

// Access variable data for the specified room
const allVarNames = await varApi.listAll();
const userVarProfile = await varApi.user().getProfileByUsername('WiredSpast');

Keep your keys out of source control. WIRED read/write keys should live in an untracked .env file (loaded with something like the dotenv package), never hardcoded directly in your source files. See examples/basicUsage.mts for the pattern - it deliberately uses placeholder key values rather than real ones.

Error Handling

API requests throw a HabboApiException on failure (non-2xx responses, or JSON/XML parsing failures), and let network/connection errors (DNS failures, timeouts, etc.) from the underlying fetch call propagate unwrapped. Wrap your calls in a try/catch block:

import { HabboApiException } from 'wired-api-typescript';

try {
  const room = await api.rooms().byId(roomId);
} catch (error) {
  if (error instanceof HabboApiException) {
    // Handle API-specific errors (e.g., 404 Not Found, 500 Server Error)
    console.error(error.statusCode, error.message, error.getResponseBody());
  } else {
    // Handle network or transport issues
    console.error(error);
  }
}

Supported Feature Overview

  • Public Endpoints:
    • Achievements
    • Badge owner count
    • Groups
    • Marketplace statistics
    • Ping
    • Rooms
    • Lists (hot looks)
    • Users
  • Variable Endpoints:
    • Read and manage permanent user variables
    • Read and manage permanent furni variables
    • Read and manage permanent global variables
  • Level-up System add-on: LevelUpper.linear(), LevelUpper.interpolate() and LevelUpper.exponential() mimic the WIRED Variable Add-on's level math.

License

MIT - see LICENSE.