Package Exports
- @cohostvip/cohost-node
Readme
@cohostvip/cohost-node
Official Node.js SDK for interacting with the Cohost API
✨ Features
- TypeScript-first API client
- Supports Node.js
>=18 - Automatically unwraps
{ status: 'ok', data: ... }responses - Supports ESM and CommonJS
📦 Installation
npm install @cohostvip/cohost-node
# or
pnpm add @cohostvip/cohost-node🧱 Usage
import { CohostClient } from '@cohostvip/cohost-node';
const client = new CohostClient({
token: 'your-api-token',
});
const event = await client.events.fetch('event-id');
const tickets = await client.events.tickets('event-id');
const order = await client.orders.fetch('order-id', 'user-id');🧩 API Coverage
This SDK currently supports:
events.fetch(id)– Fetch a single eventevents.tickets(id)– Fetch tickets for an eventorders.fetch(id, uid)– Fetch an order
More endpoints coming soon.
🛠 Environment Requirements
- Node.js 18 or later
- An active Cohost API token
📄 License
ISC © Cohost