Concept
Access comic book concept data from the Comic Vine API. Official API docs: /concept | /concepts
const concept = client.concept;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 concept |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<ConceptDetails>
const concept = await client.concept.retrieve(12345);
// With field selectionconst concept = await client.concept.retrieve(12345, { fieldList: ['id', 'name', 'deck'],});interface ConceptDetails { /** List of aliases the concept is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the concept detail resource. */ apiDetailUrl: string; countOfIsssueAppearances: number; /** Date the concept was added to Comic Vine. */ dateAdded: Date; /** Date the concept was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the concept. */ deck: string; /** Description of the concept. */ description: string; /** Issue where the concept made its first appearance. */ firstAppearedInIssue: IssueApiResource; /** Unique ID of the concept. */ id: number; /** Main image of the concept. */ image: Image; issueCredits: Array<SiteResource>; /** Movies the concept was in. */ movies: Array<SiteResource>; /** Name of the concept. */ name: string; /** URL pointing to the concept on Giant Bomb. */ siteDetailUrl: string; /** The first year this concept appeared in comics. */ startYear: string; volumeCredits: 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<ConceptListItem>
const concepts = await client.concept.list();
// With auto paginationfor await (const concept of client.concept.list()) { console.log(concept.name);}interface ConceptListItem { /** List of aliases the concept is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the concept detail resource. */ apiDetailUrl: string; countOfIsssueAppearances: number; /** Date the concept was added to Comic Vine. */ dateAdded: Date; /** Date the concept was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the concept. */ deck: string; /** Description of the concept. */ description: null | string; /** Issue where the concept made its first appearance. */ firstAppearedInIssue: IssueApiResource | null; /** Unique ID of the concept. */ id: number; /** Main image of the concept. */ image: Image; /** Name of the concept. */ name: string; /** URL pointing to the concept on Giant Bomb. */ siteDetailUrl: string; /** The first year this concept appeared in comics. */ startYear: null | string;}