Skip to content

Commit bc26553

Browse files
authored
fix: await not necessary for setSync listSync
1 parent fa83f06 commit bc26553

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ from tcgdexsdk import TCGdex
3030

3131
# Fetch a card in one line
3232
card = await TCGdex().card.get("swsh3-136")
33-
card = await TCGdex().card.getSync("swsh3-136")
33+
card = TCGdex().card.getSync("swsh3-136")
3434
print(f"Found: {card.name} ({card.localId}/{card.set.cardCount.total})")
3535
```
3636

@@ -58,36 +58,36 @@ sdk = TCGdex("en")
5858

5959
# Get the cards made by the illustrator
6060
cards = await sdk.illustrator.get("5ban Graphics")
61-
cards = await sdk.illustrator.getSync("5ban Graphics")
61+
cards = sdk.illustrator.getSync("5ban Graphics")
6262

6363
# Get the data about the Sword & Shield serie by ID
6464
series = await sdk.serie.get("swsh")
65-
series = await sdk.serie.getSync("swsh")
65+
series = sdk.serie.getSync("swsh")
6666

6767
# Get all cards with 110 HP
6868
hp_cards = await sdk.hp.get("110")
69-
hp_cards = await sdk.hp.getSync("110")
69+
hp_cards = sdk.hp.getSync("110")
7070

7171
# List all available rarities
7272
rarities = await sdk.rarity.list()
73-
rarities = await sdk.rarity.listSync()
73+
rarities = sdk.rarity.listSync()
7474

7575
# List all cards with the name being "Furret"
7676
rarities = await sdk.card.list(Query().equal("name", "Furret"))
77-
rarities = await sdk.card.listSync(Query().equal("name", "Furret"))
77+
rarities = sdk.card.listSync(Query().equal("name", "Furret"))
7878
```
7979

8080
### Working with Sets and Series
8181

8282
```python
8383
# Get set details
8484
darkness_ablaze = await sdk.set.get("Darkness Ablaze")
85-
# darkness_ablaze = await sdk.set.getSync("Darkness Ablaze")
85+
# darkness_ablaze = sdk.set.getSync("Darkness Ablaze")
8686
print(f"Set: {darkness_ablaze.name} ({darkness_ablaze.cardCount.total} cards)")
8787

8888
# Get series info
8989
swsh = await sdk.serie.get("swsh")
90-
# swsh = await sdk.serie.getSync("swsh")
90+
# swsh = sdk.serie.getSync("swsh")
9191
print(f"Series: {swsh.name} ({len(swsh.sets)} sets)")
9292
```
9393

0 commit comments

Comments
 (0)