ADD: url params for apis for multi api req

This commit is contained in:
Chris Lee
2015-06-05 13:50:13 -04:00
parent 5623f6de90
commit 6e0ac4cd5d
7 changed files with 13 additions and 14 deletions
+1 -1
View File
@@ -24,4 +24,4 @@ def language(text, cloud=None, batch=False, api_key=None, **kwargs):
:rtype: Dictionary of language probability pairs
"""
return api_handler(text, cloud=cloud, api="language", batch=batch, api_key=api_key, **kwargs)
return api_handler(text, cloud=cloud, api="language", url_params={"batch":batch, "api_key":api_key}, **kwargs)
+2 -2
View File
@@ -26,7 +26,7 @@ def political(text, cloud=None, batch=False, api_key=None, **kwargs):
:rtype: Dictionary of party probability pairs
"""
return api_handler(text, cloud=cloud, api="political", batch=batch, api_key=api_key, **kwargs)
return api_handler(text, cloud=cloud, api="political", url_params={"batch":batch, "api_key":api_key}, **kwargs)
def posneg(text, cloud=None, batch=False, api_key=None, **kwargs):
"""
@@ -49,4 +49,4 @@ def posneg(text, cloud=None, batch=False, api_key=None, **kwargs):
:rtype: Float
"""
return api_handler(text, cloud=cloud, api="sentiment", batch=batch, api_key=api_key, **kwargs)
return api_handler(text, cloud=cloud, api="sentiment", url_params={"batch":batch, "api_key":api_key}, **kwargs)
+1 -1
View File
@@ -23,4 +23,4 @@ def text_tags(text, cloud=None, batch=False, api_key=None, **kwargs):
:rtype: Dictionary of class probability pairs
"""
return api_handler(text, cloud=cloud, api="texttags", batch=batch, api_key=api_key, **kwargs)
return api_handler(text, cloud=cloud, api="texttags", url_params={"batch":batch, "api_key":api_key}, **kwargs)