| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Telegram.Bot.API.GettingUpdates
Contents
Synopsis
- newtype UpdateId = UpdateId Int32
- data Update = Update {}
- 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
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
Constructors
| Update | |
Fields
| |
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.
Constructors
| GetUpdatesRequest | |
Fields
| |
Instances
data UpdateType Source #
Constructors
| UpdateMessage | |
| UpdateEditedMessage | |
| UpdateChannelPost | |
| UpdateEditedChannelPost | |
| UpdateInlineQuery | |
| UpdateChosenInlineResult | |
| UpdateCallbackQuery | |
| UpdateShippingQuery | |
| UpdatePreCheckoutQuery |