ArchAstro.V1.Threads.Tags (archastro v0.2.0)

Copy Markdown

Tag API resource.

Summary

Functions

Add tags to a thread

Remove tags from a thread

Replace a thread's tags

Functions

create(client, thread, input)

Add tags to a thread

Adds one or more status tags to the thread and returns the updated thread.

Any participant of the thread — a human member or an agent member — may edit tags; this is broader than the owner/admin permission required to update other thread fields. Adding a tag the thread already has is a no-op. Tags are normalized (trimmed and lowercased) and may contain only lowercase letters, numbers, hyphens, and underscores.

The thread object after the tags were added.

remove(client, thread)

@spec remove(ArchAstro.Client.t(), String.t()) ::
  {:ok, ArchAstro.Types.Thread.t()} | {:error, ArchAstro.Error.reason()}

Remove tags from a thread

Removes one or more status tags from the thread and returns the updated thread. Removing a tag the thread does not have is a no-op.

Any participant of the thread — a human member or an agent member — may edit tags. Supply the tags to remove as repeated query parameters, e.g. ?tags[]=blocked&tags[]=needs-review.

The thread object after the tags were removed.

replace(client, thread, input)

Replace a thread's tags

Replaces the thread's entire set of status tags with the provided list and returns the updated thread. Passing an empty array clears all tags.

Any participant of the thread — a human member or an agent member — may edit tags. Tags are normalized (trimmed and lowercased) and may contain only lowercase letters, numbers, hyphens, and underscores.

The thread object after its tags were replaced.