From: Marek Marecki Date: Sun, 7 Jul 2013 13:06:27 +0000 (+0200) Subject: notifications.py refactored to use `repr()` on `Connection()` X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc49cc416ec98b39c53147161368f6dba4bbac9a;p=diaspy.git notifications.py refactored to use `repr()` on `Connection()` --- diff --git a/diaspy/notifications.py b/diaspy/notifications.py index 418c939..bfcfada 100644 --- a/diaspy/notifications.py +++ b/diaspy/notifications.py @@ -27,7 +27,7 @@ class Notifications(): """Returns list of most recent notifications. """ params = {'per_page': 5, '_': int(round(time.time(), 3)*1000)} - headers = {'x-csrf-token': self._connection.get_token()} + headers = {'x-csrf-token': repr(self._connection)} request = self._connection.get('notifications.json', headers=headers, params=params) @@ -39,7 +39,7 @@ class Notifications(): """Returns list of notifications. """ params = {'per_page': per_page, 'page': page} - headers = {'x-csrf-token': self._connection.get_token()} + headers = {'x-csrf-token': repr(self._connection)} request = self._connection.get('notifications.json', headers=headers, params=params)