Safe Haskell | None |
---|---|
Language | Haskell2010 |
- getStickerSetM :: Text -> TelegramClient (Response StickerSet)
- uploadStickerFileM :: UploadStickerFileRequest -> TelegramClient (Response File)
- createNewStickerSetM :: CreateNewStickerSetRequest Text -> TelegramClient (Response Bool)
- createNewStickerSetM' :: CreateNewStickerSetRequest FileUpload -> TelegramClient (Response Bool)
- addStickerToSetM :: AddStickerToSetRequest Text -> TelegramClient (Response Bool)
- uploadStickerToSetM :: AddStickerToSetRequest FileUpload -> TelegramClient (Response Bool)
- setStickerPositionInSetM :: Text -> Int -> TelegramClient (Response Bool)
- deleteStickerFromSetM :: Text -> TelegramClient (Response Bool)
- type TelegramBotStickersAPI = (TelegramToken :> ("getStickerSet" :> (QueryParam "name" Text :> Get '[JSON] (Response StickerSet)))) :<|> ((TelegramToken :> ("uploadStickerFile" :> (MultipartFormDataReqBody UploadStickerFileRequest :> Post '[JSON] (Response File)))) :<|> ((TelegramToken :> ("createNewStickerSet" :> (ReqBody '[JSON] (CreateNewStickerSetRequest Text) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("createNewStickerSet" :> (MultipartFormDataReqBody (CreateNewStickerSetRequest FileUpload) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("addStickerToSet" :> (ReqBody '[JSON] (AddStickerToSetRequest Text) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("addStickerToSet" :> (MultipartFormDataReqBody (AddStickerToSetRequest FileUpload) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("setStickerPositionInSet" :> (QueryParam "sticker" Text :> (QueryParam "position" Int :> Post '[JSON] (Response Bool))))) :<|> (TelegramToken :> ("deleteStickerFromSet" :> (QueryParam "sticker" Text :> Post '[JSON] (Response Bool))))))))))
- stickerApi :: Proxy TelegramBotStickersAPI
Functions
:: Text | Name of the sticker set |
-> TelegramClient (Response StickerSet) |
Use this method to get a sticker set.
uploadStickerFileM :: UploadStickerFileRequest -> TelegramClient (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).
createNewStickerSetM :: CreateNewStickerSetRequest Text -> TelegramClient (Response Bool) Source #
Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set.
createNewStickerSetM' :: CreateNewStickerSetRequest FileUpload -> TelegramClient (Response Bool) Source #
addStickerToSetM :: AddStickerToSetRequest Text -> TelegramClient (Response Bool) Source #
Use this method to add a new sticker to a set created by the bot.
setStickerPositionInSetM Source #
:: Text | File identifier of the sticker |
-> Int | New sticker position in the set, zero-based |
-> TelegramClient (Response Bool) |
Use this method to move a sticker in a set created by the bot to a specific position.
deleteStickerFromSetM Source #
:: Text | File identifier of the sticker |
-> TelegramClient (Response Bool) |
Use this method to delete a sticker from a set created by the bot.
API
type TelegramBotStickersAPI = (TelegramToken :> ("getStickerSet" :> (QueryParam "name" Text :> Get '[JSON] (Response StickerSet)))) :<|> ((TelegramToken :> ("uploadStickerFile" :> (MultipartFormDataReqBody UploadStickerFileRequest :> Post '[JSON] (Response File)))) :<|> ((TelegramToken :> ("createNewStickerSet" :> (ReqBody '[JSON] (CreateNewStickerSetRequest Text) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("createNewStickerSet" :> (MultipartFormDataReqBody (CreateNewStickerSetRequest FileUpload) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("addStickerToSet" :> (ReqBody '[JSON] (AddStickerToSetRequest Text) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("addStickerToSet" :> (MultipartFormDataReqBody (AddStickerToSetRequest FileUpload) :> Post '[JSON] (Response Bool)))) :<|> ((TelegramToken :> ("setStickerPositionInSet" :> (QueryParam "sticker" Text :> (QueryParam "position" Int :> Post '[JSON] (Response Bool))))) :<|> (TelegramToken :> ("deleteStickerFromSet" :> (QueryParam "sticker" Text :> Post '[JSON] (Response Bool)))))))))) Source #
Telegram Bot API
stickerApi :: Proxy TelegramBotStickersAPI Source #
Proxy for Thelegram Bot API