module Web.Telegram.API.Bot.API.Messages
(
sendMessage
, sendMessageM
, forwardMessage
, forwardMessageM
, uploadPhoto
, uploadPhotoM
, sendPhoto
, sendPhotoM
, uploadAudio
, uploadAudioM
, sendAudio
, sendAudioM
, uploadDocument
, uploadDocumentM
, sendDocument
, sendDocumentM
, uploadSticker
, uploadStickerM
, sendSticker
, sendStickerM
, uploadVideo
, uploadVideoM
, sendVideo
, sendVideoM
, uploadVoice
, uploadVoiceM
, sendVoice
, sendVoiceM
, uploadVideoNote
, uploadVideoNoteM
, sendVideoNote
, sendVideoNoteM
, sendMediaGroupM
, sendLocation
, sendLocationM
, sendVenue
, sendVenueM
, sendContact
, sendContactM
, sendChatAction
, sendChatActionM
, sendGame
, sendGameM
, TelegramBotMessagesAPI
, messagesApi
) where
import Data.Proxy
import Data.Text (Text)
import Network.HTTP.Client (Manager)
import Servant.API
import Servant.Client
import Servant.Client.MultipartFormData
import Web.Telegram.API.Bot.API.Core
import Web.Telegram.API.Bot.Data
import Web.Telegram.API.Bot.Requests
import Web.Telegram.API.Bot.Responses
type TelegramBotMessagesAPI =
TelegramToken :> "sendMessage"
:> ReqBody '[JSON] SendMessageRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "forwardMessage"
:> ReqBody '[JSON] ForwardMessageRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendPhoto"
:> MultipartFormDataReqBody (SendPhotoRequest FileUpload)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendPhoto"
:> ReqBody '[JSON] (SendPhotoRequest Text)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendAudio"
:> MultipartFormDataReqBody (SendAudioRequest FileUpload)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendAudio"
:> ReqBody '[JSON] (SendAudioRequest Text)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendDocument"
:> MultipartFormDataReqBody (SendDocumentRequest FileUpload)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendDocument"
:> ReqBody '[JSON] (SendDocumentRequest Text)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendSticker"
:> MultipartFormDataReqBody (SendStickerRequest FileUpload)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendSticker"
:> ReqBody '[JSON] (SendStickerRequest Text)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendVideo"
:> MultipartFormDataReqBody (SendVideoRequest FileUpload)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendVideo"
:> ReqBody '[JSON] (SendVideoRequest Text)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendVoice"
:> MultipartFormDataReqBody (SendVoiceRequest FileUpload)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendVoice"
:> ReqBody '[JSON] (SendVoiceRequest Text)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendVideoNote"
:> MultipartFormDataReqBody (SendVideoNoteRequest FileUpload)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendVideoNote"
:> ReqBody '[JSON] (SendVideoNoteRequest Text)
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendMediaGroup"
:> ReqBody '[JSON] SendMediaGroupRequest
:> Post '[JSON] (Response [Message])
:<|> TelegramToken :> "sendLocation"
:> ReqBody '[JSON] SendLocationRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendVenue"
:> ReqBody '[JSON] SendVenueRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendContact"
:> ReqBody '[JSON] SendContactRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "sendChatAction"
:> ReqBody '[JSON] SendChatActionRequest
:> Post '[JSON] ChatActionResponse
:<|> TelegramToken :> "sendGame"
:> ReqBody '[JSON] SendGameRequest
:> Post '[JSON] MessageResponse
messagesApi :: Proxy TelegramBotMessagesAPI
messagesApi = Proxy
sendMessage_ :: Token -> SendMessageRequest -> ClientM MessageResponse
forwardMessage_ :: Token -> ForwardMessageRequest -> ClientM MessageResponse
uploadPhoto_ :: Token -> SendPhotoRequest FileUpload -> ClientM MessageResponse
sendPhoto_ :: Token -> SendPhotoRequest Text -> ClientM MessageResponse
uploadAudio_ :: Token -> SendAudioRequest FileUpload -> ClientM MessageResponse
sendAudio_ :: Token -> SendAudioRequest Text -> ClientM MessageResponse
uploadDocument_ :: Token -> SendDocumentRequest FileUpload -> ClientM MessageResponse
sendDocument_ :: Token -> SendDocumentRequest Text -> ClientM MessageResponse
uploadSticker_ :: Token -> SendStickerRequest FileUpload -> ClientM MessageResponse
sendSticker_ :: Token -> SendStickerRequest Text -> ClientM MessageResponse
uploadVideo_ :: Token -> SendVideoRequest FileUpload -> ClientM MessageResponse
sendVideo_ :: Token -> SendVideoRequest Text -> ClientM MessageResponse
uploadVoice_ :: Token -> SendVoiceRequest FileUpload -> ClientM MessageResponse
sendVoice_ :: Token -> SendVoiceRequest Text -> ClientM MessageResponse
uploadVideoNote_ :: Token -> SendVideoNoteRequest FileUpload -> ClientM MessageResponse
sendVideoNote_ :: Token -> SendVideoNoteRequest Text -> ClientM MessageResponse
sendMediaGroup_ :: Token -> SendMediaGroupRequest -> ClientM (Response [Message])
sendLocation_ :: Token -> SendLocationRequest -> ClientM MessageResponse
sendVenue_ :: Token -> SendVenueRequest-> ClientM MessageResponse
sendContact_ :: Token -> SendContactRequest -> ClientM MessageResponse
sendChatAction_ :: Token -> SendChatActionRequest -> ClientM ChatActionResponse
sendGame_ :: Token -> SendGameRequest -> ClientM MessageResponse
sendMessage_
:<|> forwardMessage_
:<|> uploadPhoto_
:<|> sendPhoto_
:<|> uploadAudio_
:<|> sendAudio_
:<|> uploadDocument_
:<|> sendDocument_
:<|> uploadSticker_
:<|> sendSticker_
:<|> uploadVideo_
:<|> sendVideo_
:<|> uploadVoice_
:<|> sendVoice_
:<|> uploadVideoNote_
:<|> sendVideoNote_
:<|> sendMediaGroup_
:<|> sendLocation_
:<|> sendVenue_
:<|> sendContact_
:<|> sendChatAction_
:<|> sendGame_
= client messagesApi
sendMessage :: Token -> SendMessageRequest -> Manager -> IO (Either ServantError MessageResponse)
sendMessage = runM sendMessageM
sendMessageM :: SendMessageRequest -> TelegramClient MessageResponse
sendMessageM = run_ sendMessage_
forwardMessage :: Token -> ForwardMessageRequest -> Manager -> IO (Either ServantError MessageResponse)
forwardMessage = runM forwardMessageM
forwardMessageM :: ForwardMessageRequest -> TelegramClient MessageResponse
forwardMessageM = run_ forwardMessage_
uploadPhoto :: Token -> SendPhotoRequest FileUpload -> Manager -> IO (Either ServantError MessageResponse)
uploadPhoto = runM uploadPhotoM
uploadPhotoM :: SendPhotoRequest FileUpload -> TelegramClient MessageResponse
uploadPhotoM = run_ uploadPhoto_
sendPhoto :: Token -> SendPhotoRequest Text -> Manager -> IO (Either ServantError MessageResponse)
sendPhoto = runM sendPhotoM
sendPhotoM :: SendPhotoRequest Text -> TelegramClient MessageResponse
sendPhotoM = run_ sendPhoto_
uploadAudio :: Token -> SendAudioRequest FileUpload -> Manager -> IO (Either ServantError MessageResponse)
uploadAudio = runM uploadAudioM
uploadAudioM :: SendAudioRequest FileUpload -> TelegramClient MessageResponse
uploadAudioM = run_ uploadAudio_
sendAudio :: Token -> SendAudioRequest Text -> Manager -> IO (Either ServantError MessageResponse)
sendAudio = runM sendAudioM
sendAudioM :: SendAudioRequest Text -> TelegramClient MessageResponse
sendAudioM = run_ sendAudio_
uploadDocument :: Token -> SendDocumentRequest FileUpload -> Manager -> IO (Either ServantError MessageResponse)
uploadDocument = runM uploadDocumentM
uploadDocumentM :: SendDocumentRequest FileUpload -> TelegramClient MessageResponse
uploadDocumentM = run_ uploadDocument_
sendDocument :: Token -> SendDocumentRequest Text -> Manager -> IO (Either ServantError MessageResponse)
sendDocument = runM sendDocumentM
sendDocumentM :: SendDocumentRequest Text -> TelegramClient MessageResponse
sendDocumentM = run_ sendDocument_
uploadSticker :: Token -> SendStickerRequest FileUpload -> Manager -> IO (Either ServantError MessageResponse)
uploadSticker = runM uploadStickerM
uploadStickerM :: SendStickerRequest FileUpload -> TelegramClient MessageResponse
uploadStickerM = run_ uploadSticker_
sendSticker :: Token -> SendStickerRequest Text -> Manager -> IO (Either ServantError MessageResponse)
sendSticker = runM sendStickerM
sendStickerM :: SendStickerRequest Text -> TelegramClient MessageResponse
sendStickerM = run_ sendSticker_
uploadVideo :: Token -> SendVideoRequest FileUpload -> Manager -> IO (Either ServantError MessageResponse)
uploadVideo = runM uploadVideoM
uploadVideoM :: SendVideoRequest FileUpload -> TelegramClient MessageResponse
uploadVideoM = run_ uploadVideo_
sendVideo :: Token -> SendVideoRequest Text -> Manager -> IO (Either ServantError MessageResponse)
sendVideo = runM sendVideoM
sendVideoM :: SendVideoRequest Text -> TelegramClient MessageResponse
sendVideoM = run_ sendVideo_
uploadVoice :: Token -> SendVoiceRequest FileUpload -> Manager -> IO (Either ServantError MessageResponse)
uploadVoice = runM uploadVoiceM
uploadVoiceM :: SendVoiceRequest FileUpload -> TelegramClient MessageResponse
uploadVoiceM = run_ uploadVoice_
sendVoice :: Token -> SendVoiceRequest Text -> Manager -> IO (Either ServantError MessageResponse)
sendVoice = runM sendVoiceM
sendVoiceM :: SendVoiceRequest Text -> TelegramClient MessageResponse
sendVoiceM = run_ sendVoice_
uploadVideoNote :: Token -> SendVideoNoteRequest FileUpload -> Manager -> IO (Either ServantError MessageResponse)
uploadVideoNote = runM uploadVideoNoteM
uploadVideoNoteM :: SendVideoNoteRequest FileUpload -> TelegramClient MessageResponse
uploadVideoNoteM = run_ uploadVideoNote_
sendVideoNote :: Token -> SendVideoNoteRequest Text -> Manager -> IO (Either ServantError MessageResponse)
sendVideoNote = runM sendVideoNoteM
sendVideoNoteM :: SendVideoNoteRequest Text -> TelegramClient MessageResponse
sendVideoNoteM = run_ sendVideoNote_
sendLocation :: Token -> SendLocationRequest -> Manager -> IO (Either ServantError MessageResponse)
sendLocation = runM sendLocationM
sendLocationM :: SendLocationRequest -> TelegramClient MessageResponse
sendLocationM = run_ sendLocation_
sendMediaGroupM :: SendMediaGroupRequest -> TelegramClient (Response [Message])
sendMediaGroupM = run_ sendMediaGroup_
sendVenue :: Token -> SendVenueRequest -> Manager -> IO (Either ServantError MessageResponse)
sendVenue = runM sendVenueM
sendVenueM :: SendVenueRequest -> TelegramClient MessageResponse
sendVenueM = run_ sendVenue_
sendContact :: Token -> SendContactRequest -> Manager -> IO (Either ServantError MessageResponse)
sendContact = runM sendContactM
sendContactM :: SendContactRequest -> TelegramClient MessageResponse
sendContactM = run_ sendContact_
sendChatAction :: Token -> SendChatActionRequest -> Manager -> IO (Either ServantError ChatActionResponse)
sendChatAction = runM sendChatActionM
sendChatActionM :: SendChatActionRequest -> TelegramClient ChatActionResponse
sendChatActionM = run_ sendChatAction_
sendGame :: Token -> SendGameRequest -> Manager -> IO (Either ServantError MessageResponse)
sendGame = runM sendGameM
sendGameM :: SendGameRequest -> TelegramClient MessageResponse
sendGameM = run_ sendGame_