TypeScript npm
SDK JavaScript & TypeScript
SDK sifar kebergantungan menggunakan fetch asli. Output dual ESM + CJS, dengan definisi jenis TypeScript penuh.
Pemasangan npm
$ npm install @tcgpricelookup/sdk Ciri Utama
- ✓ Zero dependencies
- ✓ ESM and CommonJS support
- ✓ Full TypeScript types
- ✓ Works in Node.js 18+, browsers, Bun, Deno, Cloudflare Workers
- ✓ Batch card lookups
- ✓ Price history queries
Contoh Penggunaan
import { TCGLookup } from 'tcglookup';
const tcg = new TCGLookup({ apiKey: 'your-api-key' });
const results = await tcg.search('charizard');
console.log(results);
Mula membina dengan TCG API
Dapatkan kunci API percuma anda dan mula menanya harga kad dalam beberapa minit.