From: Marek Marecki Date: Fri, 29 Mar 2013 10:44:53 +0000 (+0100) Subject: get_mentions() refactored to use _sessionget() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bebe44b51e00a05163ef78a7086d16790d7a3b49;p=diaspy.git get_mentions() refactored to use _sessionget() --- diff --git a/diaspy/client.py b/diaspy/client.py index abdd1d9..1a53851 100644 --- a/diaspy/client.py +++ b/diaspy/client.py @@ -114,9 +114,7 @@ class Client: """This function returns the current user's attributes. :returns: dict -- json formatted user info. - """ - #r = self.session.get('{0}/bookmarklet'.format(self.pod)) r = self._sessionget('bookmarklet') regex = re.compile(r'window.current_user_attributes = ({.*})') userdata = json.loads(regex.search(r.text).group(1)) @@ -152,7 +150,6 @@ class Client: :returns: list -- list of Post objects. """ - data = {'authenticity_token': self.get_token()} r = self._sessionget('stream.json') @@ -181,11 +178,10 @@ class Client: posts the current user is being mentioned in. :returns: list -- list of Post objects - """ - data = {'authenticity_token': self.get_token()} - r = self.session.get('/mentions.json'.format(self.pod)) + #r = self.session.get('/mentions.json'.format(self.pod)) + r = self._sessionget('mentions.json') if r.status_code != 200: raise Exception('wrong status code: {0}'.format(r.status_code))