Automatically join kwargs passed as lists into comma-separated string

[ci skip]
This commit is contained in:
Mike Helmick 2013-06-06 13:41:44 -04:00
parent ff7e3fab94
commit ec2bd7d686
2 changed files with 5 additions and 0 deletions

View file

@ -13,6 +13,9 @@ History
- ``twitter_token`` and ``twitter_secret`` have been replaced with ``app_key`` and ``app_secret`` respectively - ``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`` - ``callback_url`` is now passed through ``Twython.get_authentication_tokens``
- Update ``test_twython.py`` docstrings per http://www.python.org/dev/peps/pep-0257/ - 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) 2.10.1 (2013-05-29)
++++++++++++++++++ ++++++++++++++++++

View file

@ -14,6 +14,8 @@ def _transparent_params(_params):
params[k] = 'false' params[k] = 'false'
elif isinstance(v, basestring) or isinstance(v, numeric_types): elif isinstance(v, basestring) or isinstance(v, numeric_types):
params[k] = v params[k] = v
elif isinstance(v, list):
params[k] = ','.join(v)
else: else:
continue continue
return params, files return params, files