{"library":"stoat-api","title":"Revolt API Client & Types","type":"library","description":"The official JavaScript/TypeScript client library for the Revolt chat API (revolt-api). Current version 0.12.0 provides fully typed API request builder and TypeScript typings for all API objects. Ships with ESM and CommonJS support, includes built-in TypeScript declarations. Key differentiator: auto-generated from OpenAPI spec via @insertish/oapi, ensuring type safety for all endpoints and parameters. Developed by the Revolt team, follows semantic versioning.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install stoat-api"],"cli":null},"imports":["import { API } from 'revolt-api'","import type { User } from 'revolt-api'","import { API } from 'revolt-api'"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":"https://revolt.chat","github":"https://github.com/stoatchat/javascript-client-api","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/stoat-api","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import { API } from 'revolt-api';\n\nconst client = new API({ authentication: { revolt: process.env.REVOLT_TOKEN ?? '' } });\n\n// Fetch the current user\nclient.get('/users/@me')\n  .then(user => {\n    console.log(`Hello ${user.username}`);\n  })\n  .catch(err => console.error('Error:', err));\n\n// Send a message\nclient.post('/channels/some_channel_id/messages', {\n  content: 'Hello from stoat-api!'\n}).then(msg => console.log('Message sent:', msg.id));","lang":"typescript","description":"Shows initialization with optional authentication, fetching current user, and posting a message with full TypeScript types.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}