Publisher
Access publishing company data from the Comic Vine API. Official API docs: /publisher | /publishers
const publisher = client.publisher;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 publisher |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<PublisherDetails>
const publisher = await client.publisher.retrieve(31);
// With field selectionconst publisher = await client.publisher.retrieve(31, { fieldList: ['id', 'name', 'locationCity', 'locationState'],});interface PublisherDetails { /** List of aliases the publisher is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the publisher detail resource. */ apiDetailUrl: string; /** Characters related to the publisher. */ characters: Array<SiteResource>; /** Date the publisher was added to Comic Vine. */ dateAdded: Date; /** Date the publisher was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the publisher. */ deck: null | string; /** Description of the publisher. */ description: null | string; /** Unique ID of the publisher. */ id: number; /** Main image of the publisher. */ image: Image; /** Street address of the publisher. */ locationAddress: null | string; /** City the publisher resides in. */ locationCity: null | string; /** State the publisher resides in. */ locationState: null | string; /** Name of the publisher. */ name: string; /** URL pointing to the publisher on Giant Bomb. */ siteDetailUrl: string; /** List of story arcs tied to this publisher. */ storyArcs: Array<SiteResource>; /** List of teams this publisher is a member of. */ teams: Array<SiteResource>; /** List of volumes this publisher has put out. */ volumes: 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<PublisherListItem>
const publishers = await client.publisher.list();
// With auto paginationfor await (const publisher of client.publisher.list()) { console.log(publisher.name);}interface PublisherListItem { /** List of aliases the publisher is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the publisher detail resource. */ apiDetailUrl: string; /** Date the publisher was added to Comic Vine. */ dateAdded: Date; /** Date the publisher was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the publisher. */ deck: null | string; /** Description of the publisher. */ description: null | string; /** Unique ID of the publisher. */ id: number; /** Main image of the publisher. */ image: Image; /** Street address of the publisher. */ locationAddress: null | string; /** City the publisher resides in. */ locationCity: null | string; /** State the publisher resides in. */ locationState: LocationState | null; /** Name of the publisher. */ name: string; /** URL pointing to the publisher on Giant Bomb. */ siteDetailUrl: string;}
enum LocationState { California = 'California', NewYork = 'New York', LocationStateNewYork = 'New York ', Pennsylvania = 'Pennsylvania',}