From ec2bd7d6860a9f3d7673876c33133a5ac7bc764a Mon Sep 17 00:00:00 2001 From: Mike Helmick Date: Thu, 6 Jun 2013 13:41:44 -0400 Subject: [PATCH] Automatically join kwargs passed as lists into comma-separated string [ci skip] --- HISTORY.rst | 3 +++ twython/helpers.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 9f8bd3e..08eb725 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,9 @@ History - ``twitter_token`` and ``twitter_secret`` have been replaced with ``app_key`` and ``app_secret`` respectively - ``callback_url`` is now passed through ``Twython.get_authentication_tokens`` - Update ``test_twython.py`` docstrings per http://www.python.org/dev/peps/pep-0257/ +- Removed ``get_list_memberships``, method is Twitter API 1.0 deprecated +- Developers can now pass an array as a parameter to Twitter API methods and they will be automatically joined by a comma and converted to a string +- ``endpoints.py`` now contains ``EndpointsMixin`` (rather than the previous ``api_table`` dict) for Twython, which enables Twython to use functions declared in the Mixin. 2.10.1 (2013-05-29) ++++++++++++++++++ diff --git a/twython/helpers.py b/twython/helpers.py index daa3370..b19d869 100644 --- a/twython/helpers.py +++ b/twython/helpers.py @@ -14,6 +14,8 @@ def _transparent_params(_params): params[k] = 'false' elif isinstance(v, basestring) or isinstance(v, numeric_types): params[k] = v + elif isinstance(v, list): + params[k] = ','.join(v) else: continue return params, files