mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-07-21 12:20:44 +08:00
ADD: sentimenthq
This commit is contained in:
@@ -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