From a7c098e3479da854b6630f5830245ac396f975ac Mon Sep 17 00:00:00 2001 From: Marek Marecki Date: Fri, 3 May 2013 17:29:30 +0200 Subject: [PATCH] Removing followed tags --- diaspy/streams.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/diaspy/streams.py b/diaspy/streams.py index b60982c..c13e0d8 100644 --- a/diaspy/streams.py +++ b/diaspy/streams.py @@ -268,15 +268,16 @@ class FollowedTags(Generic): def _setlocation(self): self._location = 'followed_tags.json' - def remove(self, tag_name): + def remove(self, tag_id): """Stop following a tag. - :param tag_name: tag name - :type tag_name: str + :param tag_id: tag id + :type tag_id: int """ - data = {} - headers = {} - request = None + data = {'authenticity_token':self._connection.get_token()} + request = self._connection.delete('tag_followings/{0}'.format(tag_id), data=data) + if request.status_code != 404: + raise Exception('wrong status code: {0}'.format(request.status_code)) def add(self, tag_name): """Follow new tag. -- 2.25.1