Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data StickerType
- stickerLabel :: StickerType -> Text
- data StickerFile = StickerFile {}
- data SendStickerRequest = SendStickerRequest {
- sendStickerChatId :: SomeChatId
- sendStickerMessageThreadId :: Maybe MessageThreadId
- sendStickerSticker :: InputFile
- sendStickerDisableNotification :: Maybe Bool
- sendStickerProtectContent :: Maybe Bool
- sendStickerReplyToMessageId :: Maybe MessageId
- sendStickerAllowSendingWithoutReply :: Maybe Bool
- sendStickerReplyMarkup :: Maybe InlineKeyboardMarkup
- type SendStickerContent = "sendSticker" :> (MultipartForm Tmp SendStickerRequest :> Post '[JSON] (Response Message))
- type SendStickerLink = "sendSticker" :> (ReqBody '[JSON] SendStickerRequest :> Post '[JSON] (Response Message))
- sendSticker :: SendStickerRequest -> ClientM (Response Message)
- data GetCustomEmojiStickersRequest = GetCustomEmojiStickersRequest {}
- type GetCustomEmojiStickers = "getCustomEmojiStickers" :> (ReqBody '[JSON] GetCustomEmojiStickersRequest :> Post '[JSON] (Response [Sticker]))
- data UploadStickerFileRequest = UploadStickerFileRequest {}
- type UploadStickerFileContent = "uploadStickerFile" :> (MultipartForm Tmp UploadStickerFileRequest :> Post '[JSON] (Response File))
- type UploadStickerFileLink = "uploadStickerFile" :> (ReqBody '[JSON] UploadStickerFileRequest :> Post '[JSON] (Response File))
- uploadStickerFile :: UploadStickerFileRequest -> ClientM (Response File)
- data CreateNewStickerSetRequest = CreateNewStickerSetRequest {}
- type CreateNewStickerSetContent = "createNewStickerSet" :> (MultipartForm Tmp CreateNewStickerSetRequest :> Post '[JSON] (Response Bool))
- type CreateNewStickerSetLink = "createNewStickerSet" :> (ReqBody '[JSON] CreateNewStickerSetRequest :> Post '[JSON] (Response Bool))
- createNewStickerSet :: CreateNewStickerSetRequest -> ClientM (Response Bool)
- data AddStickerToSetRequest = AddStickerToSetRequest {}
- type AddStickerToSetContent = "addStickerToSet" :> (MultipartForm Tmp AddStickerToSetRequest :> Post '[JSON] (Response Bool))
- type AddStickerToSetLink = "addStickerToSet" :> (ReqBody '[JSON] AddStickerToSetRequest :> Post '[JSON] (Response Bool))
- addStickerToSet :: AddStickerToSetRequest -> ClientM (Response Bool)
- type GetStickerSet = "getStickerSet" :> (RequiredQueryParam "name" Text :> Get '[JSON] (Response StickerSet))
- getStickerSet :: Text -> ClientM (Response StickerSet)
- type SetStickerPositionInSet = "setStickerPositionInSet" :> (RequiredQueryParam "sticker" Text :> (RequiredQueryParam "position" Integer :> Post '[JSON] (Response Bool)))
- setStickerPositionInSet :: Text -> Integer -> ClientM (Response Bool)
- type DeleteStickerFromSet = "deleteStickerFromSet" :> (RequiredQueryParam "sticker" Text :> Post '[JSON] (Response Bool))
- deleteStickerFromSet :: Text -> ClientM (Response Bool)
- data SetStickerSetThumbRequest = SetStickerSetThumbRequest {}
- type SetStickerSetThumbContent = "setStickerSetThumb" :> (MultipartForm Tmp SetStickerSetThumbRequest :> Post '[JSON] (Response Bool))
- type SetStickerSetThumbLink = "setStickerSetThumb" :> (ReqBody '[JSON] SetStickerSetThumbRequest :> Post '[JSON] (Response Bool))
- setStickerSetThumb :: SetStickerSetThumbRequest -> ClientM (Response Bool)
Documentation
data StickerType Source #
Type of uploaded sticker file. Static or animated.
PngSticker | PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. |
TgsSticker | TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements. |
WebmSticker | WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements. |
stickerLabel :: StickerType -> Text Source #
data StickerFile Source #
Sticker file with static/animated label.
sendSticker
data SendStickerRequest Source #
Request parameters for sendSticker
.
SendStickerRequest | |
|
Instances
type SendStickerContent = "sendSticker" :> (MultipartForm Tmp SendStickerRequest :> Post '[JSON] (Response Message)) Source #
type SendStickerLink = "sendSticker" :> (ReqBody '[JSON] SendStickerRequest :> Post '[JSON] (Response Message)) Source #
sendSticker :: SendStickerRequest -> ClientM (Response Message) Source #
Use this method to send static .WEBP or animated .TGS stickers. On success, the sent Message is returned.
getCustomEmojiStickers
data GetCustomEmojiStickersRequest Source #
Request parameters for getCustomEmojiStickers
.
GetCustomEmojiStickersRequest | |
|
Instances
ToJSON GetCustomEmojiStickersRequest Source # | |
Generic GetCustomEmojiStickersRequest Source # | |
Defined in Telegram.Bot.API.Stickers type Rep GetCustomEmojiStickersRequest :: Type -> Type # | |
type Rep GetCustomEmojiStickersRequest Source # | |
Defined in Telegram.Bot.API.Stickers type Rep GetCustomEmojiStickersRequest = D1 ('MetaData "GetCustomEmojiStickersRequest" "Telegram.Bot.API.Stickers" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "GetCustomEmojiStickersRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCustomEmojiStickersRequestCustomEmojiIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text]))) |
type GetCustomEmojiStickers = "getCustomEmojiStickers" :> (ReqBody '[JSON] GetCustomEmojiStickersRequest :> Post '[JSON] (Response [Sticker])) Source #
uploadStickerFile
data UploadStickerFileRequest Source #
Request parameters for uploadStickerFile
.
UploadStickerFileRequest | |
|
Instances
ToJSON UploadStickerFileRequest Source # | |
Defined in Telegram.Bot.API.Stickers | |
Generic UploadStickerFileRequest Source # | |
Defined in Telegram.Bot.API.Stickers type Rep UploadStickerFileRequest :: Type -> Type # | |
ToMultipart Tmp UploadStickerFileRequest Source # | |
Defined in Telegram.Bot.API.Stickers | |
type Rep UploadStickerFileRequest Source # | |
Defined in Telegram.Bot.API.Stickers type Rep UploadStickerFileRequest = D1 ('MetaData "UploadStickerFileRequest" "Telegram.Bot.API.Stickers" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "UploadStickerFileRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "uploadStickerFileUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "uploadStickerFilePngSticker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputFile))) |
type UploadStickerFileContent = "uploadStickerFile" :> (MultipartForm Tmp UploadStickerFileRequest :> Post '[JSON] (Response File)) Source #
type UploadStickerFileLink = "uploadStickerFile" :> (ReqBody '[JSON] UploadStickerFileRequest :> Post '[JSON] (Response File)) Source #
uploadStickerFile :: UploadStickerFileRequest -> ClientM (Response File) Source #
Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
createNewStickerSet
data CreateNewStickerSetRequest Source #
Request parameters for createNewStickerSet
.
CreateNewStickerSetRequest | |
|
Instances
type CreateNewStickerSetContent = "createNewStickerSet" :> (MultipartForm Tmp CreateNewStickerSetRequest :> Post '[JSON] (Response Bool)) Source #
type CreateNewStickerSetLink = "createNewStickerSet" :> (ReqBody '[JSON] CreateNewStickerSetRequest :> Post '[JSON] (Response Bool)) Source #
createNewStickerSet :: CreateNewStickerSetRequest -> ClientM (Response Bool) Source #
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker or tgs_sticker. Returns True on success.
addStickerToSet
data AddStickerToSetRequest Source #
Request parameters for addStickerToSet
.
AddStickerToSetRequest | |
|
Instances
type AddStickerToSetContent = "addStickerToSet" :> (MultipartForm Tmp AddStickerToSetRequest :> Post '[JSON] (Response Bool)) Source #
type AddStickerToSetLink = "addStickerToSet" :> (ReqBody '[JSON] AddStickerToSetRequest :> Post '[JSON] (Response Bool)) Source #
addStickerToSet :: AddStickerToSetRequest -> ClientM (Response Bool) Source #
Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker or tgs_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.
getStickerSet
type GetStickerSet = "getStickerSet" :> (RequiredQueryParam "name" Text :> Get '[JSON] (Response StickerSet)) Source #
:: Text | Name of the sticker set |
-> ClientM (Response StickerSet) |
Use this method to get a sticker set. On success, a StickerSet object is returned.
setStickerPositionInSet
type SetStickerPositionInSet = "setStickerPositionInSet" :> (RequiredQueryParam "sticker" Text :> (RequiredQueryParam "position" Integer :> Post '[JSON] (Response Bool))) Source #
setStickerPositionInSet Source #
:: Text | File identifier of the sticker |
-> Integer | New sticker position in the set, zero-based |
-> ClientM (Response Bool) |
Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
deleteStickerFromSet
type DeleteStickerFromSet = "deleteStickerFromSet" :> (RequiredQueryParam "sticker" Text :> Post '[JSON] (Response Bool)) Source #
Use this method to delete a sticker from a set created by the bot. Returns True on success.
setStickerSetThumb
data SetStickerSetThumbRequest Source #
Request parameters for setStickerSetThumb
.
SetStickerSetThumbRequest | |
|
Instances
ToJSON SetStickerSetThumbRequest Source # | |
Defined in Telegram.Bot.API.Stickers | |
Generic SetStickerSetThumbRequest Source # | |
Defined in Telegram.Bot.API.Stickers type Rep SetStickerSetThumbRequest :: Type -> Type # | |
ToMultipart Tmp SetStickerSetThumbRequest Source # | |
Defined in Telegram.Bot.API.Stickers | |
type Rep SetStickerSetThumbRequest Source # | |
Defined in Telegram.Bot.API.Stickers type Rep SetStickerSetThumbRequest = D1 ('MetaData "SetStickerSetThumbRequest" "Telegram.Bot.API.Stickers" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "SetStickerSetThumbRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "setStickerSetThumbName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "setStickerSetThumbUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "setStickerSetThumbThumb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputFile)))) |
type SetStickerSetThumbContent = "setStickerSetThumb" :> (MultipartForm Tmp SetStickerSetThumbRequest :> Post '[JSON] (Response Bool)) Source #
type SetStickerSetThumbLink = "setStickerSetThumb" :> (ReqBody '[JSON] SetStickerSetThumbRequest :> Post '[JSON] (Response Bool)) Source #
setStickerSetThumb :: SetStickerSetThumbRequest -> ClientM (Response Bool) Source #
Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success.