@@ -93,20 +93,20 @@ func (c *Card) Fill() {
9393}
9494
9595type Edition struct {
96- Set string `json:"set" db:"set_name" `
97- SetId string `json:"-" db:"set_id" `
98- CardId string `json:"-" db:"card_id" `
96+ Set string `json:"set"`
97+ SetId string `json:"-"`
98+ CardId string `json:"-"`
9999 Watermark string `json:"watermark,omitempty"`
100100 Rarity string `json:"rarity"`
101101 Border string `json:"-"`
102102 Artist string `json:"artist"`
103- MultiverseId int `json:"multiverse_id" db:"eid" `
103+ MultiverseId int `json:"multiverse_id"`
104104 Flavor string `json:"flavor,omitempty"`
105- Number string `json:"number" db:"set_number" `
105+ Number string `json:"number"`
106106 Layout string `json:"layout"`
107- Href string `json:"url,omitempty" db:"-" `
108- ImageUrl string `json:"image_url,omitempty" db:"-" `
109- SetUrl string `json:"set_url,omitempty" db:"-" `
107+ Href string `json:"url,omitempty"`
108+ ImageUrl string `json:"image_url,omitempty"`
109+ SetUrl string `json:"set_url,omitempty"`
110110}
111111
112112func (e * Edition ) Fill () {
@@ -120,11 +120,13 @@ type Set struct {
120120 Name string `json:"name"`
121121 Border string `json:"border"`
122122 Type string `json:"type"`
123- Href string `json:"url" db:"-"`
123+ Href string `json:"url"`
124+ CardsUrl string `json:"cards_url"`
124125}
125126
126127func (s * Set ) Fill () {
127128 s .Href = fmt .Sprintf ("%s/mtg/sets/%s" , GetHostname (), s .Id )
129+ s .CardsUrl = fmt .Sprintf ("%s/mtg/cards?set=%s" , GetHostname (), s .Id )
128130}
129131
130132func JSON (code int , val interface {}) (int , []byte ) {
0 commit comments