Skip to content

AllyMurray/comic-vine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

331 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Comic Vine SDK

A TypeScript client library for the Comic Vine API with built-in caching, deduplication, and rate limiting. HTTP, caching, deduplication, and rate limiting are delegated to @http-client-toolkit/core.

Features

  • Type-safe API with detailed type definitions for all 19 Comic Vine resources
  • Field selection with automatic TypeScript type narrowing
  • Automatic pagination via async iteration
  • Caching, deduplication, and rate limiting via @http-client-toolkit/core
  • Comprehensive error handling with domain-specific error types

Quick Start

import ComicVine from 'comic-vine-sdk';

const client = new ComicVine({ apiKey: 'your-api-key' });

// Get a specific issue
const issue = await client.issue.retrieve(1);

// Search for characters
const characters = await client.character.list({
  filter: { name: 'Spider-Man' },
  limit: 10,
});

// Auto pagination
for await (const issue of client.issue.list({ filter: { volume: 796 } })) {
  console.log(issue.name);
}

Documentation

Full documentation is available at allymurray.github.io/comic-vine, including:

  • Getting Started - Installation, configuration, and quick start
  • Migration Guide - Upgrading from @comic-vine/client v1 to comic-vine-sdk v2
  • Guides - Field selection, filtering, pagination, caching, and rate limiting
  • API Reference - All 19 resources with full TypeScript interfaces
  • Examples - Basic and advanced usage patterns

For store internals, custom implementations, and advanced caching or rate limiting behavior, see the HTTP Client Toolkit documentation.

Code Generation

Resource types, classes, tests, and mock data are generated from sample API responses. See scripts/README.md for the full pipeline documentation and architecture diagrams.

# Generate all types, resource classes, tests, and mock data from samples
pnpm sdk:generate

# Fetch fresh API samples (requires COMIC_VINE_API_KEY)
COMIC_VINE_API_KEY=your-key pnpm samples:fetch

Contributing

See CONTRIBUTING.md for development setup and contribution guidelines.

License

MIT - see LICENSE for details.

About

A JS/TS client for the Comic Vine API

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors