mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-10-03 12:00:44 +08:00
ADD: sentimenthq
This commit is contained in:
1 parent
29b190d1d2
commit
47133c956f
4 files changed
+31
-2
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user