Upload and manage an account's image library (used for product catalog and line-item visuals). Up to 16 MB, PNG/JPG/WebP, no duplicates.
Summary
Functions
Deletes an image.
Gets metadata for a single image.
Lists image metadata for an account.
Replaces the binary content of an existing image.
Updates an image's metadata (e.g. its display name).
Uploads an image.
Functions
@spec delete(Moov.Client.t(), String.t(), String.t()) :: {:ok, term()} | {:error, Moov.Error.t()}
Deletes an image.
@spec get(Moov.Client.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Moov.Error.t()}
Gets metadata for a single image.
@spec list(Moov.Client.t(), String.t(), keyword()) :: {:ok, [map()]} | {:error, Moov.Error.t()}
Lists image metadata for an account.
@spec replace(Moov.Client.t(), String.t(), String.t(), binary(), keyword()) :: {:ok, map()} | {:error, Moov.Error.t()}
Replaces the binary content of an existing image.
@spec update_metadata(Moov.Client.t(), String.t(), String.t(), map()) :: {:ok, map()} | {:error, Moov.Error.t()}
Updates an image's metadata (e.g. its display name).
@spec upload(Moov.Client.t(), String.t(), binary(), keyword()) :: {:ok, map()} | {:error, Moov.Error.t()}
Uploads an image.
Moov.Images.upload(client, account_id, File.read!("logo.png"),
filename: "logo.png",
content_type: "image/png"
)