Hoody SDK
TypeScript & JavaScript SDK for the Hoody platform
Install
npm i hoody-sdk
Use it
import { HoodyClient } from 'hoody-sdk'; const hoody = await HoodyClient.authenticate('https://api.hoody.icu', { username, password, }); const { data: me } = await hoody.api.authentication.getCurrentUser();
In the browser
<script src="https://cdn.jsdelivr.net/npm/hoody-sdk/dist/hoody-sdk.browser.min.js"> </script> <script> const { HoodyClient } = window.HoodySDK; const hoody = new HoodyClient({ baseURL: 'https://api.hoody.icu', token }); </script>
Or as an ES module:
import { HoodyClient } from "https://cdn.jsdelivr.net/npm/hoody-sdk/dist/hoody-sdk.browser.esm.js";
Pin a version in production. The unpinned URLs above always resolve to the newest release, which means your code can change without you changing it. Append @<version> once you ship — the current version is on the package's npm page.
A token in browser storage is a bearer credential — treat it like a password. Don't put account-wide credentials in a static page; mint a short-lived, narrowly-scoped token from your own backend instead.
Also included
This package ships the hoody command as well, so npx hoody-sdk runs the CLI without installing anything.