Video
Access Comic Vine video content data from the Comic Vine API. Official API docs: /video | /videos
const video = client.video;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 |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<VideoDetails>
const video = await client.video.retrieve(12345);
// With field selectionconst video = await client.video.retrieve(12345, { fieldList: ['id', 'name', 'deck', 'lengthSeconds'],});interface VideoDetails { /** URL pointing to the video detail resource. */ apiDetailUrl: string; crew: null | string; /** Brief summary of the video. */ deck: string; embedPlayer: string; guid: string; /** URL to the High Res version of the video. */ highUrl: string; hosts: null | string; /** Unique ID of the video. */ id: number; /** Main image of the video. */ image: { [key: string]: null | string }; /** Length (in seconds) of the video. */ lengthSeconds: number; /** URL to the Low Res version of the video. */ lowUrl: string; /** Name of the video. */ name: string; premium: boolean; /** Date the video was published on Comic Vine. */ publishDate: Date; /** URL pointing to the video on Giant Bomb. */ siteDetailUrl: string; /** The video's filename. */ url: string; /** Author of the video. */ user: null | string; videoCategories: Array<SiteResource>; videoType: string; youtubeId: null | 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<VideoListItem>
const videos = await client.video.list();
// With auto paginationfor await (const video of client.video.list()) { console.log(video.name);}interface VideoListItem { /** URL pointing to the video detail resource. */ apiDetailUrl: string; crew: Crew | null; /** Brief summary of the video. */ deck: string; embedPlayer: string; guid: string; /** URL to the High Res version of the video. */ highUrl: string; hosts: Crew | null; /** Unique ID of the video. */ id: number; /** Main image of the video. */ image: { [key: string]: null | string }; /** Length (in seconds) of the video. */ lengthSeconds: number; /** URL to the Low Res version of the video. */ lowUrl: string; /** Name of the video. */ name: string; premium: boolean; /** Date the video was published on Comic Vine. */ publishDate: Date; /** URL pointing to the video on Giant Bomb. */ siteDetailUrl: string; /** The video's filename. */ url: string; /** Author of the video. */ user: Crew | null; videoCategories: Array<SiteResource>; videoType: VideoType | null; youtubeId: null | string;}
enum Crew { Aclarkp = 'aclarkp', Buddyhutton = 'buddyhutton', Cadamien = 'cadamien', Gmanfromheck = 'gmanfromheck', GmanfromheckRyanerikp = 'gmanfromheck, ryanerikp', GmanfromheckRyanerikpBuddyhutton = 'gmanfromheck, ryanerikp, buddyhutton', Inferiorego = 'inferiorego', Ryanerikp = 'ryanerikp', RyanerikpBuddyhutton = 'ryanerikp, buddyhutton',}
enum VideoType { Events = 'Events', Feature = 'Feature', FeatureEvents = 'Feature, Events', FeatureMysteryArtChallenge = 'Feature, Mystery Art Challenge', FeatureUnboxing = 'Feature, Unboxing', MysteryArtChallenge = 'Mystery Art Challenge', Review = 'Review', Trailer = 'Trailer', Unboxing = 'Unboxing',}