Add EDHREC Rank
This commit is contained in:
parent
3b5f8a0934
commit
a4471f449c
2 changed files with 2 additions and 1 deletions
2
main.go
2
main.go
|
@ -61,7 +61,7 @@ func webhook(update tg.APIUpdate) {
|
||||||
|
|
||||||
photos := make([]tg.APIInlineQueryResultPhoto, len(results.Data))
|
photos := make([]tg.APIInlineQueryResultPhoto, len(results.Data))
|
||||||
for i, card := range results.Data {
|
for i, card := range results.Data {
|
||||||
caption := fmt.Sprintf("<a href=\"%s\">Scryfall</a> - <a href=\"%s\">EDHREC</a> - <a href=\"%s\">cardmarket</a> (%s €)", card.ScryfallURI, card.RelatedUris.Edhrec, card.PurchaseUris.Magiccardmarket)
|
caption := fmt.Sprintf("<a href=\"%s\">Scryfall</a> - <a href=\"%s\">EDHREC</a> (#%d) - <a href=\"%s\">cardmarket</a> (%s €)", card.ScryfallURI, card.RelatedUris.Edhrec, card.EdhrecRank, card.PurchaseUris.Magiccardmarket, card.Eur)
|
||||||
photos[i] = tg.APIInlineQueryResultPhoto{
|
photos[i] = tg.APIInlineQueryResultPhoto{
|
||||||
Type: "photo",
|
Type: "photo",
|
||||||
ResultID: card.ID,
|
ResultID: card.ID,
|
||||||
|
|
|
@ -30,6 +30,7 @@ type CardData struct {
|
||||||
BorderCrop string `json:"border_crop"`
|
BorderCrop string `json:"border_crop"`
|
||||||
} `json:"image_uris"`
|
} `json:"image_uris"`
|
||||||
Eur string `json:"eur"`
|
Eur string `json:"eur"`
|
||||||
|
EdhrecRank int `json:"edhrec_rank"`
|
||||||
RelatedUris struct {
|
RelatedUris struct {
|
||||||
Gatherer string `json:"gatherer"`
|
Gatherer string `json:"gatherer"`
|
||||||
TcgplayerDecks string `json:"tcgplayer_decks"`
|
TcgplayerDecks string `json:"tcgplayer_decks"`
|
||||||
|
|
Loading…
Reference in a new issue