Series
Access TV series data from the Comic Vine API. Official API docs: /series | /series_list
const series = client.series;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 series |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<SeriesDetails>
const series = await client.series.retrieve(12345);
// With field selectionconst series = await client.series.retrieve(12345, { fieldList: ['id', 'name', 'startYear', 'countOfEpisodes'],});interface SeriesDetails { /** List of aliases the series is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the series detail resource. */ apiDetailUrl: string; /** A list of characters that appear in this series. */ characters: Array<SiteResourceWithCount>; /** Number of episodes included in this series. */ countOfEpisodes: number; /** Date the series was added to Comic Vine. */ dateAdded: Date; /** Date the series was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the series. */ deck: null | string; /** Description of the series. */ description: string; episodes: Array<EpisodeSiteResource>; /** The first episode in this series. */ firstEpisode: EpisodeApiResource; /** Unique ID of the series. */ id: number; /** Main image of the series. */ image: Image; /** The last episode in this series. */ lastEpisode: EpisodeApiResource; /** Name of the series. */ name: string; /** The primary publisher a series is attached to. */ publisher: ApiResource | null; /** URL pointing to the series on Giant Bomb. */ siteDetailUrl: string; /** The first year this series appeared in comics. */ startYear: 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<SeriesListItem>
const seriesList = await client.series.list();
// With auto paginationfor await (const series of client.series.list()) { console.log(series.name);}interface SeriesListItem { aliases: null | string; apiDetailUrl: string; countOfEpisodes: number; dateAdded: Date; dateLastUpdated: Date; deck: null | string; description: null | string; firstEpisode: EpisodeApiResource; id: number; image: Image; lastEpisode: EpisodeApiResource; name: string; publisher: ApiResource | null; siteDetailUrl: string; startYear: string;}