diff --git a/lib/calais.js b/lib/calais.js index 98acd6e..b3c4311 100644 --- a/lib/calais.js +++ b/lib/calais.js @@ -2,6 +2,7 @@ * calais * Copyright(c) 2011 Mike Cantelon * Modified 2013 Harry Guillermo (github: hguillermo) + * Modified 2015 Roger Andel (github: wolfhesse) * MIT Licensed */ @@ -18,10 +19,10 @@ Calais.prototype = { this.apiKey = apiKey; this.defaults = { - 'apiHost' : 'api.opencalais.com', - 'apiPath' : '/tag/rs/enrich', + 'apiHost' : 'api.thomsonreuters.com', + 'apiPath' : '/permid/calais', 'contentType' : 'text/raw', - 'outputFormat' : 'object', + 'outputFormat' : 'xml/rdf', 'reltagBaseURL' : '', 'calculateRelevanceScore': true, 'enableMetadataType' : 'GenericRelations,SocialTags', @@ -82,7 +83,7 @@ Calais.prototype = { var params = { 'Host' : this.options.apiHost, - 'x-calais-licenseID' : this.apiKey, + 'x-ag-access-token' : this.apiKey, 'Content-Type' : this.options.contentType, 'Accept' : outputFormat, 'Content-Length' : this.options.content.length, @@ -102,7 +103,7 @@ Calais.prototype = { } var options = { - uri : 'http://' + this.options.apiHost + this.options.apiPath, + uri : 'https://' + this.options.apiHost + this.options.apiPath, method : 'POST', body : this.options.content, headers: params