Labels — the campaign tags posts are grouped and reported by.
Summary
Functions
Adds a label to a workspace.
Same as create/2, but raises FoPost.Error.
Removes a label and unlinks it from every post carrying it.
Same as delete/2, but raises FoPost.Error.
One label.
Same as get/2, but raises FoPost.Error.
The labels the key can reach, optionally narrowed with :workspace_id.
Same as list/2, but raises FoPost.Error.
Renames or recolors a label. Both :name and :color are required.
Same as update/3, but raises FoPost.Error.
Functions
@spec create( FoPost.Client.t(), keyword() ) :: {:ok, FoPost.Label.t()} | {:error, FoPost.Error.t()}
Adds a label to a workspace.
Required: :workspace_id, :name, :color. :color is a hex value, e.g. "#2563eb".
Same as create/2, but raises FoPost.Error.
@spec delete(FoPost.Client.t(), String.t()) :: {:ok, FoPost.Message.t()} | {:error, FoPost.Error.t()}
Removes a label and unlinks it from every post carrying it.
Same as delete/2, but raises FoPost.Error.
@spec get(FoPost.Client.t(), String.t()) :: {:ok, FoPost.Label.t()} | {:error, FoPost.Error.t()}
One label.
Same as get/2, but raises FoPost.Error.
@spec list( FoPost.Client.t(), keyword() ) :: {:ok, [FoPost.Label.t()]} | {:error, FoPost.Error.t()}
The labels the key can reach, optionally narrowed with :workspace_id.
Same as list/2, but raises FoPost.Error.
@spec update(FoPost.Client.t(), String.t(), keyword()) :: {:ok, FoPost.Label.t()} | {:error, FoPost.Error.t()}
Renames or recolors a label. Both :name and :color are required.
Same as update/3, but raises FoPost.Error.