From: Jason Robinson Date: Sat, 6 Jul 2013 16:59:28 +0000 (+0300) Subject: Add lookup_user to Connection, it triggers a webfinger lookup on pod when called... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9bd177af537ccedc008a123a8ba40e45d2132094;p=diaspy.git Add lookup_user to Connection, it triggers a webfinger lookup on pod when called with a Diaspora handle --- diff --git a/diaspy/connection.py b/diaspy/connection.py index 9ce4057..0a3c9cc 100644 --- a/diaspy/connection.py +++ b/diaspy/connection.py @@ -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})