Updated docstring to google format

This commit is contained in:
JosXa 2018-01-08 22:36:09 +01:00
parent b883c2ff0d
commit d0439d8dc9

View File

@ -184,7 +184,8 @@ class TelegramClient(TelegramBareClient):
return result return result
def start(self, phone=None, bot_token=None, code_callback=None, password_callback=None): def start(self, phone=None, bot_token=None, force_sms=False, code_callback=None,
password_callback=None):
"""Convenience method to interactively connect and authorize. """Convenience method to interactively connect and authorize.
Example usage: Example usage:
@ -197,13 +198,20 @@ class TelegramClient(TelegramBareClient):
provided that will be used to obtain the Telegram login code and 2FA password, provided that will be used to obtain the Telegram login code and 2FA password,
respectively. They will default to the `input()` function from the standard library. respectively. They will default to the `input()` function from the standard library.
:param phone: The Telegram user's phone number to log in as a user Args:
:param bot_token: Bot Token obtained by @BotFather to log in as a bot phone (:obj:`str` | :obj:`int`):
:param code_callback: optional. A callable that will be used to retrieve the Telegram login The phone to which the code will be sent.
code bot_token (:obj:`str`):
:param password_callback: optional. A callable that will be used to retrieve the user's Bot Token obtained by @BotFather to log in as a bot.
2FA password force_sms (:obj:`bool`, optional):
:return: This client Whether to force sending as SMS.
code_callback (:obj:`callable`, optional):
A callable that will be used to retrieve the Telegram login code.
password_callback (:obj:`callable`, optional):
A callable that will be used to retrieve the user's 2FA password.
Returns:
:obj:`TelegramClient`: This client.
""" """
if code_callback is None: if code_callback is None: