Skip to content

Commit

Permalink
[Collections] Extend collection type with preview_image_url and origi…
Browse files Browse the repository at this point in the history
…nal_source_url (#67)

* [Collections] Extend collection type with preview_image_url andand original_source_url

* [Collections] don't send empty mimetype in response if it is not present (add omitempty)
  • Loading branch information
covain authored May 13, 2021
1 parent 74e8849 commit 0e04837
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions types/collectibles.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ var (

type (
Collection struct {
Id string `json:"id"`
Name string `json:"name"`
ImageUrl string `json:"image_url"`
Description string `json:"description"`
ExternalLink string `json:"external_link"`
Total int `json:"total"`
Address string `json:"address"`
Coin uint `json:"coin"`
Type string `json:"-"`
Id string `json:"id"`
Name string `json:"name"`
ImageUrl string `json:"image_url"`
Description string `json:"description"`
ExternalLink string `json:"external_link"`
Total int `json:"total"`
Address string `json:"address"`
Coin uint `json:"coin"`
Type string `json:"-"`
PreviewImageURL *CollectibleMedia `json:"preview_image_url,omitempty"`
OriginalSourceURL CollectibleMedia `json:"original_source_url"`
}

CollectionPage []Collection
Expand All @@ -30,7 +32,7 @@ type (
}

CollectibleMedia struct {
Mimetype string `json:"mimetype"`
Mimetype string `json:"mimetype,omitempty"`
URL string `json:"url"`
}

Expand Down

0 comments on commit 0e04837

Please sign in to comment.