/sets
現在、クエリパラメータとして使用できるのは名前とブロックのフィールドのみです。
一度に複数の名前またはブロックに対してクエリを実行するには、パイプで区切られたリスト(例: sets?name=khans|origins) を使用します
レスポンスフィールド
パラメータ | |
---|---|
name | セット名 |
block | セットの属するブロック |
その他のレスポンスフィールド
以下のフィールドも(NULLでない場合は)レスポンスの一部となりますが、
クエリパラメータとして使用することはできません。
パラメータ | |
---|---|
code | セットのコード名 |
gathererCode | Gatherer がセットで使用するコード。'code' と異なる場合のみ表示されます。 |
oldCode | いくつかのMagicソフトウェアで使用される古いスタイルのコード。'gathererCode' と 'code' が異なる場合のみ存在します。 |
magicCardsInfoCode | magiccards.infoがこのセットに使用するコード。magiccards.infoがこのセットを持っている場合のみ表示されます。 |
releaseDate | セットが発売された時期(YYYY-MM-DD)。プロモセットの場合、最初のカードが発売された日。 |
border | カードのボーダーの種類、"white"、"black"、"silver "のいずれか |
expansion | セットの種類 以下のいずれか: “core”, “expansion”, “reprint”, “box”, “un”, “from the vault”, “premium deck”, “duel deck”, “starter”, “commander”, “planechase”, “archenemy”, “promo”, “vanguard”, “masters” |
onlineOnly | オンラインのみで発売されたセットの場合、プレゼントされ、trueに設定されます。 |
booster | 本セットのブースター内容 |
サンプルコード
ruby
require 'mtg_sdk'
# Get all Sets
sets = MTG::Set.all
# Filter Sets
sets = MTG::Set.where(name: 'khans').all
# Get sets on a specific page / pageSize
sets = MTG::Set.where(page: 2).where(pageSize: 10).all
python
from mtgsdk import Set
# Get all Sets
sets = Set.all()
# Filter Sets
sets = Set.where(name='khans').all()
# Get sets on a specific page / pageSize
sets = Set.where(page=2).where(pageSize=10).all()
bash
# Get all sets
curl "https://api.magicthegathering.io/v1/sets"
# Filter cards
curl "https://api.magicthegathering.io/v1/sets?name=khans"
# Get specific page of data
curl "https://api.magicthegathering.io/v1/sets?page=2&pageSize=10"
レスポンス
レスポンス
{
"sets":[
{
"code":"KTK",
"name":"Khans of Tarkir",
"type":"expansion",
"border":"black",
"mkm_id":1495,
"booster":[
[
"rare",
"mythic rare"
],
"uncommon",
"uncommon",
"uncommon",
"common",
"common",
"common",
"common",
"common",
"common",
"common",
"common",
"common",
"common",
"land",
"marketing"
],
"mkm_name":"Khans of Tarkir",
"releaseDate":"2014-09-26",
"magicCardsInfoCode":"ktk",
"block":"Khans of Tarkir"
},
{ ... }.
{ ... }
]
}