Add lookup_user to Connection, it triggers a webfinger lookup on pod when called...
authorJason Robinson <jaywink@basshero.org>
Sat, 6 Jul 2013 16:59:28 +0000 (19:59 +0300)
committerJason Robinson <jaywink@basshero.org>
Sat, 6 Jul 2013 16:59:28 +0000 (19:59 +0300)
diaspy/connection.py

index 9ce40570e69f628b7fb3a8fc395ed76d40d79592..0a3c9cc6b4a422711607a0216211c20a28741fbf 100644 (file)
@@ -176,3 +176,12 @@ class Connection():
         finally:
             if not self.token: raise TokenError('cannot obtain token and no previous token found for reuse')
         return self.token
+        
+    def lookup_user(self, handle):
+        """This function will launch a webfinger lookup from the pod for the
+        handle requested. Nothing is returned but if the lookup was successful,
+        user should soon be searchable via this pod.
+        
+        :param string: Handle to search for.
+        """
+        request = self.get('people', headers={'accept': 'text/html'}, params={'q':handle})