Skip to content

Commit 321b2fb

Browse files
committed
Update VkRequestsPool example
1 parent c4094ad commit 321b2fb

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

examples/requests_pool.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,21 @@ def main():
2929

3030
with vk_api.VkRequestsPool(vk_session) as pool:
3131
for user_id in [1, 183433824]:
32-
friends[user_id] = pool.method('friends.get', {'user_id': user_id})
32+
friends[user_id] = pool.method('friends.get', {
33+
'user_id': user_id,
34+
'fields': 'photo'
35+
})
3336

3437
print(friends)
3538

3639
# Same result
3740
with vk_api.VkRequestsPool(vk_session) as pool:
3841
friends = pool.method_one_param(
39-
'friends.get', key='user_id', values=[1, 183433824])
42+
'friends.get',
43+
key='user_id',
44+
default_values={'fields': 'photo'},
45+
values=[1, 183433824]
46+
)
4047

4148
print(friends)
4249

0 commit comments

Comments
 (0)