v1.0.0 beta 15
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
package tgapi
|
||||
|
||||
// InputMediaType represents the type of input media.
|
||||
type InputMediaType string
|
||||
|
||||
const (
|
||||
// InputMediaTypeAnimation is a GIF or H.264/MPEG-4 AVC video without sound.
|
||||
InputMediaTypeAnimation InputMediaType = "animation"
|
||||
// InputMediaTypeDocument is a general file.
|
||||
InputMediaTypeDocument InputMediaType = "document"
|
||||
// InputMediaTypePhoto is a photo.
|
||||
InputMediaTypePhoto InputMediaType = "photo"
|
||||
// InputMediaTypeVideo is a video.
|
||||
InputMediaTypeVideo InputMediaType = "video"
|
||||
// InputMediaTypeAudio is an audio file.
|
||||
InputMediaTypeAudio InputMediaType = "audio"
|
||||
)
|
||||
|
||||
// InputMedia represents the content of a media message to be sent.
|
||||
// It is a union type described in https://core.telegram.org/bots/api#inputmedia.
|
||||
type InputMedia struct {
|
||||
Type InputMediaType `json:"type"`
|
||||
Media string `json:"media"`
|
||||
@@ -21,23 +39,18 @@ type InputMedia struct {
|
||||
Title *string `json:"title,omitempty"`
|
||||
}
|
||||
|
||||
type InputMediaType string
|
||||
|
||||
const (
|
||||
InputMediaTypeAnimation InputMediaType = "animation"
|
||||
InputMediaTypeDocument InputMediaType = "document"
|
||||
InputMediaTypePhoto InputMediaType = "photo"
|
||||
InputMediaTypeVideo InputMediaType = "video"
|
||||
InputMediaTypeAudio InputMediaType = "audio"
|
||||
)
|
||||
|
||||
// InputPaidMediaType represents the type of paid media.
|
||||
type InputPaidMediaType string
|
||||
|
||||
const (
|
||||
// InputPaidMediaTypeVideo represents a paid video.
|
||||
InputPaidMediaTypeVideo InputPaidMediaType = "video"
|
||||
// InputPaidMediaTypePhoto represents a paid photo.
|
||||
InputPaidMediaTypePhoto InputPaidMediaType = "photo"
|
||||
)
|
||||
|
||||
// InputPaidMedia describes the paid media to be sent.
|
||||
// See https://core.telegram.org/bots/api#inputpaidmedia
|
||||
type InputPaidMedia struct {
|
||||
Type InputPaidMediaType `json:"type"`
|
||||
Media string `json:"media"`
|
||||
@@ -50,6 +63,8 @@ type InputPaidMedia struct {
|
||||
SupportsStreaming bool `json:"supports_streaming"`
|
||||
}
|
||||
|
||||
// PhotoSize represents one size of a photo or a file/sticker thumbnail.
|
||||
// See https://core.telegram.org/bots/api#photosize
|
||||
type PhotoSize struct {
|
||||
FileID string `json:"file_id"`
|
||||
FileUniqueID string `json:"file_unique_id"`
|
||||
|
||||
Reference in New Issue
Block a user