Skip to content

Commit f2c9906

Browse files
committed
add example for follow many batch
1 parent 793b86f commit f2c9906

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ user_feed_1.unfollow('flat', '42')
5757
following = user_feed_1.following(offset=0, limit=2)
5858
followers = user_feed_1.followers(offset=0, limit=10)
5959

60+
# Creates many follow relationships in one request
61+
follows = [
62+
{'source': 'flat:1', 'target': 'user:1'},
63+
{'source': 'flat:1', 'target': 'user:2'},
64+
{'source': 'flat:1', 'target': 'user:3'}
65+
]
66+
client.follow_many(follows)
67+
6068
# Batch adding activities
6169
activities = [
6270
{'actor': 1, 'verb': 'tweet', 'object': 1},

0 commit comments

Comments
 (0)