OpenClawCases SDK for Elixir

openclawcases_sdk is the official Elixir SDK for the OpenClawCases API. It helps developers retrieve historical case data, inspect individual case records, and load aggregated reporting metrics.

The package is intentionally lightweight:

Installation

Add the dependency to your mix.exs:

def deps do
  [
    {:openclawcases_sdk, "~> 0.1.0"}
  ]
end

Then fetch dependencies:

mix deps.get

Quick Start

client =
  OpenclawcasesSDK.new(
    api_key: System.fetch_env!("OPENCLAWCASES_API_KEY")
  )

{:ok, response} =
  OpenclawcasesSDK.list_cases(client, params: %{limit: 20})

response.status
response.body

Built-In Helpers

List historical cases:

OpenclawcasesSDK.list_cases(client, params: %{limit: 25, industry: "retail"})

Fetch a case record:

OpenclawcasesSDK.get_case(client, "case_123")

Load a named report:

OpenclawcasesSDK.get_report(client, "weekly-summary")

Load aggregate statistics:

OpenclawcasesSDK.get_statistics(client, params: %{range: "90d"})

Configuration

The client accepts these options:

Generic Requests

You can still call lower-level helpers for endpoints not yet wrapped:

OpenclawcasesSDK.get(client, "/v1/datasets")
OpenclawcasesSDK.request(client, :post, "/v1/reports/custom", body: %{group_by: ["industry"]})

Publishing Notes

Before the next public release, update these items:

Official Links

License

MIT