Get a tag
Log in to add to favouritesGet a tag by its id or provide options to find a tag by its label
Call signatures
get(id: string): Promise<Tag>;
get({
groupId: string;
label: string;
language?: string;
}: TagGetByLabelOptions): Promise<Tag>;
Parameters
Name | Type | Description |
---|---|---|
id | string | The tag GUID identifier |
options | TagGetByLabelOptions | An options object to find a tag in a known tag group by its label and in a specific language |
Returns
A Promise that will resolve with a Tag
Remarks
Throws any error that is returned by the API for any unsuccessful request echoing the HTTP status returned from the API
Examples
Get a tag by its GUID identifier
const tag = await client.tags.get("109eb3e9-98c9-5ab2-b9df-f1c80af3ac5c");
Get a tag from a specific tag group by its label and label's language
const tag = await client.tags.get({
groupId: "topics",
label: "Books",
language: "en-GB"
});