Skip to content

Commit 0ee0faf

Browse files
committed
partial update example
1 parent a9f6cb7 commit 0ee0faf

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ client.get_activities(foreign_id_times=[
102102
(foreign_id, activity_time),
103103
])
104104

105+
# Update some parts of an activity with activity_partial_update
106+
set = {
107+
'product.name': 'boots',
108+
'colors': {
109+
'red': '0xFF0000',
110+
'green': '0x00FF00'
111+
}
112+
}
113+
unset = [ 'popularity', 'details.info' ]
114+
# ...by ID
115+
client.activity_partial_update(id=activity_id, set=set, unset=unset)
116+
# ...or by combination of foreign_id and time
117+
client.activity_partial_update(foreign_id=foreign_id, time=activity_time, set=set, unset=unset)
118+
105119
# Generating tokens for client side usage (JS client)
106120
token = user_feed_1.token
107121
# Javascript client side feed initialization

0 commit comments

Comments
 (0)