mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-06-07 08:49:55 +00:00
Updated SDK to support new incoming datas
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
97acf4287f
commit
1db0b1ab38
@ -19,21 +19,72 @@ export interface CardSimple {
|
|||||||
export interface CardSingle {
|
export interface CardSingle {
|
||||||
// General
|
// General
|
||||||
id: string
|
id: string
|
||||||
localId: number|string
|
|
||||||
|
/**
|
||||||
|
* The Set Card ID
|
||||||
|
*/
|
||||||
|
localId: number | string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The card Name
|
||||||
|
*/
|
||||||
name: string
|
name: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Card Picture
|
||||||
|
* it doesn't contains the ext as it is available as .png, .jpg, .webp (HINT: use .webp then .png then .jpg)
|
||||||
|
*/
|
||||||
image?: {
|
image?: {
|
||||||
low: string
|
low: string
|
||||||
high?: string
|
high?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Card Tags
|
||||||
|
*/
|
||||||
tags?: Array<TagSimple>
|
tags?: Array<TagSimple>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Card illustrator informations
|
||||||
|
*/
|
||||||
illustrator?: IllustratorSimple
|
illustrator?: IllustratorSimple
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Card Rarity
|
||||||
|
*/
|
||||||
rarity: RaritySimple
|
rarity: RaritySimple
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Card Category
|
||||||
|
*/
|
||||||
category: CategorySimple
|
category: CategorySimple
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Card Set
|
||||||
|
*/
|
||||||
set: {
|
set: {
|
||||||
|
/**
|
||||||
|
* Set Display name
|
||||||
|
*/
|
||||||
name: string
|
name: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set code/id
|
||||||
|
*/
|
||||||
code: string
|
code: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This will be set for each cards
|
||||||
|
* define all the variants for a specific card
|
||||||
|
*/
|
||||||
|
variants: {
|
||||||
|
normal: boolean
|
||||||
|
reverse: boolean
|
||||||
|
holo: boolean
|
||||||
|
firstEd: boolean
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Some Pokémons have item like a berry
|
* Some Pokémons have item like a berry
|
||||||
*/
|
*/
|
||||||
@ -80,7 +131,7 @@ type Card = {
|
|||||||
// Card informations (from top to bottom of card)
|
// Card informations (from top to bottom of card)
|
||||||
name: LangList<string>
|
name: LangList<string>
|
||||||
hp?: number //optionnal because energy/trainer cards might have not any hp
|
hp?: number //optionnal because energy/trainer cards might have not any hp
|
||||||
type?: Array<Type> // ex for multiple https://api.pokemon.com/us/pokemon-tcg/pokemon-cards/ex-series/ex13/17/
|
type?: Array<Type> // ex for multiple https://www.tcgdex.net/database/ex/ex13/17
|
||||||
|
|
||||||
image?: {
|
image?: {
|
||||||
low: LangList<string>
|
low: LangList<string>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tcgdex/sdk",
|
"name": "@tcgdex/sdk",
|
||||||
"version": "1.7.0",
|
"version": "1.8.0",
|
||||||
"main": "./tcgdex.js",
|
"main": "./tcgdex.js",
|
||||||
"types": "./tcgdex.d.ts",
|
"types": "./tcgdex.d.ts",
|
||||||
"repository": "https://github.com/tcgdex/javascript-sdk.git",
|
"repository": "https://github.com/tcgdex/javascript-sdk.git",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user