Add Meta field to Attachment

pull/90/head
Jessica Paczuski 2019-01-29 10:24:07 +01:00 committed by mattn
parent 4def10a243
commit 814e71920d
1 changed files with 22 additions and 7 deletions

View File

@ -232,6 +232,21 @@ type Attachment struct {
PreviewURL string `json:"preview_url"`
TextURL string `json:"text_url"`
Description string `json:"description"`
Meta AttachmentMeta `json:"meta"`
}
// AttachmentMeta holds information for attachment metadata.
type AttachmentMeta struct {
Original Size `json:"original"`
Small Size `json:"small"`
}
// Size holds information for attatchment size.
type Size struct {
Width int64 `json:"width"`
Height int64 `json:"height"`
Size string `json:"size"`
Aspect float64 `json:"aspect"`
}
// Emoji hold information for CustomEmoji.