Create interface for file data.
This commit is contained in:
parent
000cb2eb0e
commit
816532053b
7 changed files with 268 additions and 209 deletions
10
types.go
10
types.go
|
@ -1685,7 +1685,7 @@ type BaseInputMedia struct {
|
|||
// pass an HTTP URL for Telegram to get a file from the Internet,
|
||||
// or pass “attach://<file_attach_name>” to upload a new one
|
||||
// using multipart/form-data under <file_attach_name> name.
|
||||
Media interface{} `json:"media"`
|
||||
Media RequestFileData `json:"media"`
|
||||
// thumb intentionally missing as it is not currently compatible
|
||||
|
||||
// Caption of the video to be sent, 0-1024 characters after entities parsing.
|
||||
|
@ -1717,7 +1717,7 @@ type InputMediaVideo struct {
|
|||
// the file is supported server-side.
|
||||
//
|
||||
// optional
|
||||
Thumb interface{} `json:"thumb,omitempty"`
|
||||
Thumb RequestFileData `json:"thumb,omitempty"`
|
||||
// Width video width
|
||||
//
|
||||
// optional
|
||||
|
@ -1743,7 +1743,7 @@ type InputMediaAnimation struct {
|
|||
// the file is supported server-side.
|
||||
//
|
||||
// optional
|
||||
Thumb interface{} `json:"thumb,omitempty"`
|
||||
Thumb RequestFileData `json:"thumb,omitempty"`
|
||||
// Width video width
|
||||
//
|
||||
// optional
|
||||
|
@ -1765,7 +1765,7 @@ type InputMediaAudio struct {
|
|||
// the file is supported server-side.
|
||||
//
|
||||
// optional
|
||||
Thumb interface{} `json:"thumb,omitempty"`
|
||||
Thumb RequestFileData `json:"thumb,omitempty"`
|
||||
// Duration of the audio in seconds
|
||||
//
|
||||
// optional
|
||||
|
@ -1787,7 +1787,7 @@ type InputMediaDocument struct {
|
|||
// the file is supported server-side.
|
||||
//
|
||||
// optional
|
||||
Thumb interface{} `json:"thumb,omitempty"`
|
||||
Thumb RequestFileData `json:"thumb,omitempty"`
|
||||
// DisableContentTypeDetection disables automatic server-side content type
|
||||
// detection for files uploaded using multipart/form-data. Always true, if
|
||||
// the document is sent as part of an album
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue