@habbzy/origins-api
v2.0.2
Published
A TypeScript-compatible runtime for the Habbo Origins API.
Downloads
199
Readme
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