StarlingBank (StarlingBank v1.0.0)

Copy Markdown View Source

A complete, production-grade Elixir client for the Starling Bank Public API.

StarlingBank is organized as one module per API domain, each implementing CRUD-style functions that mirror the underlying REST endpoints:

Configuration

config :starling_bank,
  access_token: {:system, "STARLING_ACCESS_TOKEN"},
  environment: :sandbox  # or :production

Or build an explicit client and pass it to any function:

client = StarlingBank.Client.new(access_token: "...", environment: :production)
{:ok, accounts} = StarlingBank.Accounts.list(client)

Every function returns {:ok, result} or {:error, %StarlingBank.Error{}}.

Telemetry

Every HTTP call emits [:starling_bank, :request, :start | :stop | :exception] telemetry events with %{method:, path:, environment:} metadata, suitable for attaching :telemetry_metrics or logging handlers.

Summary

Functions

client(opts \\ [])

@spec client(keyword()) :: StarlingBank.Client.t()

Convenience delegate: StarlingBank.client/1 builds a StarlingBank.Client.