Mercury.Events (mercury_client v1.0.0)

Copy Markdown View Source

The Mercury Events API — an audit log of account and org changes.

Summary

Functions

Returns a single event by ID. GET /events/{id}

Returns one page of events. GET /events

A lazy, auto-paginating stream of every event.

Functions

get(client, event_id)

@spec get(client :: Mercury.Client.t(), event_id :: String.t()) ::
  {:ok, Mercury.Event.t()} | {:error, Exception.t()}

Returns a single event by ID. GET /events/{id}

get!(client, event_id)

@spec get!(client :: Mercury.Client.t(), event_id :: String.t()) :: Mercury.Event.t()

list(client, opts \\ [])

@spec list(client :: Mercury.Client.t(), opts :: keyword()) ::
  {:ok, Mercury.Page.t(Mercury.Event.t())} | {:error, Exception.t()}

Returns one page of events. GET /events

list!(client, opts \\ [])

@spec list!(client :: Mercury.Client.t(), opts :: keyword()) ::
  Mercury.Page.t(Mercury.Event.t())

stream(client, opts \\ [])

@spec stream(client :: Mercury.Client.t(), opts :: keyword()) :: Enumerable.t()

A lazy, auto-paginating stream of every event.