GetUpdatesRequest

data class GetUpdatesRequest(offset: Long?, limit: Long?, timeout: Long?, allowed_updates: List<String>?) : TelegramRequest

Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.

Notes
1. This method will not work if an outgoing webhook is set up.
2. In order to avoid getting duplicate updates, recalculate offset after each server response.

Constructors

GetUpdatesRequest
Link copied to clipboard
fun GetUpdatesRequest(offset: Long? = null, limit: Long? = null, timeout: Long? = null, allowed_updates: List<String>? = null)

Properties

allowed_updates
Link copied to clipboard
val allowed_updates: List<String>? = null
A JSON-serialized list of the update types you want your bot to receive.
limit
Link copied to clipboard
val limit: Long? = null
Limits the number of updates to be retrieved.
offset
Link copied to clipboard
val offset: Long? = null
Identifier of the first update to be returned.
timeout
Link copied to clipboard
val timeout: Long? = null
Timeout in seconds for long polling.