Person
Access real-life creator data (writers, artists, editors) from the Comic Vine API. Official API docs: /person | /people
const person = client.person;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 person |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<PersonDetails>
const person = await client.person.retrieve(12345);
// With field selectionconst person = await client.person.retrieve(12345, { fieldList: ['id', 'name', 'country', 'birth'],});interface PersonDetails { /** List of aliases the person is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the person detail resource. */ apiDetailUrl: string; /** A date, if one exists, that the person was born on. Not an origin date. */ birth: Date | null; countOfIsssueAppearances: unknown; /** Country the person resides in. */ country: null | string; /** Comic characters this person created. */ createdCharacters: Array<SiteResource>; /** Date the person was added to Comic Vine. */ dateAdded: Date; /** Date the person was last updated on Comic Vine. */ dateLastUpdated: Date; /** Date this person died on. */ death: Death | null; /** Brief summary of the person. */ deck: null | string; /** Description of the person. */ description: null | string; /** The email of this person. */ email: null | string; /** Gender of the person. Available options are: Male, Female, Other */ gender: number; /** City or town the person resides in. */ hometown: null | string; /** Unique ID of the person. */ id: number; /** Main image of the person. */ image: Image; /** List of issues this person appears in. */ issues: Array<SiteResource>; /** Name of the person. */ name: string; /** URL pointing to the person on Giant Bomb. */ siteDetailUrl: string; storyArcCredits: Array<SiteResource>; volumeCredits: Array<SiteResource>; /** URL to the person website. */ website: 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<PersonListItem>
const people = await client.person.list();
// With auto paginationfor await (const person of client.person.list()) { console.log(person.name);}interface PersonListItem { /** List of aliases the person is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the person detail resource. */ apiDetailUrl: string; /** A date, if one exists, that the person was born on. Not an origin date. */ birth: Date | null; countOfIsssueAppearances: unknown; /** Country the person resides in. */ country: null | string; /** Date the person was added to Comic Vine. */ dateAdded: Date; /** Date the person was last updated on Comic Vine. */ dateLastUpdated: Date; /** Date this person died on. */ death: Death | null; /** Brief summary of the person. */ deck: null | string; /** Description of the person. */ description: null | string; /** The email of this person. */ email: null | string; /** Gender of the person. Available options are: Male, Female, Other */ gender: number; /** City or town the person resides in. */ hometown: null | string; /** Unique ID of the person. */ id: number; /** Main image of the person. */ image: { [key: string]: null | string }; /** Name of the person. */ name: string; /** URL pointing to the person on Giant Bomb. */ siteDetailUrl: string; /** URL to the person website. */ website: null | string;}