# HG changeset patch # User Mikael Berthe # Date 1495923125 -7200 # Node ID 0684ddad598c4db6667b8a7f316521098a7c13d4 # Parent b0badf6ec8e8fb3d67ac86dc865fcd8d03bcb667 Precise Attachment meta fields diff -r b0badf6ec8e8 -r 0684ddad598c types.go --- a/types.go Sat May 27 20:33:49 2017 +0000 +++ b/types.go Sun May 28 00:12:05 2017 +0200 @@ -55,13 +55,26 @@ // Attachment represents a Mastodon attachement entity type Attachment struct { - ID int64 `json:"id"` - Type string `json:"type"` - URL string `json:"url"` - RemoteURL *string `json:"remote_url"` - PreviewURL string `json:"preview_url"` - TextURL *string `json:"text_url"` - Meta *interface{} `json:"meta"` + ID int64 `json:"id"` + Type string `json:"type"` + URL string `json:"url"` + RemoteURL *string `json:"remote_url"` + PreviewURL string `json:"preview_url"` + TextURL *string `json:"text_url"` + Meta *struct { + Original struct { + Size string `json:"size"` + Aspect float64 `json:"aspect"` + Width int `json:"width"` + Height int `json:"height"` + } `json:"original"` + Small struct { + Size string `json:"size"` + Aspect float64 `json:"aspect"` + Width int `json:"width"` + Height int `json:"height"` + } `json:"small"` + } `json:"meta"` } // Card represents a Mastodon card entity