posthog-openapi-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

Posthog OpenApi clients

Global configuration

export POSTHOG_PERSONAL_API_KEY=YOUR_POSTHOG_API_KEY
export POSTHOG_BASE_URL="https://eu.posthog.com" or export POSTHOG_BASE_URL="https://app.posthog.com"

Typescript NPM

Install

npm i posthog-openapi-client
yarn add posthog-openapi-client
pnpm install posthog-openapi-client

Setup

pnpm install
pnpm build

Usage

pnpm start

Developers

Regenerate client

Download the schema with an authenticated request:

wget https://app.posthog.com/api/schema/ -O schema.yaml

OR

wget https://eu.posthog.com/api/schema/ -O schema.yaml

Typescript

pnpx openapi-typescript-codegen --input schema.yaml --output client/typescript --name PosthogAPIClient

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i posthog-openapi-client

    Weekly Downloads

    134

    Version

    0.0.9

    License

    MIT

    Unpacked Size

    1.97 MB

    Total Files

    1194

    Last publish

    Collaborators

    • drakkarsoftware