telegram.TelegramObject¶
-
class
telegram.
TelegramObject
¶ Bases:
object
Base class for most Telegram objects.
-
classmethod
de_json
(data, bot)¶ Converts JSON data to a Telegram object.
- Parameters
data (Dict[
str
, …]) – The JSON data.bot (
telegram.Bot
) – The bot associated with this object.
- Returns
The Telegram object.
-
classmethod
de_list
(data, bot)¶ Converts JSON data to a list of Telegram objects.
- Parameters
data (Dict[
str
, …]) – The JSON data.bot (
telegram.Bot
) – The bot associated with these objects.
- Returns
A list of Telegram objects.
-
to_dict
()¶ Gives representation of object as
dict
.- Returns
dict
-
to_json
()¶ Gives a JSON representation of object.
- Returns
str
-
classmethod