From 42375463f865bc18368d155f49ea957b6a26b150 Mon Sep 17 00:00:00 2001 From: peperoncino <2wua4nlyi@gmail.com> Date: Wed, 22 Mar 2023 18:41:07 +0900 Subject: [PATCH 1/2] add card name field --- yugioh/card_set_info.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/yugioh/card_set_info.go b/yugioh/card_set_info.go index ddf516d..29ec4b1 100644 --- a/yugioh/card_set_info.go +++ b/yugioh/card_set_info.go @@ -9,11 +9,12 @@ type CardSetInfoService struct { // CardSetInfo ... type CardSetInfo struct { - ID int `json:"id"` - Name string `json:"set_name"` - Code string `json:"set_code"` - Rarity string `json:"set_rarity"` - Price float32 `json:"set_price,string"` + ID int `json:"id"` + Name string `json:"name"` + Price float32 `json:"set_price,string"` + SetName string `json:"set_name"` + Code string `json:"set_code"` + Rarity string `json:"set_rarity"` } // CardSetInfoOneOptions ... From 838d03ee10bafff5b0379db68493d91b085e0a23 Mon Sep 17 00:00:00 2001 From: peperoncino <2wua4nlyi@gmail.com> Date: Wed, 22 Mar 2023 18:42:09 +0900 Subject: [PATCH 2/2] add frametype and croppedurl, konamidid, haseffect --- yugioh/cards.go | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/yugioh/cards.go b/yugioh/cards.go index 7720d9c..3263eca 100644 --- a/yugioh/cards.go +++ b/yugioh/cards.go @@ -22,6 +22,7 @@ type Card struct { ID int32 `json:"id"` Name string `json:"name"` Type string `json:"type"` + FrameType string `json:"frameType"` Description string `json:"desc"` Race string `json:"race"` Archetype string `json:"archetype"` @@ -83,9 +84,10 @@ type BanListInfo struct { // Image card image. type Image struct { - ID int32 `json:"id"` - URL string `json:"image_url"` - SmallURL string `json:"image_url_small"` + ID int32 `json:"id"` + URL string `json:"image_url"` + SmallURL string `json:"image_url_small"` + CroppedURL string `json:"image_url_cropped"` } // Misc if you want to get, set "yes" to Misc param @@ -129,14 +131,18 @@ type Meta struct { // CardsListOptions specifies the optional parameters to various CardsService.List methods. type CardsListOptions struct { - ID int32 `url:"name,omitempty"` - Name string `url:"name,omitempty"` + // must be comma separated. You can't use this with Name field. + IDs string `url:"id,omitempty"` + Name string `url:"name,omitempty"` + Q string `url:"fname,omitempty"` + KonamiID string `url:"konami_id,omitempty"` Type string `url:"type,omitempty"` Race string `url:"race,omitempty"` Archetype string `url:"archetype,omitempty"` - Set string `url:"set,omitempty"` - BanList string `url:"banlist,omitempty"` + Set string `url:"cardset,omitempty"` + BanList string `url:"banlist,omitempty,oneof=TCG OCG Goat"` + HasEffect bool `url:"has_effect,omitempty"` Sort string `url:"sort,omitempty" validate:"omitempty,oneof=atk def name type level id new"`