Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data StickerType
- stickerLabel :: StickerType -> Text
- data StickerFile = StickerFile {}
- data SendStickerRequest = SendStickerRequest {}
- 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 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.
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.
data UploadStickerFileRequest Source #
Request parameters for uploadStickerFile
.
UploadStickerFileRequest | |
|
Instances
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.
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.
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.
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.
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.
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.
data SetStickerSetThumbRequest Source #
Request parameters for setStickerSetThumb
.
SetStickerSetThumbRequest | |
|
Instances
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.