From b5c7cf781adc15da51198c58c03c2b3c7dac9327 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 8 Mar 2018 10:25:10 +0100 Subject: [PATCH] Document the progress parameter --- pyrogram/client/client.py | 77 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 5360693e..bbf1263d 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -1048,6 +1048,17 @@ class Client: reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the original message. + progress (:obj:`callable`): + Pass a callback function to view the upload progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes uploaded so far. + + total (:obj:`int`): + The size of the file. + Returns: On success, the sent Message is returned. @@ -1126,6 +1137,17 @@ class Client: reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the original message. + progress (:obj:`callable`): + Pass a callback function to view the upload progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes uploaded so far. + + total (:obj:`int`): + The size of the file. + Returns: On success, the sent Message is returned. @@ -1198,6 +1220,17 @@ class Client: reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the original message. + progress (:obj:`callable`): + Pass a callback function to view the upload progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes uploaded so far. + + total (:obj:`int`): + The size of the file. + Returns: On success, the sent Message is returned. @@ -1255,6 +1288,17 @@ class Client: reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the original message. + progress (:obj:`callable`): + Pass a callback function to view the upload progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes uploaded so far. + + total (:obj:`int`): + The size of the file. + Returns: On success, the sent Message is returned. @@ -1343,6 +1387,17 @@ class Client: reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the original message. + progress (:obj:`callable`): + Pass a callback function to view the upload progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes uploaded so far. + + total (:obj:`int`): + The size of the file. + Returns: On success, the sent Message is returned. @@ -1422,6 +1477,17 @@ class Client: reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the original message + progress (:obj:`callable`): + Pass a callback function to view the upload progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes uploaded so far. + + total (:obj:`int`): + The size of the file. + Returns: On success, the sent Message is returned. @@ -1490,6 +1556,17 @@ class Client: reply_to_message_id (:obj:`int`, optional): If the message is a reply, ID of the original message + progress (:obj:`callable`): + Pass a callback function to view the upload progress. + The function must accept two arguments (progress, total). + + Other Parameters: + progress (:obj:`int`): + The amount of bytes uploaded so far. + + total (:obj:`int`): + The size of the file. + Returns: On success, the sent Message is returned.