@punchline-analytics/sdk
v0.1.3
Published
Typed client for the Punchline Analytics API, generated from its OpenAPI spec.
Maintainers
Readme
@punchline-analytics/sdk
A typed client for the Punchline Analytics API. Its methods and types are generated from the same OpenAPI spec the API is tested against, so they always match. Works in Node.js 18+, Deno, Bun and edge runtimes: anywhere with fetch. No dependencies.
npm install @punchline-analytics/sdkimport { Punchline } from "@punchline-analytics/sdk";
const punchline = new Punchline({ apiKey: process.env.PUNCHLINE_API_KEY! });
const { results } = await punchline.query({
site_id: process.env.PUNCHLINE_SITE_ID!,
date_range: { from: "2026-09-01", to: "2026-09-30" },
metrics: ["sessions", "agent_share"],
dimensions: ["day"],
});Keep the key server-side. Full guide: TypeScript SDK.
MIT licensed.
