E2bEx.Tags (E2bEx v0.1.0)

Copy Markdown View Source

Template tag operations.

Every function takes an E2bEx.Client as the first argument.

Summary

Functions

Assign tags to a template build (POST /templates/tags).

Delete tags from a template (DELETE /templates/tags).

List all tags for a template (GET /templates/:id/tags).

Functions

add(client, target, tags)

@spec add(E2bEx.Client.t(), String.t(), [String.t()]) ::
  {:ok, map()} | {:error, E2bEx.Error.t()}

Assign tags to a template build (POST /templates/tags).

target is a "name:tag" string. Returns the raw AssignedTemplateTags map (tags, buildID).

delete(client, name, tags)

@spec delete(E2bEx.Client.t(), String.t(), [String.t()]) ::
  :ok | {:error, E2bEx.Error.t()}

Delete tags from a template (DELETE /templates/tags).

list(client, template_id)

@spec list(E2bEx.Client.t(), String.t()) ::
  {:ok, [E2bEx.TemplateTag.t()]} | {:error, E2bEx.Error.t()}

List all tags for a template (GET /templates/:id/tags).