Files
Part of the API Reference.
downloadFile
Future<Uint8List> downloadFile(String filePath) => _client.downloadFile(filePath);
Downloads the raw bytes of a file already located via [getFile], given its file_path.
downloadFileById
Future<Uint8List> downloadFileById(String fileId) async {
Convenience helper that resolves a Telegram file_id via [getFile] and
immediately downloads its bytes in one call.
getFile
Future<Json> getFile(String fileId) async => _o(await call('getFile', {'file_id': fileId}));
Resolves a Telegram file_id into a [Json] containing file_path, which
can then be downloaded with [downloadFile] or streamed directly from
https://api.telegram.org/file/bot<token>/<file_path>.