Elixir SDK for the Zazu API.
Response bodies are returned as-is from the API — snake_case string-keyed maps, no struct mapping. The same shape ships across every Zazu SDK (Ruby, TypeScript, Python, Go, ...) so the cassette contract is one-to-one.
{:ok, client} = Zazu.new(api_key: System.fetch_env!("ZAZU_API_KEY"))
{:ok, entity} = Zazu.Entity.get(client)
{:ok, page} = Zazu.Accounts.list(client)
for account <- page.data do
IO.puts("#{account["id"]} #{account["name"]}")
end
Summary
Functions
Builds a Zazu.Client. An API key is required — pass :api_key or set
ZAZU_API_KEY.
Same as new/1 but raises Zazu.ConfigurationError on invalid config.
The SDK version, sent in the User-Agent header.
Functions
@spec new(keyword()) :: {:ok, Zazu.Client.t()} | {:error, Zazu.ConfigurationError.t()}
Builds a Zazu.Client. An API key is required — pass :api_key or set
ZAZU_API_KEY.
Options
:api_key— the Zazu API key (default: theZAZU_API_KEYenv var). Sent asAuthorization: Bearer <key>.:base_url— the API base URL (default:ZAZU_BASE_URLorhttps://zazu.ma).:api_version— pins theZazu-Versionrequest header (default:ZAZU_API_VERSION).:timeout— receive timeout in milliseconds (default:30_000).
Returns {:ok, %Zazu.Client{}} or {:error, %Zazu.ConfigurationError{}}.
@spec new!(keyword()) :: Zazu.Client.t()
Same as new/1 but raises Zazu.ConfigurationError on invalid config.
@spec version() :: String.t()
The SDK version, sent in the User-Agent header.