mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-06-18 02:19:17 +00:00
feat: add boosters to API (#737)
This commit is contained in:
38
meta/definitions/api.d.ts
vendored
38
meta/definitions/api.d.ts
vendored
@ -2,6 +2,34 @@
|
||||
* This file define how the API is architectured for the Compiler and the Javascript/Typescript SDK
|
||||
*/
|
||||
|
||||
/**
|
||||
* Booster interface
|
||||
*/
|
||||
export interface Booster {
|
||||
/**
|
||||
* the booster ID
|
||||
*
|
||||
* boo_<set_id>-<booster_name>
|
||||
*/
|
||||
id: `boo_${string}-${string}`
|
||||
/**
|
||||
* the name of the booster
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* the logo of the booster
|
||||
*/
|
||||
logo?: string
|
||||
/**
|
||||
* the front of the booster pack
|
||||
*/
|
||||
artwork_front?: string
|
||||
/**
|
||||
* the back of the booster pack
|
||||
*/
|
||||
artwork_back?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* /series endpoint
|
||||
*/
|
||||
@ -54,6 +82,11 @@ export interface Set extends SetResume {
|
||||
tcgOnline?: string;
|
||||
variants?: variants;
|
||||
releaseDate: string;
|
||||
|
||||
/**
|
||||
* The boosters available in this set
|
||||
*/
|
||||
boosters?: Array<Booster>
|
||||
/**
|
||||
* Designate if the set is usable in tournaments
|
||||
*
|
||||
@ -267,6 +300,11 @@ export interface Card extends CardResume {
|
||||
expanded: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* the boosters in which the card is available
|
||||
*/
|
||||
boosters?: Array<Booster>
|
||||
|
||||
updated: string
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,9 @@ input Sort {
|
||||
|
||||
"""a Card filters"""
|
||||
input CardsFilters {
|
||||
"""Filter on the booster in which the card is available"""
|
||||
# booster: String
|
||||
|
||||
"""Filter on the card's category (Pokemon, Trainer or Energy)"""
|
||||
category: String
|
||||
|
||||
@ -219,6 +222,9 @@ type Card {
|
||||
"""The card variants"""
|
||||
variants: Variants
|
||||
|
||||
"""The boosters in which the card is available"""
|
||||
boosters: [Booster]
|
||||
|
||||
"""The pokémon weaknesses"""
|
||||
weaknesses: [WeakResListItem]
|
||||
|
||||
@ -310,6 +316,33 @@ type Variants {
|
||||
wPromo: Boolean!
|
||||
}
|
||||
|
||||
"""
|
||||
A booster pack for Pokémon TCG cards
|
||||
|
||||
Boosters represent the different pack designs that cards can be obtained from within a set.
|
||||
Each set may have multiple booster pack designs (e.g., themed around specific Pokémon).
|
||||
"""
|
||||
type Booster {
|
||||
"""
|
||||
The booster unique identifier
|
||||
|
||||
Format: boo_<set_id>-<booster_id>
|
||||
"""
|
||||
id: String!
|
||||
|
||||
"""The display name of the booster pack"""
|
||||
name: String!
|
||||
|
||||
"""The booster pack logo image URL if available"""
|
||||
logo: String
|
||||
|
||||
"""The front artwork image URL of the booster pack if available"""
|
||||
artwork_front: String
|
||||
|
||||
"""The back artwork image URL of the booster pack if available"""
|
||||
artwork_back: String
|
||||
}
|
||||
|
||||
##################
|
||||
# Set #
|
||||
##################
|
||||
@ -344,6 +377,13 @@ type Set {
|
||||
|
||||
"""The set tcgOnline code if available in the APP"""
|
||||
tcgOnline: String
|
||||
|
||||
"""
|
||||
The booster pack designs available for this set
|
||||
|
||||
A set may have multiple booster pack designs, often themed around different Pokémon
|
||||
"""
|
||||
boosters: [Booster]
|
||||
}
|
||||
|
||||
"""
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user