@@ -37,17 +37,17 @@ result = user_feed_1.get(limit=5, id_lt="e561de8f-00f1-11e4-b400-0cc47a024be0")
37
37
activity_data = {' actor' : 1 , ' verb' : ' tweet' , ' object' : 1 , ' foreign_id' : ' tweet:1' }
38
38
activity_response = user_feed_1.add_activity(activity_data)
39
39
# Create a bit more complex activity
40
- activity_data = {' actor' : 1 , ' verb' : ' run' , ' object' : 1 , ' foreign_id' : ' run' , ' 1' ,
40
+ activity_data = {' actor' : 1 , ' verb' : ' run' , ' object' : 1 , ' foreign_id' : ' run: 1' ,
41
41
' course' : {' name' : ' Golden Gate park' , ' distance' : 10 },
42
42
' participants' : [' Thierry' , ' Tommaso' ],
43
43
' started_at' : datetime.datetime.now()
44
- };
44
+ }
45
45
user_feed_1.add_activity(activity_data)
46
46
47
47
# Remove an activity by its id
48
- user_feed_1.remove (" e561de8f-00f1-11e4-b400-0cc47a024be0" )
48
+ user_feed_1.remove_activity (" e561de8f-00f1-11e4-b400-0cc47a024be0" )
49
49
# or by foreign id
50
- user_feed_1.remove (foreign_id = ' tweet:1' )
50
+ user_feed_1.remove_activity (foreign_id = ' tweet:1' )
51
51
52
52
# Follow another feed
53
53
user_feed_1.follow(' flat' , ' 42' )
@@ -68,12 +68,12 @@ user_feed_1.add_activities(activities)
68
68
69
69
# Add an activity and push it to other feeds too using the `to` field
70
70
activity = {
71
- " actor_id " :" 1" ,
71
+ " actor " :" 1" ,
72
72
" verb" :" like" ,
73
- " object_id " :" 3" ,
73
+ " object " :" 3" ,
74
74
" to" :[" user:44" , " user:45" ]
75
- ];
76
- user_feed_1.add_activity(activity);
75
+ }
76
+ user_feed_1.add_activity(activity)
77
77
78
78
# Generating tokens for client side usage
79
79
token = user_feed_1.token
0 commit comments