Skip to content

Commit

Permalink
Add animation type
Browse files Browse the repository at this point in the history
  • Loading branch information
fullpipe committed Feb 29, 2020
1 parent 209b6f8 commit dcdaac9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions media.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,27 @@ func (v *Video) MediaFile() *File {
return &v.File
}

// Animation object represents a animation file.
type Animation struct {
File

Width int `json:"width"`
Height int `json:"height"`

Duration int `json:"duration,omitempty"`

// (Optional)
Caption string `json:"caption,omitempty"`
Thumbnail *Photo `json:"thumb,omitempty"`
MIME string `json:"mime_type,omitempty"`
FileName string `json:"file_name,omitempty"`
}

// MediaFile returns &Animation.File
func (v *Animation) MediaFile() *File {
return &v.File
}

// Voice object represents a voice note.
type Voice struct {
File
Expand Down

0 comments on commit dcdaac9

Please sign in to comment.