ADD: sentimenthq

This commit is contained in:
Madison May
2015-06-11 16:55:06 -04:00
parent 29b190d1d2
commit 47133c956f
4 changed files with 31 additions and 2 deletions
+5
View File
@@ -17,10 +17,15 @@ def api_handler(arg, cloud, api, url_params = {"batch":False, "api_key":None}, *
if cloud:
host = "%s.indico.domains" % cloud
else:
# default to indico public cloud
host = config.PUBLIC_API_HOST
# error message for public cloud
if api == 'sentimenthq':
raise IndicoError("The high quality sentiment API is currently in private beta.")
url = config.url_protocol + "//%s/%s" % (host, api)
url = url + "/batch" if url_params.get("batch", False) else url
url += "?key=%s" % (url_params.get("api_key", None) or config.api_key)