Skip to content

Commit

Permalink
Add ability to pass list/tuple to VkApiMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor authored and python273 committed Dec 15, 2018
1 parent 4d84ab4 commit a5574ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vk_api/vk_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,4 +663,8 @@ def __getattr__(self, method):
)

def __call__(self, **kwargs):
for k, v in six.iteritems(kwargs):
if isinstance(v, (list, tuple)):
kwargs[k] = ','.join(str(x) for x in v)

return self._vk.method(self._method, kwargs)

0 comments on commit a5574ee

Please sign in to comment.