Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drakkar-software/posthog-openapi-clients
Posthog api client. Only typescript for now
https://github.com/drakkar-software/posthog-openapi-clients
openapi posthog
Last synced: 2 months ago
JSON representation
Posthog api client. Only typescript for now
- Host: GitHub
- URL: https://github.com/drakkar-software/posthog-openapi-clients
- Owner: Drakkar-Software
- License: mit
- Created: 2023-12-01T21:22:32.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-10T19:24:22.000Z (5 months ago)
- Last Synced: 2024-11-08T09:17:59.302Z (3 months ago)
- Topics: openapi, posthog
- Language: TypeScript
- Homepage: https://posthog.com/docs/api
- Size: 463 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://img.shields.io/npm/v/posthog-openapi-client)](https://www.npmjs.com/package/posthog-openapi-client)
### 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
```