Video Category
Access video category classification data from the Comic Vine API. Official API docs: /video_category | /video_categories
const videoCategory = client.videoCategory;Methods
Section titled “Methods”retrieve(id, options?)
Section titled “retrieve(id, options?)”Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id | number | Yes | The unique ID of the video category |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<VideoCategoryDetails>
const videoCategory = await client.videoCategory.retrieve(12345);
// With field selectionconst videoCategory = await client.videoCategory.retrieve(12345, { fieldList: ['id', 'name', 'deck'],});interface VideoCategoryDetails { /** URL pointing to the video_category detail resource. */ apiDetailUrl: string; /** Brief summary of the video_category. */ deck: null | string; /** Unique ID of the video_category. */ id: number; image: Image; /** Name of the video_category. */ name: string; /** URL pointing to the video_category on Giant Bomb. */ siteDetailUrl: string;}list(options?)
Section titled “list(options?)”Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
options.fieldList | string[] | No | Only return the specified fields |
options.limit | number | No | Number of results to return (default: 100) |
options.offset | number | No | Number of results to skip |
options.sort | SortOption | No | Sort field and direction |
options.filter | object | No | Filter results by field values |
Returns: Promise<PageData> & AsyncIterable<VideoCategoryListItem>
const videoCategories = await client.videoCategory.list();
// With auto paginationfor await (const videoCategory of client.videoCategory.list()) { console.log(videoCategory.name);}interface VideoCategoryListItem { /** URL pointing to the video_category detail resource. */ apiDetailUrl: string; /** Brief summary of the video_category. */ deck: null | string; /** Unique ID of the video_category. */ id: number; image: Image; /** Name of the video_category. */ name: string; /** URL pointing to the video_category on Giant Bomb. */ siteDetailUrl: string;}