- class telegram.request.RequestData(parameters=None)¶
Instances of this class collect the data needed for one request to the Bot API, including all parameters and files to be sent along with the request.
New in version 20.0.
How exactly instances of this will are created should be considered an implementation detail and not part of PTBs public API. Users should exclusively rely on the documented attributes, properties and methods.
Whether this object contains files to be uploaded via
- property json_parameters¶
Gives the parameters as mapping of parameter name to the respective JSON encoded value.
- property multipart_data¶
Gives the files contained in this object as mapping of part name to encoded content.
- property parameters¶
Gives the parameters as mapping of parameter name to the parameter value, which can be a single object of type
boolor any (possibly nested) composition of lists, tuples and dictionaries, where each entry, key and value is of one of the mentioned types.
- parametrized_url(url, encode_kwargs=None)¶