Meili.Batch (Meili v0.1.2)

Copy Markdown View Source

Manages Meilisearch task batches.

Summary

Functions

Retrieves a single batch by UID.

Retrieves a single batch, raising on error.

Lists all task batches.

Lists all task batches, raising on error.

Functions

get(client_or_uid, uid_or_nil \\ nil)

@spec get(Meili.Client.t() | integer() | String.t(), integer() | String.t() | nil) ::
  {:ok, map()} | {:error, Meili.Error.t()}

Retrieves a single batch by UID.

Examples

Meili.Batch.get(1)
Meili.Batch.get(client, 1)

get!(client_or_uid, uid_or_nil \\ nil)

@spec get!(Meili.Client.t() | integer() | String.t(), integer() | String.t() | nil) ::
  map() | no_return()

Retrieves a single batch, raising on error.

list(client_or_opts \\ nil, opts \\ [])

@spec list(Meili.Client.t() | Keyword.t() | nil, Keyword.t()) ::
  {:ok, map()} | {:error, Meili.Error.t()}

Lists all task batches.

Supports optional query params for filtering and pagination.

Examples

Meili.Batch.list()
Meili.Batch.list(limit: 5)
Meili.Batch.list(client, limit: 5)

list!(client_or_opts \\ nil, opts \\ [])

@spec list!(Meili.Client.t() | Keyword.t() | nil, Keyword.t()) :: map() | no_return()

Lists all task batches, raising on error.