Safe Haskell | Safe-Inferred |
---|---|
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
- updatePoll :: Maybe Poll
- updatePollAnswer :: Maybe PollAnswer
- updateMyChatMember :: Maybe ChatMemberUpdated
- updateChatMember :: Maybe ChatMemberUpdated
- updateChatJoinRequest :: Maybe ChatJoinRequest
- 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.
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 |