Added optional get params.

This commit is contained in:
Kenneth Reitz
2011-02-21 15:48:04 -05:00
parent e24fe6af11
commit f0fb680961
+3 -1
View File
@@ -48,7 +48,9 @@ def get(*path, **kwargs):
"""
url = '%s%s%s' % (API_URL, '/'.join(map(str, path)), '.json')
r = requests.get(url)
params = kwargs.get('params', None)
r = requests.get(url, params=params)
error = kwargs.get('error', None)
return _safe_response(r, error)