Meili.Client (Meili v0.1.0)

Copy Markdown View Source

Configuration client struct for interacting with Meilisearch.

Summary

Functions

Performs an HTTP request using the client's Req.Request instance.

Types

t()

@type t() :: %Meili.Client{
  key: String.t() | nil,
  req: Req.Request.t(),
  url: String.t()
}

Functions

new(opts \\ [])

Builds a new Meili.Client.

Options

  • :url or :endpoint - The Meilisearch base URL (default: http://localhost:7700).
  • :key or :api_key - The API key or master key for authentication.
  • :req_options - Custom configuration options passed directly to Req.new/1.

request(client, method, path, opts \\ [])

Performs an HTTP request using the client's Req.Request instance.

request!(client, method, path, opts \\ [])

Same as request/4 but raises a Meili.Error on failure.