Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype UpdateId = UpdateId Int
- data Update = Update {
- updateUpdateId :: UpdateId
- updateMessage :: Maybe Message
- updateEditedMessage :: Maybe Message
- updateChannelPost :: Maybe Message
- updateEditedChannelPost :: Maybe Message
- updateInlineQuery :: Maybe InlineQuery
- updateChosenInlineResult :: Maybe ChosenInlineResult
- updateCallbackQuery :: Maybe CallbackQuery
- updateShippingQuery :: Maybe ShippingQuery
- updatePreCheckoutQuery :: Maybe PreCheckoutQuery
- updateChatId :: Update -> Maybe ChatId
- extractUpdateMessage :: Update -> Maybe Message
- type GetUpdates = "getUpdates" :> (ReqBody '[JSON] GetUpdatesRequest :> Get '[JSON] (Response [Update]))
- getUpdates :: GetUpdatesRequest -> ClientM (Response [Update])
- data GetUpdatesRequest = GetUpdatesRequest {}
- data UpdateType
Update
Instances
Eq UpdateId Source # | |
Ord UpdateId Source # | |
Defined in Telegram.Bot.API.GettingUpdates | |
Show UpdateId Source # | |
FromJSON UpdateId Source # | |
Defined in Telegram.Bot.API.GettingUpdates parseJSON :: Value -> Parser UpdateId parseJSONList :: Value -> Parser [UpdateId] | |
ToJSON UpdateId Source # | |
Defined in Telegram.Bot.API.GettingUpdates toEncoding :: UpdateId -> Encoding toJSONList :: [UpdateId] -> Value toEncodingList :: [UpdateId] -> Encoding |
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
Update | |
|
Instances
getUpdates
type GetUpdates = "getUpdates" :> (ReqBody '[JSON] GetUpdatesRequest :> Get '[JSON] (Response [Update])) Source #
getUpdates :: GetUpdatesRequest -> ClientM (Response [Update]) Source #
Use this method to receive incoming updates using long polling.
An list of Update
objects is returned.
NOTE: This method will not work if an outgoing webhook is set up.
NOTE: In order to avoid getting duplicate updates, recalculate offset after each server response.
data GetUpdatesRequest Source #
Request parameters for getUpdates
.
GetUpdatesRequest | |
|
Instances
data UpdateType Source #
UpdateMessage | |
UpdateEditedMessage | |
UpdateChannelPost | |
UpdateEditedChannelPost | |
UpdateInlineQuery | |
UpdateChosenInlineResult | |
UpdateCallbackQuery | |
UpdateShippingQuery | |
UpdatePreCheckoutQuery |