From f71b3db17831728a534967c57839c48df7af9729 Mon Sep 17 00:00:00 2001 From: thekindlyone Date: Mon, 29 Aug 2016 15:37:01 +0530 Subject: [PATCH] added getUserInfo example in readme --- README.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.rst b/README.rst index f2d9e13..bd6da0d 100644 --- a/README.rst +++ b/README.rst @@ -40,6 +40,18 @@ Sending a Message print("Message sent successfully!") +Getting user info from user id +============================== + +.. code-block:: python + + friend1 = client.getUsers('')[0] + friend2 = client.getUsers('')[0] + friend1_info = client.getUserInfo(friend1.uid) # returns dict with details + both_info = client.getUserInfo(friend1.uid,friend2.uid) # query both together, returns list of dicts + friend1_name = friend1_info['name'] + + Getting last messages sent ==========================