From 9bd177af537ccedc008a123a8ba40e45d2132094 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Sat, 6 Jul 2013 19:59:28 +0300 Subject: [PATCH] Add lookup_user to Connection, it triggers a webfinger lookup on pod when called with a Diaspora handle --- diaspy/connection.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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}) -- 2.25.1