From 09cba224cf40cd8b1e3f798c0d77eae8ae9e8112 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 24 Feb 2018 17:41:11 +0100 Subject: [PATCH] Document download_media --- pyrogram/client/client.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 58dcb330..f4853643 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -2451,8 +2451,29 @@ class Client: message (:obj:`Message `): The Message containing the media. - file_name (:obj:`str`): - Specify a file_name to be used + file_name (:obj:`str`, optional): + Specify a custom *file_name* to be used instead of the one provided by Telegram. + + block (:obj:`bool`, optional): + Blocks the code execution until the file has been downloaded. + Defaults to True. + + progress (:obj:`callable`): + Pass a callback function to view the download progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes downloaded so far. + + total (:obj:`int`): + The size of the file. + + Returns: + The relative path of the downloaded file. + + Raises: + :class:`pyrogram.Error` """ if isinstance(message, types.Message): done = Event()