cl-deck-builder2/doc/ygoprodeck-import.md

150 lines
2.9 KiB
Markdown
Raw Normal View History

2024-01-21 02:35:35 -05:00
# Introduction
The [Yu-Gi-Oh! API by YGOPRODeck](https://ygoprodeck.com/api-guide/) provides the following information.
# Data
The base data for cards. This is always returned, without asking for `?misc=Yes`.
JSON Node Name: `data`
## All Cards
Every card has these attributes.
- `id`: Passcode on the bottom left of the card.
- `desc`: Card description / effect text.
- `frameType`: The backdrop type that this card uses (normal, effect, synchro, spell, trap, etc.).
- `name`: Name of the card.
- `type`: The type of card you are viewing (Normal Monster, Effect Monster, Synchro Monster, Spell Card, Trap Card, etc.).
## Monster Cards
Cards that attack or defende have ATK and DEF. E.g. Spell and Trap do
not have these attributes, except Race. The Race of a Spell card is
"Spell" and the Race of a trap card is "Trap".
- `atk`: The ATK value of the card.
- `attribute`: The attribute of the card.
- `def`: The DEF value of the card.
- `level`: The Level/RANK of the card.
- `race`: The card race which is officially called type (Spellcaster, Warrior, Insect, etc).
## Spell/Trap Cards
- `race`: The card race which is officially called type for Spell/Trap Cards (Field, Equip, Counter, etc).
## Card Archetype
- `archetype`: The Archetype that the card belongs to. Alan takes
feedback on Archetypes
[here](https://github.com/AlanOC91/YGOPRODeck/issues/10).
## Additional Response for Pendulum Monsters
- `scale`: The Pendulum Scale Value.
## Additional Response for Link Monsters
- `linkval`: The Link Value of the card if it's of type "Link Monster".
- `linkmarkers`: The Link Markers of the card if it's of type "Link Monster". This information is returned as an array.
# Set Info
JSON Node Name: `data.card_sets`
Fields:
- `set_code`
- `set_name`
- `set_price`
- `set_rarity`
- `set_rarity_code`
# Images
JSON Node Name: `data.card_images`
Fields:
- `image_url`
- `image_url_cropped`
- `image_url_small`
# Pricing
JSON Node Name: `data.card_prices`
Fields:
- `amazon_price`
- `cardmarket_price`
- `coolstuffinc_price`
- `ebay_price`
- `tcgplayer_price`
# `misc_info`
JSON Node Name: `data.misc_info`
Fields:
- `beta_id`
- `beta_name`
- `downvotes`
- `has_effect`
- `konami_id`
- `misc_info`
- `ocg_date`
- `question_atk`
- `question_def`
- `staple`
- `tcg_date`
- `treated_as`
- `upvotes`
- `views`
- `viewsweek`
[Using &misc=yes will now show question_atk and/or question_def to be 1 for true if a card is found to have a ? in the data.]
(https://github.com/AlanOC91/YGOPRODeck/issues/152#issuecomment-1032552854)
## Banlist Info
JSON Node Name: `data.misc_info.banlist_info`
Fields:
- `ban_goat`
- `ban_ocg`
- `ban_tcg`
## Formats
JSON Node Name: `data.misc_info.formats`
Values:
- `Common Charity`
- `Duel Links`
- `Edison`
- `GOAT`
- `OCG`
- `OCG GOAT`
- `Speed Duel`
- `TCG`
## Link Markers
JSON Node Name: `data.misc_info.linkmarkers`
Values:
- `Top`
- `Top-Right`
- `Right`
- `Bottom-Right`
- `Bottom`
- `Bottom-Left`
- `Left`
- `Top-Left`