18 Commits

Author SHA1 Message Date
e061d81e19 Update package.json 2025-01-20 17:09:54 +00:00
0cbb20fdf2 Update package.json 2025-01-20 14:35:23 +00:00
6a08d3a61a Update package.json 2025-01-20 13:28:56 +00:00
73328a1df2 Update package.json 2025-01-20 11:24:46 +00:00
25b4c2f5d1 Update package.json 2025-01-20 11:03:12 +00:00
Tee
5f2de997ea Bump version number 2021-12-16 20:53:39 -05:00
Tee
befb72bde6 Update contribution instructions 2021-12-16 20:52:46 -05:00
Tee
6cd9eab51b add regulationMark property to card interface 2021-12-16 20:51:59 -05:00
Tee
c4967fb899 Add name and github link to contrubition section 2021-12-16 20:51:11 -05:00
Tee
7ff5d7863d Update version 2021-08-26 22:26:31 -04:00
Tee
f93dbe2fb6 Add missing set import 2021-08-26 21:20:27 -04:00
Tee
9b95435d9e Add new release date and extra contribution steps 2021-08-26 21:20:04 -04:00
Tee
b554a5f5d8 Merge pull request #26 from CptSpaceToaster/add-cardmarket-properties
Add some cardmarket properties
2021-08-10 10:01:58 -04:00
a0b055f6e7 Add some cardmarket properties
Most of these are nullable
2021-08-05 22:56:46 -04:00
ee12437d1a Merge pull request #23 from CptSpaceToaster/main
Add `1stEditionNormal` and `1stEditionHoloFoil` properties in TCGPlayer interface
2021-04-01 21:47:03 -04:00
380d2e7c97 Add missing properties, but their names are weird
They're like this in the JSON :(
2021-03-26 12:36:18 -04:00
Tee
5b5d076e52 Bump patch version 2021-03-24 22:52:56 -04:00
Tee
5d45d75720 fix evolvesFrom typo 2021-03-24 22:52:27 -04:00
7 changed files with 54 additions and 19 deletions

View File

