Classes
Class: BlogTagsResource
Blog tags sub-resource
Blog tags sub-resource
Methods
getBySlug()
getBySlug(slug, options?): Promise<BlogTag>;
Get a single blog tag by its slug
Parameters
| Parameter | Type | Description |
|---|---|---|
slug | string | The tag slug |
options? | PreviewOption | - |
Returns
Promise<BlogTag>
The blog tag object
Throws
If the tag is not found
Example
const tag = await client.blog.tags.getBySlug('typescript')
console.log(tag.name)
list()
list(options?): Promise<BlogTag[]>;
List all blog tags
Parameters
| Parameter | Type |
|---|---|
options? | PreviewOption |
Returns
Promise<BlogTag>
Array of blog tags
Example
const tags = await client.blog.tags.list()
console.log(tags) // Array of tags

