Skip to content

TypeScript bindings for the Habbo Origins API.

License

Notifications You must be signed in to change notification settings

habbzy/origins-api

Repository files navigation

Habbzy Logo
NPM Discord GPL-3.0-only

TypeScript bindings for the Habbo Origins API

Why? Well, at Habbzy we need to interact with the various public Origins APIs to pull in BattleBall matches, verify Habbo identities and so on. So we're publishing our actively maintained bindings!

  • Fully ESM
  • Actively maintained
  • Zero dependencies
  • TypeScript-first

Installation

npm install @habbzy/origins-api # npm
yarn add @habbzy/origins-api    # yarn
bun add @habbzy/origins-api     # bun
pnpm add @habbzy/origins-api    # pnpm

Usage

Habbo Origins Imager

import { avatarImageUrl } from '@habbzy/origins-api';

const imageUrl = await avatarImageUrl('Evil', {
  size: 'big',
  direction: 'sw',
  headDirection: 'sw',
  action: 'stand',
  gesture: 'smile',
});

NOTE: Currently, the figureString from the public Origins API is borked and will return weird color/hat data - I've checked with Macklebee and this is on his to-do list to fix.

Habbo Origins API

import { battleballMatch, avatar } from '@habbzy/origins-api';

const evil = await avatar('Evil');
// evil?.motto

const match = await battleballMatch('gm-hhous-2a66d6af519b206c014284436b4beec3');
// match?.info?.gameCreation

Sponsor this project