View Source LumaaiEx.Client (lumaai_ex v0.1.0)
HTTP client for making requests to the Luma Labs API.
This module provides a low-level interface for sending HTTP requests to the Luma Labs API. It handles authentication and basic error handling.
Summary
Functions
Sends a request to the Luma Labs API.
Functions
Link to this function
request(client, method, path, body \\ "", headers \\ [], opts \\ [])
View Source@spec request( LumaaiEx.Config.t(), atom(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, map()} | {:error, map()}
Sends a request to the Luma Labs API.
Parameters
- config: A
LumaaiEx.Config
struct containing API configuration. - method: The HTTP method as an atom (e.g., :get, :post).
- path: The API endpoint path.
- body: The request body (default: "").
- headers: Additional headers (default: []).
- opts: Additional options for HTTPoison (default: []).
Returns
{:ok, response}
on success.{:error, reason}
on failure.