Movie
Access comic book movie data from the Comic Vine API. Official API docs: /movie | /movies
const movie = client.movie;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 movie |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<MovieDetails>
const movie = await client.movie.retrieve(12345);
// With field selectionconst movie = await client.movie.retrieve(12345, { fieldList: ['id', 'name', 'releaseDate', 'rating'],});interface MovieDetails { /** URL pointing to the movie detail resource. */ apiDetailUrl: string; /** The total revenue made in the box offices for this movie. */ boxOfficeRevenue: null | string; /** The cost of making this movie. */ budget: string; /** Characters related to the movie. */ characters: Array<SiteResource>; /** Concepts related to the movie. */ concepts: Array<SiteResource>; /** Date the movie was added to Comic Vine. */ dateAdded: Date; /** Date the movie was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the movie. */ deck: string; /** Description of the movie. */ description: null | string; hasStaffReview: null | false | SiteResource; /** Unique ID of the movie. */ id: number; /** Main image of the movie. */ image: Image; /** Locations related to the movie. */ locations: Array<SiteResource>; /** Name of the movie. */ name: string; objects: Array<SiteResource>; /** The producers of this movie. */ producers: Array<SiteResource>; /** The rating of this movie. */ rating: string; /** Date of the movie. */ releaseDate: Date; /** The length of this movie. */ runtime: string; /** URL pointing to the movie on Giant Bomb. */ siteDetailUrl: string; studios: Array<SiteResource>; /** List of teams this movie is a member of. */ teams: Array<SiteResource>; /** Total revenue generated by this movie. */ totalRevenue: string; /** Writers for this movie. */ writers: Array<SiteResource>;}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<MovieListItem>
const movies = await client.movie.list();
// With auto paginationfor await (const movie of client.movie.list()) { console.log(movie.name);}interface MovieListItem { /** URL pointing to the movie detail resource. */ apiDetailUrl: string; /** The total revenue made in the box offices for this movie. */ boxOfficeRevenue: null | string; /** The cost of making this movie. */ budget: null | string; /** Date the movie was added to Comic Vine. */ dateAdded: Date; /** Date the movie was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the movie. */ deck: null | string; /** Description of the movie. */ description: null | string; hasStaffReview: null | false | SiteResource; /** Unique ID of the movie. */ id: number; /** Main image of the movie. */ image: Image; /** Name of the movie. */ name: string; /** The producers of this movie. */ producers: Array<SiteResource>; /** The rating of this movie. */ rating: null | string; /** Date of the movie. */ releaseDate: Date; /** The length of this movie. */ runtime: string; /** URL pointing to the movie on Giant Bomb. */ siteDetailUrl: string; studios: Array<SiteResource>; /** Total revenue generated by this movie. */ totalRevenue: null | string; /** Writers for this movie. */ writers: Array<SiteResource>;}