mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-06-27 16:10:34 +08:00
Merge pull request #80 from IndicoDataSolutions/madison/add-sentimenthq
FIX: allow access to sentimenthq API
This commit is contained in:
@@ -29,11 +29,6 @@ def api_handler(arg, cloud, api, url_params = {"batch":False, "api_key":None}, *
|
|||||||
if apis:
|
if apis:
|
||||||
url += "&apis=%s" % ",".join(apis)
|
url += "&apis=%s" % ",".join(apis)
|
||||||
|
|
||||||
# private beta
|
|
||||||
if host == config.PUBLIC_API_HOST:
|
|
||||||
if (api == 'sentimenthq') or ('sentimenthq' in apis):
|
|
||||||
raise IndicoError("The high quality sentiment API is currently in private beta.")
|
|
||||||
|
|
||||||
response = requests.post(url, data=json_data, headers=JSON_HEADERS)
|
response = requests.post(url, data=json_data, headers=JSON_HEADERS)
|
||||||
if response.status_code == 503 and cloud != None:
|
if response.status_code == 503 and cloud != None:
|
||||||
raise IndicoError("Private cloud '%s' does not include api '%s'" % (cloud, api))
|
raise IndicoError("Private cloud '%s' does not include api '%s'" % (cloud, api))
|
||||||
|
|||||||
Reference in New Issue
Block a user