Team
Access comic book team data from the Comic Vine API. Official API docs: /team | /teams
const team = client.team;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 team |
options.fieldList | string[] | No | Only return the specified fields |
Returns: Promise<TeamDetails>
const team = await client.team.retrieve(12345);
// With field selectionconst team = await client.team.retrieve(12345, { fieldList: ['id', 'name', 'countOfTeamMembers'],});interface TeamDetails { /** List of aliases the team is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the team detail resource. */ apiDetailUrl: string; /** List of characters that are enemies with this team. */ characterEnemies: Array<SiteResource>; /** List of characters that are friends with this team. */ characterFriends: Array<SiteResource>; /** Characters related to the team. */ characters: Array<SiteResource>; countOfIsssueAppearances: number; /** Number of team members in this team. */ countOfTeamMembers: number; /** Date the team was added to Comic Vine. */ dateAdded: Date; /** Date the team was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the team. */ deck: string; /** Description of the team. */ description: string; /** List of issues this team disbanded in. */ disbandedInIssues: Array<SiteResource>; /** Issue where the team made its first appearance. */ firstAppearedInIssue: IssueApiResource; /** Unique ID of the team. */ id: number; /** Main image of the team. */ image: Image; isssuesDisbandedIn: Array<SiteResource>; issueCredits: Array<SiteResource>; /** Movies the team was in. */ movies: Array<SiteResource>; /** Name of the team. */ name: string; /** The primary publisher a team is attached to. */ publisher: ApiResource; /** URL pointing to the team on Giant Bomb. */ siteDetailUrl: string; storyArcCredits: Array<SiteResource>; 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<TeamListItem>
const teams = await client.team.list();
// With auto paginationfor await (const team of client.team.list()) { console.log(team.name);}interface TeamListItem { /** List of aliases the team is known by. A \n (newline) seperates each alias. */ aliases: null | string; /** URL pointing to the team detail resource. */ apiDetailUrl: string; countOfIsssueAppearances: number; /** Number of team members in this team. */ countOfTeamMembers: number; /** Date the team was added to Comic Vine. */ dateAdded: Date; /** Date the team was last updated on Comic Vine. */ dateLastUpdated: Date; /** Brief summary of the team. */ deck: string; /** Description of the team. */ description: null | string; /** Issue where the team made its first appearance. */ firstAppearedInIssue: IssueApiResource; /** Unique ID of the team. */ id: number; /** Main image of the team. */ image: Image; /** Name of the team. */ name: string; /** The primary publisher a team is attached to. */ publisher: ApiResource; /** URL pointing to the team on Giant Bomb. */ siteDetailUrl: string;}