View Source Hedgex.Env (hedgex v0.3.4)
Struct holding configuration + environment context.
Summary
Types
"https://us.posthog.com" | "https://eu.posthog.com" | your_instance
"https://us.i.posthog.com" | "https://eu.i.posthog.com" | your_instance
Functions
Construct a Req.Request for public API calls, e.g. capture
. Note that for public calls, the project API key still
needs to be passed in the body as part of the POST.
Types
@type private_endpoint() :: String.t()
"https://us.posthog.com" | "https://eu.posthog.com" | your_instance
@type public_endpoint() :: String.t()
"https://us.i.posthog.com" | "https://eu.i.posthog.com" | your_instance
@type t() :: %Hedgex.Env{ personal_api_key: String.t() | nil, private_endpoint: private_endpoint() | nil, project_api_key: String.t() | nil, public_endpoint: public_endpoint() | nil }
Functions
@spec public_req(t()) :: Req.Request.t()
Construct a Req.Request for public API calls, e.g. capture
. Note that for public calls, the project API key still
needs to be passed in the body as part of the POST.