| 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
updateChatId :: Update -> Maybe ChatId #
extractUpdateMessage :: Update -> Maybe Message #
getUpdates
type GetUpdates = "getUpdates" :> (ReqBody '[JSON] GetUpdatesRequest :> Get '[JSON] (Response [Update])) #
getUpdates :: GetUpdatesRequest -> ClientM (Response [Update]) #
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 #
Request parameters for getUpdates.
Constructors
| GetUpdatesRequest | |
Fields
| |
Instances
data UpdateType #
Constructors
| UpdateMessage | |
| UpdateEditedMessage | |
| UpdateChannelPost | |
| UpdateEditedChannelPost | |
| UpdateInlineQuery | |
| UpdateChosenInlineResult | |
| UpdateCallbackQuery | |
| UpdateShippingQuery | |
| UpdatePreCheckoutQuery |
Instances
| Generic UpdateType # | |
Defined in Telegram.Bot.API.GettingUpdates Associated Types type Rep UpdateType :: * -> * # | |
| ToJSON UpdateType # | |
Defined in Telegram.Bot.API.GettingUpdates Methods toJSON :: UpdateType -> Value # toEncoding :: UpdateType -> Encoding # toJSONList :: [UpdateType] -> Value # toEncodingList :: [UpdateType] -> Encoding # | |
| FromJSON UpdateType # | |
Defined in Telegram.Bot.API.GettingUpdates | |
| type Rep UpdateType # | |
Defined in Telegram.Bot.API.GettingUpdates type Rep UpdateType = D1 (MetaData "UpdateType" "Telegram.Bot.API.GettingUpdates" "telegram-bot-simple-0.2.0-30Dbdj1yZMLJwyEfV4lOMc" False) (((C1 (MetaCons "UpdateMessage" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UpdateEditedMessage" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "UpdateChannelPost" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UpdateEditedChannelPost" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "UpdateInlineQuery" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UpdateChosenInlineResult" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "UpdateCallbackQuery" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "UpdateShippingQuery" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UpdatePreCheckoutQuery" PrefixI False) (U1 :: * -> *))))) | |