@distilled.cloud/posthog
v1.0.0-rc.16
Published
Keywords
Readme
@distilled.cloud/posthog
Effect-native SDK for posthog.
Installation
npm install @distilled.cloud/posthog effectQuick start
import { Effect, Layer } from "effect";
import * as FetchHttpClient from "effect/http/FetchHttpClient";
import * as PostHog from "@distilled.cloud/posthog";
const program = Effect.gen(function* () {
const result = yield* PostHog.account_relationship_definitions.listAccountRelationshipDefinitions({});
return result;
});
const Live = Layer.mergeAll(
FetchHttpClient.layer,
PostHog.CredentialsFromEnv,
PostHog.PosthogProtocol,
);
program.pipe(Effect.provide(Live), Effect.runPromise);Auth
Required: POSTHOG_API_KEY, POSTHOG_HOST. Sent as Authorization: Bearer.
