Webhook class

This class is used to create a webhook fetcher. It is a subclass of Fetcher.

Inheritance

Constructors

Webhook(HttpServer _server, {required String url, String? ipAddress, String secretPath = '', int port = 443, int? serverPort, int maxConnections = 40, List<String>? allowedUpdates, bool? dropPendingUpdates, File? certificate, File? privateKey, bool uploadCertificate = true})
Creates a Webhook fetcher.

Properties

allowedUpdates List<String>?
List the types of updates you want your bot to receive.
getter/setter pair
api RawAPI
Raw API instance.
latefinalinherited
certificate File?
Public key certificate.
getter/setter pair
dropPendingUpdates bool?
Pass True to drop all pending updates.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
ipAddress String?
Webhook ip address.
getter/setter pair
isActive bool
Flag to check if the webhook is running.
no setteroverride
maxConnections int
Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery.
getter/setter pair
port int
Webhook port.
getter/setter pair
privateKey File?
Private key certificate.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretPath String
Webhook secret path.
getter/setter pair
serverPort int?
Server port.
getter/setter pair
uploadCertificate bool
Whether to upload the certificate.
getter/setter pair
url String
Webhook url.
getter/setter pair

Methods

addUpdate(Update update) → void
Emit new update into the stream.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(FutureOr<void> onError(BotError err)) → void
Sets the error handler for long polling.
inherited
onUpdate() Stream<Update>
Handler for new updates.
inherited
setApi(RawAPI api) → void
Sets the Raw API instance.
inherited
setWebhook() Future<bool>
Sets the webhook.
start() Future<void>
Starts the webhook fetcher.
override
stop({bool dropPendingUpdates = false}) Future<void>
Stops the webhook fetcher.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited