{"_id":"@d.richardcarl/pokemon-tcg-sdk-ts","_rev":"5-a66af4ef6410313328d7aef2c3a1403c","name":"@d.richardcarl/pokemon-tcg-sdk-ts","dist-tags":{"latest":"2.2.2"},"versions":{"2.2.0":{"name":"@d.richardcarl/pokemon-tcg-sdk-ts","version":"2.2.0","keywords":["PokemonTCG","Typescript","API","SDK"],"author":{"name":"d.richardcarl"},"license":"MIT","_id":"@d.richardcarl/pokemon-tcg-sdk-ts@2.2.0","maintainers":[{"name":"d.richardcarl","email":"d.richardcarl@gmail.com"}],"contributors":[{"url":"https://github.com/manuelbachl","name":"Manuel Bachl"},{"url":"https://github.com/glinesbdev","name":"Bradyn Glines"},{"url":"https://github.com/CptSpaceToaster","name":"CptSpaceToaster"},{"url":"https://github.com/Monbrey","name":"Monbrey"},{"url":"https://github.com/jonathan-meyer","name":"Jonathan Meyer"},{"url":"https://github.com/acupoftee","name":"Elisabeth Diang"}],"homepage":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts#readme","bugs":{"url":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts/issues"},"dist":{"shasum":"e60a0f2718f1c66294b58d8619f149d634415479","tarball":"https://registry.npmjs.org/@d.richardcarl/pokemon-tcg-sdk-ts/-/pokemon-tcg-sdk-ts-2.2.0.tgz","fileCount":2,"integrity":"sha512-hwShqKlF1r/hjlD/tT/asyM1cMn5OzgZQU5ibwU9iY37K99heBLsF3IDxNVmME1ABPewhyCCkq7gppEWau1Fyw==","signatures":[{"sig":"MEYCIQCVtlwUhwMKM3cVfZUHiyKN+GNMNFEEQ249VoEbQRqoegIhAMIF7hcurQSDQVo9uuMclgdA8rPK9+qfqCgLs+59pgWu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8450},"main":"dist/index.js","types":"dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"module":"dist/index.js","gitHead":"7959116d4c8aca94f2019693387ff59950f364b3","scripts":{"lint":"yarn lint:cached --ext .ts","test":"yarn lint && jest","build":"yarn rimraf ./dist && node ./esbuild.config.mjs && tsc --outDir ./dist","commit":"git-cz","prepare":"is-ci || npx husky install","lint:fix":"yarn lint:cached . --ext .ts --fix","prettier":"prettier --config prettier.condig.js 'src/**/*.ts' --write","preflight":"yarn lint && yarn tsc && yarn test","lint:cached":"eslint  --cache --cache-location ./node_modules/.cache/eslint ."},"_npmUser":{"name":"d.richardcarl","email":"d.richardcarl@gmail.com"},"repository":{"url":"git+https://github.com/drichardcarl/pokemon-tcg-sdk-ts.git","type":"git"},"_npmVersion":"10.7.0","description":"Typescript SDK for the PokemonTCG API (https://pokemontcg.io)","directories":{"test":"test"},"jsnext:main":"dist/index.js","_nodeVersion":"22.2.0","dependencies":{"axios":"1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.5.0","is-ci":"3.0.1","eslint":"8.42.0","rimraf":"5.0.1","esbuild":"0.18.5","ts-jest":"29.1.0","ts-node":"10.9.1","prettier":"2.8.8","commitizen":"4.3.0","commitlint":"17.6.5","typescript":"^5.1.0","@types/jest":"29.5.2","eslint-plugin-import":"2.27.5","eslint-config-prettier":"8.8.0","eslint-plugin-prettier":"4.2.1","@typescript-eslint/parser":"5.59.9","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"17.6.5","@typescript-eslint/eslint-plugin":"5.59.9","eslint-import-resolver-typescript":"3.5.5","eslint-plugin-prefer-arrow-functions":"3.1.4"},"_npmOperationalInternal":{"tmp":"tmp/pokemon-tcg-sdk-ts_2.2.0_1729695625542_0.6329401928583773","host":"s3://npm-registry-packages"},"deprecated":"Package has been moved to https://www.npmjs.com/package/@devdrc/pokemon-tcg-sdk-ts"},"2.2.1":{"name":"@d.richardcarl/pokemon-tcg-sdk-ts","version":"2.2.1","keywords":["PokemonTCG","Typescript","API","SDK"],"author":{"name":"d.richardcarl"},"license":"MIT","_id":"@d.richardcarl/pokemon-tcg-sdk-ts@2.2.1","maintainers":[{"name":"d.richardcarl","email":"d.richardcarl@gmail.com"}],"contributors":[{"url":"https://github.com/manuelbachl","name":"Manuel Bachl"},{"url":"https://github.com/glinesbdev","name":"Bradyn Glines"},{"url":"https://github.com/CptSpaceToaster","name":"CptSpaceToaster"},{"url":"https://github.com/Monbrey","name":"Monbrey"},{"url":"https://github.com/jonathan-meyer","name":"Jonathan Meyer"},{"url":"https://github.com/acupoftee","name":"Elisabeth Diang"}],"homepage":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts#readme","bugs":{"url":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts/issues"},"dist":{"shasum":"531b0fa3468d84dc8807dbe7146141f73ae25668","tarball":"https://registry.npmjs.org/@d.richardcarl/pokemon-tcg-sdk-ts/-/pokemon-tcg-sdk-ts-2.2.1.tgz","fileCount":2,"integrity":"sha512-KDUWH9RF0KhZuR4QdHJ8L1Z/GN3zPvV9N9mwo3i6AwtJG5uHRj7UU5uSHMYXtdaGPgicefGirkcXd1L7bWWCFQ==","signatures":[{"sig":"MEUCIQC69sJv0Mpi1tAu0ATpjeGgeQg8hhkY8AIm8cTghxpzBgIgC1B0+8aXqtiyLo9WWqY6oNXDsExRa8hayzXjzmiH3CE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9586},"main":"dist/index.js","types":"dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"module":"dist/index.js","gitHead":"7e0014226bef19d88dbcc3c4eae6498b03bafee3","scripts":{"lint":"yarn lint:cached --ext .ts","test":"yarn lint && jest","build":"yarn rimraf ./dist && node ./esbuild.config.mjs && tsc --outDir ./dist","commit":"git-cz","prepare":"is-ci || npx husky install","lint:fix":"yarn lint:cached . --ext .ts --fix","prettier":"prettier --config prettier.condig.js 'src/**/*.ts' --write","preflight":"yarn lint && yarn tsc && yarn test","lint:cached":"eslint  --cache --cache-location ./node_modules/.cache/eslint ."},"_npmUser":{"name":"d.richardcarl","email":"d.richardcarl@gmail.com"},"repository":{"url":"git+https://github.com/drichardcarl/pokemon-tcg-sdk-ts.git","type":"git"},"_npmVersion":"10.7.0","description":"Typescript SDK for the PokemonTCG API (https://pokemontcg.io)","directories":{"test":"test"},"jsnext:main":"dist/index.js","_nodeVersion":"22.2.0","dependencies":{"axios":"1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.5.0","is-ci":"3.0.1","eslint":"8.42.0","rimraf":"5.0.1","esbuild":"0.18.5","ts-jest":"29.1.0","ts-node":"10.9.1","prettier":"2.8.8","commitizen":"4.3.0","commitlint":"17.6.5","typescript":"^5.1.0","@types/jest":"29.5.2","eslint-plugin-import":"2.27.5","eslint-config-prettier":"8.8.0","eslint-plugin-prettier":"4.2.1","@typescript-eslint/parser":"5.59.9","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"17.6.5","@typescript-eslint/eslint-plugin":"5.59.9","eslint-import-resolver-typescript":"3.5.5","eslint-plugin-prefer-arrow-functions":"3.1.4"},"_npmOperationalInternal":{"tmp":"tmp/pokemon-tcg-sdk-ts_2.2.1_1729696272464_0.8160032227950225","host":"s3://npm-registry-packages"},"deprecated":"Package has been moved to https://www.npmjs.com/package/@devdrc/pokemon-tcg-sdk-ts"},"2.2.2":{"name":"@d.richardcarl/pokemon-tcg-sdk-ts","version":"2.2.2","keywords":["PokemonTCG","Typescript","API","SDK"],"author":{"name":"d.richardcarl"},"license":"MIT","_id":"@d.richardcarl/pokemon-tcg-sdk-ts@2.2.2","maintainers":[{"name":"d.richardcarl","email":"d.richardcarl@gmail.com"}],"contributors":[{"url":"https://github.com/manuelbachl","name":"Manuel Bachl"},{"url":"https://github.com/glinesbdev","name":"Bradyn Glines"},{"url":"https://github.com/CptSpaceToaster","name":"CptSpaceToaster"},{"url":"https://github.com/Monbrey","name":"Monbrey"},{"url":"https://github.com/jonathan-meyer","name":"Jonathan Meyer"},{"url":"https://github.com/acupoftee","name":"Elisabeth Diang"}],"homepage":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts#readme","bugs":{"url":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts/issues"},"dist":{"shasum":"75a08a37235948dbca84b87bb20b02b7d0721849","tarball":"https://registry.npmjs.org/@d.richardcarl/pokemon-tcg-sdk-ts/-/pokemon-tcg-sdk-ts-2.2.2.tgz","fileCount":90,"integrity":"sha512-T3UjbdtFIdt73u5pXUTLmUfbr7YMp8/8cJi+G1OV/aSLRqStWfTEYNPxV9oh2WKPcEnIFqb5reTshqHywW2MYw==","signatures":[{"sig":"MEUCICENurRUOJHWx1fFQE5wBwa+qmwsenL25uAr697MxdwqAiEA2suAwO1AlDNnyVwzblvhgsbC4bfzyXkIsdLSQoeAisw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":88573},"main":"dist/index.js","types":"dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"module":"dist/index.js","gitHead":"7e0014226bef19d88dbcc3c4eae6498b03bafee3","scripts":{"lint":"yarn lint:cached --ext .ts","test":"yarn lint && jest","build":"yarn rimraf ./dist && node ./esbuild.config.mjs && tsc --outDir ./dist","commit":"git-cz","prepare":"is-ci || npx husky install","lint:fix":"yarn lint:cached . --ext .ts --fix","prettier":"prettier --config prettier.condig.js 'src/**/*.ts' --write","preflight":"yarn lint && yarn tsc && yarn test","lint:cached":"eslint  --cache --cache-location ./node_modules/.cache/eslint ."},"_npmUser":{"name":"d.richardcarl","email":"d.richardcarl@gmail.com"},"repository":{"url":"git+https://github.com/drichardcarl/pokemon-tcg-sdk-ts.git","type":"git"},"_npmVersion":"10.7.0","description":"Typescript SDK for the PokemonTCG API (https://pokemontcg.io)","directories":{"test":"test"},"jsnext:main":"dist/index.js","_nodeVersion":"22.2.0","dependencies":{"axios":"1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.5.0","is-ci":"3.0.1","eslint":"8.42.0","rimraf":"5.0.1","esbuild":"0.18.5","ts-jest":"29.1.0","ts-node":"10.9.1","prettier":"2.8.8","commitizen":"4.3.0","commitlint":"17.6.5","typescript":"^5.1.0","@types/jest":"29.5.2","eslint-plugin-import":"2.27.5","eslint-config-prettier":"8.8.0","eslint-plugin-prettier":"4.2.1","@typescript-eslint/parser":"5.59.9","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"17.6.5","@typescript-eslint/eslint-plugin":"5.59.9","eslint-import-resolver-typescript":"3.5.5","eslint-plugin-prefer-arrow-functions":"3.1.4"},"_npmOperationalInternal":{"tmp":"tmp/pokemon-tcg-sdk-ts_2.2.2_1729696679702_0.12391817075264822","host":"s3://npm-registry-packages"},"deprecated":"Package has been moved to https://www.npmjs.com/package/@devdrc/pokemon-tcg-sdk-ts"}},"time":{"created":"2024-10-23T15:00:25.420Z","modified":"2025-01-14T06:08:40.238Z","2.2.0":"2024-10-23T15:00:25.768Z","2.2.1":"2024-10-23T15:11:12.618Z","2.2.2":"2024-10-23T15:17:59.889Z"},"bugs":{"url":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts/issues"},"author":{"name":"d.richardcarl"},"license":"MIT","homepage":"https://github.com/drichardcarl/pokemon-tcg-sdk-ts#readme","keywords":["PokemonTCG","Typescript","API","SDK"],"repository":{"url":"git+https://github.com/drichardcarl/pokemon-tcg-sdk-ts.git","type":"git"},"description":"Typescript SDK for the PokemonTCG API (https://pokemontcg.io)","contributors":[{"url":"https://github.com/manuelbachl","name":"Manuel Bachl"},{"url":"https://github.com/glinesbdev","name":"Bradyn Glines"},{"url":"https://github.com/CptSpaceToaster","name":"CptSpaceToaster"},{"url":"https://github.com/Monbrey","name":"Monbrey"},{"url":"https://github.com/jonathan-meyer","name":"Jonathan Meyer"},{"url":"https://github.com/acupoftee","name":"Elisabeth Diang"}],"maintainers":[{"name":"devdrc","email":"d.richardcarl+devdrc@gmail.com"}],"readme":"# Pokémon TCG TypeScript SDK\n\n[![pokemontcg-developers on discord](https://img.shields.io/badge/discord-pokemontcg--developers-738bd7.svg)](https://discord.gg/dpsTCvg)\n![pokemon-tcg-sdk-typescript build status](https://github.com/pokelibrary/pokemon-tcg-sdk-typescript/actions/workflows/sdk_test.yaml/badge.svg)\n\nThis is the TypeScript SDK for the [Pokémon Trading Card Game API](https://docs.pokemontcg.io).\n\n> The original SDK project seems abandoned some years already. In order to have a cleaner repository I decided not to fork the old project, but to start a ne repository.\n> But credits to [the original project](https://github.com/PokemonTCG/pokemon-tcg-sdk-typescript) as well as all it's contributors (whose names are still mentioned here in the contributors section!).\n\n# Table of Contents\n\n<!-- TOC -->\n\n- [Pokémon TCG TypeScript SDK](#pokémon-tcg-typescript-sdk)\n- [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n  - [Usage](#usage)\n    - [Card Methods](#card-methods)\n      - [findCardByID()](#findcardbyid)\n      - [findCardByQueries()](#findcardbyqueries)\n      - [getAllCards()](#getallcards)\n      - [getTypes()](#gettypes)\n      - [getSupertypes()](#getsupertypes)\n      - [getSubtypes()](#getsubtypes)\n      - [getRarities()](#getrarities)\n    - [Set Methods](#set-methods)\n      - [findSetByID()](#findsetbyid)\n      - [findSetsByQueries()](#findsetsbyqueries)\n      - [getAllSets()](#getallsets)\n    - [Product Methods](#product-methods)\n      - [findProductByID()](#findproductbyid)\n      - [findProductsByQueries()](#findproductsbyqueries)\n      - [getAllProducts()](#getallproducts)\n  - [Contributing](#contributing)\n    - [Setup](#setup)\n\n<!-- /TOC -->\n\n## Installation\n\n**npm**\n\n    npm install @d.richardcarl/pokemon-tcg-sdk-ts\n\n**yarn**\n\n    yarn add @d.richardcarl/pokemon-tcg-sdk-ts\n\n## Configuration\n\nThe SDK works out of the box! Simply import the SDK, and you're ready to go:\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.findCardByID('xy7-54').then((card: PokemonTCG.Card) => {\n  console.log(card.name); // Gardevoir\n});\n```\n\nIt is recommended to use an API key for version 2 of the API. By default, requests are limited to 20,000/day. Requests are rate limited to 1000 requests a day, and a maximum of 30 per minute.\n\nTo use the SDK with an API key, create an account at https://dev.pokemontcg.io to grab an API key.\nThen set your API key to the environment variable `POKEMONTCG_API_KEY` in a `.env` file.\n**Make sure to use this exact environment variable, otherwise the SDK will not be able to read the API key.**\n\n## Usage\n\nAll function calls return generic promises like `Promise<T>` or `Promise<T[]>`\n\n### Card Methods\n\n#### findCardByID()\n\nReturns a single Pokémon card given an ID.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.findCardByID('xy7-54').then((card: PokemonTCG.ICard) => {\n  console.log(card.name); // Gardevoir\n});\n```\n\n#### findCardByQueries()\n\nReturns an array of cards filtered through a search query.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nconst params: PokemonTCG.IParameter = { q: 'id:xy7-54' };\n\nPokemonTCG.findCardsByQueries(params).then((cards: PokemonTCG.ICard[]) => {\n  console.log(card[0].name); // Gardevoir\n});\n```\n\n#### getAllCards()\n\nReturns all Pokémon cards available through recursive pagination.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.getAllCards();\n```\n\n#### getTypes()\n\nReturns all Energy Types\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.getTypes();\n```\n\n#### getSupertypes()\n\nReturns all Super Types\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.getSupertypes();\n```\n\n#### getSubtypes()\n\nReturns all Sub Types\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.getSubtypes();\n```\n\n#### getRarities()\n\nReturns all card Rarities\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.getRarities();\n```\n\n### Set Methods\n\n#### findSetByID()\n\nReturns a single Pokémon card given an ID.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.findSetByID('base1').then((set: PokemonTCG.ISet) => {\n  console.log(set.name); // Base\n});\n```\n\n#### findSetByQueries()\n\nReturns an array of cards filtered through a search query.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nconst params: PokemonTCG.IParameter = { q: 'name:Base' };\n\nPokemonTCG.findSetsByQueries(params).then((sets: PokemonTCG.ISet[]) => {\n  console.log(sets[0].name); // Base\n});\n```\n\n#### getAllSets()\n\nReturns all Pokémon sets available through recursive pagination.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.getAllSets();\n```\n\n### Product Methods\n\n#### findProductByID()\n\nReturns a single Pokémon sealed product given an ID.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.findProductByID('swsh12pt5-s1').then(\n  (product: PokemonTCG.IProduct) => {\n    console.log(product.name); // Crown Zenith Booster Pack\n  },\n);\n```\n\n#### findProductsByQueries()\n\nReturns an array of products filtered through a search query.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nconst params: PokemonTCG.IParameter = { q: 'name:\"Crown Zenith Booster Pack\"' };\n\nPokemonTCG.findProductsByQueries(params).then(\n  (products: PokemonTCG.IProduct[]) => {\n    console.log(products[0].name); // Crown Zenith Booster Pack\n  },\n);\n```\n\n#### getAllProducts()\n\nReturns all Pokémon sealed products available through recursive pagination.\n\n```typescript\nimport { PokemonTCG } from '@d.richardcarl/pokemon-tcg-sdk-ts';\n\nPokemonTCG.getAllProducts();\n```\n\n## Contributing\n\nContributions are welcome! If you want to contribute, feel free to fork the repository, open and issue, then submit a pull request.\nESLint and Prettier are used to enforce a consistent coding style.\n\n### Setup\n\nRaring to code your heart out? Awesome! Here's how to get started:\n\n1. Open and issue with a bug or feature. Ensure the change is not already being worked on.\n2. Fork and clone the repository from the `main` branch.\n3. Create a feat00ure branch.\n4. Run `npm ci` to install exact versions specified in the `package-lock.json`.\n5. Code your heart out!\n6. Run `npm run test` to run ESLint and Jest tests.\n7. (OPTIONAL) Test your changes in a project of yours:\n   1. Create a link with `npm` or `yarn` (depending on what tool you installed this SDK with)\n   2. In your project that uses the SDK, install the linked package with `yarn/npm link @d.richardcarl/pokemon-tcg-sdk-ts`\n   3. Verify the SDK behaves as expected, and your changes took effect\n8. Submit a [pull request](https://github.com/pokelibrary/pokemon-tcg-sdk-typescript/compare)! 🎉\n","readmeFilename":"README.md"}