From cfa19bc1c8775f985a3b1baee880a14ec3af4af0 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 21 Feb 2018 13:44:47 +0100 Subject: [PATCH] Document add_contacts and delete_contacts --- pyrogram/client/client.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 2af4c3cd..75804635 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -2350,6 +2350,18 @@ class Client: done.wait() def add_contacts(self, contacts: list): + """Use this method to add contacts to your Telegram address book. + + Args: + contacts (:obj:`list`): + A list of :obj:`InputPhoneContact ` + + Returns: + On success, the added contacts are returned. + + Raises: + :class:`pyrogram.Error` + """ imported_contacts = self.send( functions.contacts.ImportContacts( contacts=contacts @@ -2361,6 +2373,19 @@ class Client: return imported_contacts def delete_contacts(self, ids: list): + """Use this method to delete contacts from your Telegram address book + + Args: + ids (:obj:`list`): + A list of unique identifiers for the target users. Can be an ID (int), a username (string) + or phone number (string). + + Returns: + True on success. + + Raises: + :class:`pyrogram.Error` + """ contacts = [] for i in ids: