Merge branch 'streams' of https://github.com/Javafant/diaspora-api into streams
authorMarek Marecki <triviuss@gmail.com>
Fri, 3 May 2013 10:19:52 +0000 (12:19 +0200)
committerMarek Marecki <triviuss@gmail.com>
Fri, 3 May 2013 10:19:52 +0000 (12:19 +0200)
Conflicts:
diaspy/streams.py

1  2 
diaspy/streams.py

index 265bed6f8dc73b33aac33309bf112105cee091f6,a242f08cd8e38e9547664c0950ad2b555ccbf146..5b1fb1d25d105dd73966b3f024c179e6f1a2b4ae
@@@ -265,9 -265,15 +265,14 @@@ class FollowedTags(Generic)
          :param tag_name: tag name
          :type tag_name: str
          """
-         data = {'authenticity_token':self._connection.getToken(),
-                 'tag_name':tag_name,
+         data = {'name':tag_name,
+                 'authenticity_token':self._connection.get_token(),
                 }
-         request = self._connection.post('followed_tags', data=data)
-         if request.status_code != 200:
 -
+         headers={'content-type': 'application/json',
+                  'x-csrf-token': self._connection.get_token(),
+                  'accept': 'application/json'}
+         request = self._connection.post('tag_followings', data=json.dumps(data), headers=headers)
+         if request.status_code != 201:
              raise Exception('wrong error code: {0}'.format(request.status_code))