Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/tcgdexsdk/models/Set.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tcgdexsdk.models.CardResume import CardResume
from tcgdexsdk.models.Model import Model
from tcgdexsdk.models.SerieResume import SerieResume
from tcgdexsdk.models.subs import Booster, Legal, SetCardCountResume
from tcgdexsdk.models.subs import Booster, Legal, SetAbbreviations, SetCardCountResume


@dataclass
Expand Down Expand Up @@ -37,6 +37,8 @@ class Set(Model):
"""the cards contained in this set"""
boosters: Optional[List[Booster]]
"""The list of booster the set has"""
abbreviations: Optional[SetAbbreviations]
"""The set abbreviations (official and in other languages if available)"""

def get_logo_url(self, extension: Union[str, Extension]) -> Optional[str]:
"""
Expand Down Expand Up @@ -65,9 +67,7 @@ def get_symbol_url(self, extension: Union[str, Extension]) -> Optional[str]:
if self.symbol:
return f"{self.symbol}.{extension}"

def get_symbol(
self, format: Union[str, Extension]
) -> Optional[HTTPResponse]:
def get_symbol(self, format: Union[str, Extension]) -> Optional[HTTPResponse]:
"""
Get the symbol buffer
@param format: the image format
Expand Down
45 changes: 44 additions & 1 deletion src/tcgdexsdk/models/subs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ class SetCardCount:
"""number of cards having an holo version"""
firstEd: Optional[int]
"""Number of possible cards"""



@dataclass
class Booster:
id: str
Expand All @@ -111,3 +112,45 @@ class SetCardCountResume:
"""total of number of cards"""
official: int
"""number of cards officialy (on the bottom of each cards)"""


@dataclass
class SetAbbreviations:
"""Set abbreviations"""

official: Optional[str]
"""Official abbreviation acronym used on the cards (English version)"""
fr: Optional[str]
"""French abbreviation acronym used on the cards"""
es: Optional[str]
"""Spanish abbreviation acronym used on the cards"""
es_mx: Optional[str]
"""Spanish (Mexico) abbreviation acronym used on the cards"""
it: Optional[str]
"""Italian abbreviation acronym used on the cards"""
pt: Optional[str]
"""Portuguese abbreviation acronym used on the cards"""
pt_br: Optional[str]
"""Portuguese (Brazil) abbreviation acronym used on the cards"""
pt_pt: Optional[str]
"""Portuguese (Portugal) abbreviation acronym used on the cards"""
de: Optional[str]
"""German abbreviation acronym used on the cards"""
nl: Optional[str]
"""Dutch abbreviation acronym used on the cards"""
pl: Optional[str]
"""Polish abbreviation acronym used on the cards"""
ru: Optional[str]
"""Russian abbreviation acronym used on the cards"""
ja: Optional[str]
"""Japanese abbreviation acronym used on the cards"""
ko: Optional[str]
"""Korean abbreviation acronym used on the cards"""
zh_tw: Optional[str]
"""Chinese (Taiwan) abbreviation acronym used on the cards"""
id: Optional[str]
"""Indonesian abbreviation acronym used on the cards"""
th: Optional[str]
"""Thai abbreviation acronym used on the cards"""
zh_cn: Optional[str]
"""Chinese (China) abbreviation acronym used on the cards"""