TypeSafeAPISDK.Client (TypeSafeAPISDK v0.1.0)

Copy Markdown View Source

Thin TypeSafe API client layered on Pristine.

Runtime code reads application configuration only. The included runtime.exs maps the standard TypeSafe environment variables when this repository is the top-level Mix project.

Summary

Types

t()

@type t() :: %TypeSafeAPISDK.Client{
  api_key: String.t(),
  base_url: String.t(),
  context: Pristine.SDK.Context.t(),
  default_model: String.t(),
  headers: map(),
  pristine_client: Pristine.Client.t(),
  retry: TypeSafeAPISDK.RetryPolicy.t() | false,
  timeout_ms: pos_integer(),
  transport: module(),
  transport_opts: keyword()
}

Functions

extra_headers(opts)

@spec extra_headers(keyword()) :: map()

new(opts \\ [])

@spec new(keyword()) :: t()

pristine_client(client)

@spec pristine_client(t()) :: Pristine.Client.t()