From dc17be88bd77f1026cfc0f2f6597d627e2010275 Mon Sep 17 00:00:00 2001 From: Marek Marecki Date: Fri, 3 May 2013 11:16:18 +0200 Subject: [PATCH] Removed method add() from streams.FollowedTags (docs say: create()) --- diaspy/streams.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/diaspy/streams.py b/diaspy/streams.py index d0b4b25..265bed6 100644 --- a/diaspy/streams.py +++ b/diaspy/streams.py @@ -259,25 +259,15 @@ class FollowedTags(Generic): def _setlocation(self): self._location = 'followed_tags.json' - def add(self, tag_name): - """Follow new tag. - """ - data = {'authenticity_token': self._connection.getToken(), - 'tag_name': tag_name} - r = self._connection.post('tags', data=data) - if r.status_code != 200: - raise Exception('wrong status code: {0}'.format(r.status_code)) - def create(self, tag_name): """Follow new tag. :param tag_name: tag name :type tag_name: str """ - data = {'tag_name':tag_name, - 'authenticity_token':self._connection.getToken(), + data = {'authenticity_token':self._connection.getToken(), + 'tag_name':tag_name, } - request = self._connection.post('followed_tags', data=data, headers=headers) - + request = self._connection.post('followed_tags', data=data) if request.status_code != 200: raise Exception('wrong error code: {0}'.format(request.status_code)) -- 2.25.1