@@ -17,6 +17,7 @@ def __init__(self, client, feed_id, token):
1717 self .feed_url = 'feed/%s/' % feed_id .replace (':' , '/' )
1818 self .feed_together = feed_id .replace (':' , '' )
1919 self .token = token
20+ self .authorization = self .feed_together + ' ' + self .token
2021
2122 def add_activity (self , activity_data ):
2223 '''
@@ -31,7 +32,7 @@ def add_activity(self, activity_data):
3132 activity_id = feed.add_activity(activity_data)
3233 '''
3334 result = self .client .post (
34- self .feed_url , data = activity_data , feed = self .feed_id )
35+ self .feed_url , data = activity_data , authorization = self .authorization )
3536 return result
3637
3738 def remove_activity (self , activity_id ):
@@ -42,7 +43,7 @@ def remove_activity(self, activity_id):
4243 (note this will also remove the activity from feeds which follow this feed)
4344 '''
4445 url = self .feed_url + '%s/' % activity_id
45- result = self .client .delete (url , feed = self .feed_id )
46+ result = self .client .delete (url , authorization = self .authorization )
4647 return result
4748
4849 def follow (self , target_feed ):
@@ -54,7 +55,7 @@ def follow(self, target_feed):
5455 validate_feed (target_feed )
5556 url = self .feed_url + 'follows/'
5657 response = self .client .post (
57- url , data = dict (target = target_feed ), feed = self .feed_id )
58+ url , data = dict (target = target_feed ), authorization = self .authorization )
5859 return response
5960
6061 def unfollow (self , target_feed ):
@@ -63,7 +64,7 @@ def unfollow(self, target_feed):
6364 '''
6465 validate_feed (target_feed )
6566 url = self .feed_url + 'follows/%s/' % target_feed
66- response = self .client .delete (url , feed = self .feed_id )
67+ response = self .client .delete (url , authorization = self .authorization )
6768 return response
6869
6970 def get (self , ** params ):
@@ -79,5 +80,5 @@ def get(self, **params):
7980 feed.get(limit=10, offset=10)
8081 '''
8182 response = self .client .get (
82- self .feed_url , params = params , feed = self .feed_id )
83+ self .feed_url , params = params , authorization = self .authorization )
8384 return response
0 commit comments