module Web.Telegram.API.Bot.API.Edit
(
editMessageText
, editMessageTextM
, editMessageCaption
, editMessageCaptionM
, editMessageReplyMarkup
, editMessageReplyMarkupM
, editInlineMessageText
, editInlineMessageTextM
, editInlineMessageCaption
, editInlineMessageCaptionM
, editInlineMessageReplyMarkup
, editInlineMessageReplyMarkupM
, editMessageLiveLocationM
, stopMessageLiveLocationM
, TelegramBotEditAPI
, editApi
) where
import Data.Proxy
import Network.HTTP.Client (Manager)
import Servant.API
import Servant.Client
import Web.Telegram.API.Bot.API.Core
import Web.Telegram.API.Bot.Requests
import Web.Telegram.API.Bot.Responses
type TelegramBotEditAPI =
TelegramToken :> "editMessageText"
:> ReqBody '[JSON] EditMessageTextRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "editMessageCaption"
:> ReqBody '[JSON] EditMessageCaptionRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "editMessageReplyMarkup"
:> ReqBody '[JSON] EditMessageReplyMarkupRequest
:> Post '[JSON] MessageResponse
:<|> TelegramToken :> "editMessageText"
:> ReqBody '[JSON] EditMessageTextRequest
:> Post '[JSON] (Response Bool)
:<|> TelegramToken :> "editMessageCaption"
:> ReqBody '[JSON] EditMessageCaptionRequest
:> Post '[JSON] (Response Bool)
:<|> TelegramToken :> "editMessageReplyMarkup"
:> ReqBody '[JSON] EditMessageReplyMarkupRequest
:> Post '[JSON] (Response Bool)
:<|> TelegramToken :> "editMessageLiveLocation"
:> ReqBody '[JSON] EditMessageLiveLocationRequest
:> Post '[JSON] (Response Bool)
:<|> TelegramToken :> "stopMessageLiveLocation"
:> ReqBody '[JSON] StopMessageLiveLocationRequest
:> Post '[JSON] (Response Bool)
editApi :: Proxy TelegramBotEditAPI
editApi = Proxy
editMessageText_ :: Token -> EditMessageTextRequest -> ClientM MessageResponse
editMessageCaption_ :: Token -> EditMessageCaptionRequest -> ClientM MessageResponse
editMessageReplyMarkup_ :: Token -> EditMessageReplyMarkupRequest -> ClientM MessageResponse
editMessageText__ :: Token -> EditMessageTextRequest -> ClientM (Response Bool)
editMessageCaption__ :: Token -> EditMessageCaptionRequest -> ClientM (Response Bool)
editMessageReplyMarkup__ :: Token -> EditMessageReplyMarkupRequest -> ClientM (Response Bool)
editMessageLiveLocation_ :: Token -> EditMessageLiveLocationRequest -> ClientM (Response Bool)
stopMessageLiveLocation_ :: Token -> StopMessageLiveLocationRequest -> ClientM (Response Bool)
editMessageText_
:<|> editMessageCaption_
:<|> editMessageReplyMarkup_
:<|> editMessageText__
:<|> editMessageCaption__
:<|> editMessageReplyMarkup__
:<|> editMessageLiveLocation_
:<|> stopMessageLiveLocation_
= client editApi
editMessageText :: Token -> EditMessageTextRequest -> Manager -> IO (Either ServantError MessageResponse)
editMessageText = runM editMessageTextM
editMessageTextM :: EditMessageTextRequest -> TelegramClient MessageResponse
editMessageTextM = run_ editMessageText_
editMessageCaption :: Token -> EditMessageCaptionRequest -> Manager -> IO (Either ServantError MessageResponse)
editMessageCaption = runM editMessageCaptionM
editMessageCaptionM :: EditMessageCaptionRequest -> TelegramClient MessageResponse
editMessageCaptionM = run_ editMessageCaption_
editMessageReplyMarkup :: Token -> EditMessageReplyMarkupRequest -> Manager -> IO (Either ServantError MessageResponse)
editMessageReplyMarkup = runM editMessageReplyMarkupM
editMessageReplyMarkupM :: EditMessageReplyMarkupRequest -> TelegramClient MessageResponse
editMessageReplyMarkupM = run_ editMessageReplyMarkup_
editInlineMessageText :: Token -> EditMessageTextRequest -> Manager -> IO (Either ServantError (Response Bool))
editInlineMessageText = runM editInlineMessageTextM
editInlineMessageTextM :: EditMessageTextRequest -> TelegramClient (Response Bool)
editInlineMessageTextM = run_ editMessageText__
editInlineMessageCaption :: Token -> EditMessageCaptionRequest -> Manager -> IO (Either ServantError (Response Bool))
editInlineMessageCaption = runM editInlineMessageCaptionM
editInlineMessageCaptionM :: EditMessageCaptionRequest -> TelegramClient (Response Bool)
editInlineMessageCaptionM = run_ editMessageCaption__
editInlineMessageReplyMarkup :: Token -> EditMessageReplyMarkupRequest -> Manager -> IO (Either ServantError (Response Bool))
editInlineMessageReplyMarkup = runM editInlineMessageReplyMarkupM
editInlineMessageReplyMarkupM :: EditMessageReplyMarkupRequest -> TelegramClient (Response Bool)
editInlineMessageReplyMarkupM = run_ editMessageReplyMarkup__
editMessageLiveLocationM :: EditMessageLiveLocationRequest -> TelegramClient (Response Bool)
editMessageLiveLocationM = run_ editMessageLiveLocation_
stopMessageLiveLocationM :: StopMessageLiveLocationRequest -> TelegramClient (Response Bool)
stopMessageLiveLocationM = run_ stopMessageLiveLocation_