From bc49cc416ec98b39c53147161368f6dba4bbac9a Mon Sep 17 00:00:00 2001 From: Marek Marecki Date: Sun, 7 Jul 2013 15:06:27 +0200 Subject: [PATCH] notifications.py refactored to use `repr()` on `Connection()` --- diaspy/notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.25.1