getTags
Retrieve all tags from your Raindrop.io collections to organize and manage bookmarks efficiently. Filter tags by collection to streamline your workflow.
Instructions
Get all tags
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionId | No | Filter tags by collection |
Implementation Reference
- src/services/raindrop.service.ts:251-258 (handler)The core handler function implementing getTags, which fetches tags from the Raindrop.io API for a specific collection (if provided) or all tags. Uses the OpenAPI client to make the appropriate GET request to /tags/{collectionId} or /tags/0.async getTags(collectionId?: number): Promise<{ _id: string; count: number }[]> { const endpoint = collectionId ? '/tags/{collectionId}' : '/tags/0'; const options = collectionId ? { params: { path: { id: collectionId } } } : undefined; const { data } = await (this.client as any).GET(endpoint, options); return data?.items || []; }
- Helper wrapper that calls getTags specifically for a collection ID.async getTagsByCollection(collectionId: number): Promise<{ _id: string; count: number }[]> { return this.getTags(collectionId); }
- Zod schema defining the structure of tag objects returned by getTags.export const tagSchema = z.object({ _id: z.string(), count: z.number().optional(), name: z.string().optional(), });