JSPM

  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q57000F
  • License ISC

Cohost API wrapper

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 event
  • events.tickets(id) – Fetch tickets for an event
  • orders.fetch(id, uid) – Fetch an order

More endpoints coming soon.


🛠 Environment Requirements

  • Node.js 18 or later
  • An active Cohost API token

🗒️ Changelog

See the latest changes here.


🚧 Roadmap

Planned features and improvements are tracked here.


📄 License

ISC © Cohost