Response class

This object is not explicitly described as an object in the Telegram Bot API.

The response contains a JSON object, which always has a Boolean field 'ok' and may have an optional String field 'description' with a human-readable description of the result. If 'ok' equals True, the request was successful and the result of the query can be found in the 'result' field. In case of an unsuccessful request, 'ok' equals false and the error is explained in the 'description'. An Integer 'error_code' field is also returned, but its contents are subject to change in the future. Some errors may also have an optional field 'parameters' of the type ResponseParameters, which can help to automatically handle the error.

https://core.telegram.org/bots/api#making-requests

Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake)

Constructors

Response({required bool ok})
Response.fromJson(Map<String, dynamic> json)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
ok bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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