Service for retrieving content tags.

Accessible via lynkow.tags. Tags are lightweight labels attached to blog articles for cross-cutting classification (unlike categories which are hierarchical). Responses are cached for 5 minutes (SHORT TTL).

Access via: lynkow.tags

Methods

2 methods

clearCache

TypeScript
clearCache(): void

Invalidates all cached tag responses. Call this after knowing tags have been updated to force fresh data on the next request.

Returns: void


list

TypeScript
list(options?: BaseRequestOptions): Promise<TagsListResponse>

Retrieves the complete list of tags available on the site. Returns all tags (no pagination). Cached for 5 minutes per locale.

Parameter

Type

Description

options

BaseRequestOptions

Request options; use locale to fetch localized tag names

Returns: Promise<TagsListResponse>

TypeScript
const { data } = await lynkow.tags.list()
data.forEach(tag => console.log(tag.name)) // "Featured", "Tutorial", etc.