Mercury.Users (mercury_client v1.0.0)

Copy Markdown View Source

The Mercury Users API — platform users on the organization.

Summary

Functions

Returns a single user by ID. GET /users/{id}

Returns one page of users. GET /users

A lazy, auto-paginating stream of every user.

Functions

get(client, user_id)

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

Returns a single user by ID. GET /users/{id}

get!(client, user_id)

@spec get!(client :: Mercury.Client.t(), user_id :: String.t()) :: Mercury.User.t()

list(client, opts \\ [])

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

Returns one page of users. GET /users

list!(client, opts \\ [])

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

stream(client, opts \\ [])

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

A lazy, auto-paginating stream of every user.