How crowonslaught/js-cardfight-vanguard-library works
This is a small TypeScript client library for the Cardfight Vanguard API. A consumer imports the public exports and calls card-search, single-card, or set retrieval functions; those functions make HTTP requests and return API data or an error object. Card search also serializes query parameters through a helper. The source excerpts show these calls and exports; set and card capabilities are documented in the README. The external API is represented as a single service because its implementation is outside this repository.
Main entry points: index.ts Exported functions · getCards.ts Search cards · getSets.ts List sets · utils.ts Query serializer
Components 7
Public API
- Exported functions
src/index.ts
Data retrieval
- Search cards
src/services/getCards.ts - Fetch card
src/services/getCards.ts - List sets
src/services/getSets.ts - Query serializer
src/helpers/utils.ts
Other components
- Library consumer
- Vanguard API
Connections 8
- Library consumer → Exported functions: imports
README.md - Exported functions → Search cards: exports
src/index.ts - Exported functions → Fetch card: exports
src/index.ts - Exported functions → List sets: exports
src/index.ts - Search cards → Query serializer: serializes params
src/services/getCards.ts - Search cards → Vanguard API: requests cards
src/services/getCards.ts - Fetch card → Vanguard API: requests card
src/services/getCards.ts - List sets → Vanguard API: requests sets
src/services/getSets.ts