@ -3,7 +3,7 @@
This is the TypeScript SDK for the [Pokemon TCG API](https://pokemontcg.io).
# V2 Announcement
Version 1 of this SDK is officially depricated. Version 2 stable release this SDK is scheduled to be released on **Friday, April 3rd, 20201**. Version 1 will continue to receive support until then. **See the [migration guide](MIGRATING.md) for steps to update your app to use the latest supported version of the SDK**
Version 1 of this SDK is officially depricated. Version 2 stable release this SDK is scheduled to be released on **Friday, September 17th, 20201**. Version 1 will continue to receive support until then. **See the [migration guide](MIGRATING.md) for steps to update your app to use the latest supported version of the SDK**
## Installation
@ -49,6 +49,7 @@ To use the SDK with an API key, create an account at https://dev.pokemontcg.io t
legalities: ILegality;
images: ICardImage;
tcgplayer?: ITCGPlayer;
cardmarket?: ICardmarket;
```
### IAbility
@ -147,17 +148,19 @@ PokemonTCG.Card.all()
```
## Contributing
* Fork it (click the Fork button at the top of the page)
* Create your feature branch (git checkout -b my-new-feature)
* Make some changes and fix some bugs!
* Run the tests `npm run-script test`
* Test your changes in a project of yours:
* Create a link with [npm](https://docs.npmjs.com/cli/link.html) or [yarn](https://yarnpkg.com/lang/en/docs/cli/link/) (depending on what tool you installed this SDK with)
* In your project that **uses** the SDK, install the linked package with `yarn/npm link pokemon-tcg-sdk-typescript`
* Verify the SDK behaves as expected, and your changes took effect
* Commit your changes (git commit -am 'Add some feature')
* Push to the branch (git push origin my-new-feature)
* Create a new Pull Request
* Open an issue
* Describe what the SDK is missing and what changes you'd like to see implemented
* **Ask clarifying questions**
* Fork it (click the Fork button at the top of the page)
* Create your feature branch (git checkout -b my-new-feature)
* Make some changes and fix some bugs!
* Run the tests `npm run-script test`
* Test your changes in a project of yours:
* Create a link with [npm](https://docs.npmjs.com/cli/link.html) or [yarn](https://yarnpkg.com/lang/en/docs/cli/link/) (depending on what tool you installed this SDK with)
* In your project that **uses** the SDK, install the linked package with `yarn/npm link pokemon-tcg-sdk-typescript`
* Verify the SDK behaves as expected, and your changes took effect
* Commit your changes (git commit -am 'Add some feature')
* Push to the branch (git push origin my-new-feature)
* Create a new Pull Request to `master`
## TODO
* Add more testing?

View File

@ -1,6 +1,6 @@
{
"name": "pokemon-tcg-sdk-typescript",
"version": "1.3.1",
"version": "1.3.4",
"description": "Typescript SDK for the PokemonTCG API (https://pokemontcg.io)",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@ -11,22 +11,24 @@
"SDK"
],
"scripts": {
"prepare": "npm run build",
"test": "mocha --reporter spec --require ts-node/register 'coverage/**/*.test.ts'",
"build": "tsc"
},
"repository": {
"type": "git",
"url": "https://github.com/PokemonTCG/pokemon-tcg-sdk-typescript"
"url": "https://gitea.sebar.dev/gitea_admin/pokemon-tcg-sdk-typescript.git"
},
"contributors": [
"Bradyn Glines (https://github.com/glinesbdev)",
"CptSpaceToaster (https://github.com/CptSpaceToaster)",
"Monbrey (https://github.com/Monbrey)",
"Jonathan Meyer (https://github.com/jonathan-meyer)"
"Jonathan Meyer (https://github.com/jonathan-meyer)",
"Tee Diang (https://github.com/acupoftee"
],
"license": "MIT",
"dependencies": {
"axios": "^0.19.0"
"axios": "^1.7.9"
},
"devDependencies": {
"@types/chai": "^4.1.1",

View File

@ -3,6 +3,7 @@ import { IAncientTrait } from "../interfaces/ancientTrait";
import { IAttack } from "../interfaces/attack";
import { ICard } from "../interfaces/card";
import { ICardImage } from "../interfaces/image";
import { ICardmarket } from "../interfaces/cardmarket";
import { ILegality } from "../interfaces/legality";
import { IQuery } from "../interfaces/query";
import { IResistance } from "../interfaces/resistance";
@ -35,8 +36,10 @@ export class Card implements ICard {
flavorText?: string;
nationalPokedexNumbers?: number[];
legalities: ILegality;
regulationMark?: string;
images: ICardImage;
tcgplayer?: ITCGPlayer;
cardmarket?: ICardmarket;
resource(): string {
return "cards";

View File

@ -4,6 +4,7 @@ import { IAttack } from "../interfaces/attack";
import { IResistance } from "../interfaces/resistance";
import { IWeakness } from "../interfaces/weakness";
import { ICardImage } from "./image";
import { ICardmarket } from "./cardmarket";
import { ILegality } from "./legality";
import { ISet } from "./set";
import { ITCGPlayer } from "./tcgplayer";
@ -15,7 +16,7 @@ export interface ICard {
subtypes: string[];
hp?: string;
types?: string[];
evolesFrom?: string;
evolvesFrom?: string;
evolvesTo?: string[];
rules?: string[];
ancientTrait?: IAncientTrait;
@ -32,6 +33,8 @@ export interface ICard {
flavorText?: string;
nationalPokedexNumbers?: number[];
legalities: ILegality;
regulationMark?: string;
images: ICardImage;
tcgplayer?: ITCGPlayer;
cardmarket?: ICardmarket;
}

View File

@ -0,0 +1,21 @@
export interface ICardmarket {
url: string;
updatedAt: string;
prices: {
averageSellPrice: number | null
lowPrice: number | null
trendPrice: number | null
germanProLow: number | null
suggestedPrice: number | null
reverseHoloSell: number | null
reverseHoloLow: number | null
reverseHoloTrend: number | null
lowPriceExPlus: number | null
avg1: number | null
avg7: number | null
avg30: number | null
reverseHoloAvg1: number | null
reverseHoloAvg7: number | null
reverseHoloAvg30: number | null
}
}

View File

@ -5,6 +5,8 @@ export interface ITCGPlayer {
normal: IPrice | undefined;
holofoil: IPrice | undefined;
reverseHolofoil: IPrice | undefined;
'1stEditionNormal': IPrice | undefined;
'1stEditionHolofoil': IPrice | undefined;
}
}

View File

@ -11,6 +11,7 @@ export * from './classes/meta';
export * from './interfaces/ability';
export * from './interfaces/attack';
export * from './interfaces/card';
export * from './interfaces/set';
export * from './interfaces/query';
export * from './interfaces/resistance';
export * from './interfaces/weakness';