Skip to content

Commit

Permalink
Merge pull request #19 from Doarakko/topic/add-missing-field
Browse files Browse the repository at this point in the history
add missing field
  • Loading branch information
Doarakko authored Mar 22, 2023
2 parents fc70fa7 + 07465fe commit f90ae04
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
11 changes: 6 additions & 5 deletions yugioh/card_set_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down
20 changes: 13 additions & 7 deletions yugioh/cards.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"`

Expand Down

0 comments on commit f90ae04

Please sign in to comment.