From 113403930b325c71c56f0f9400ed7d903fb96a21 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 22 Nov 2024 22:59:42 +0000 Subject: [PATCH] Updates --- Api.html | 24 +-- Api.js.html | 31 +-- addressSimilarity.html | 16 +- addressSimilarity.js.html | 24 +-- categories.html | 16 +- categories.js.html | 42 ++-- entities.html | 16 +- entities.js.html | 42 ++-- events.html | 382 ++++++++++++++++++++++++++++++++++++ events.js.html | 95 +++++++++ global.html | 4 +- index.html | 4 +- info.html | 16 +- info.js.html | 24 +-- language.html | 16 +- language.js.html | 42 ++-- morphology.html | 16 +- morphology.js.html | 35 ++-- nameDeduplication.html | 16 +- nameDeduplication.js.html | 24 +-- nameSimilarity.html | 16 +- nameSimilarity.js.html | 24 +-- nameTranslation.html | 16 +- nameTranslation.js.html | 32 +-- parameters.html | 12 +- parameters.js.html | 83 ++++---- ping.html | 16 +- ping.js.html | 24 +-- recordSimilarity.html | 382 ++++++++++++++++++++++++++++++++++++ recordSimilarity.js.html | 109 ++++++++++ relationships.html | 16 +- relationships.js.html | 42 ++-- rosetteConstants.js.html | 12 +- rosetteExceptions.js.html | 4 +- rosetteRequest.html | 14 +- rosetteRequest.js.html | 133 ++++++++----- semanticVectors.html | 16 +- semanticVectors.js.html | 42 ++-- sentences.html | 16 +- sentences.js.html | 42 ++-- sentiment.html | 16 +- sentiment.js.html | 42 ++-- similarTerms.html | 16 +- similarTerms.js.html | 45 ++--- syntax_dependencies.html | 16 +- syntax_dependencies.js.html | 42 ++-- textEmbedding.html | 16 +- textEmbedding.js.html | 42 ++-- tokens.html | 16 +- tokens.js.html | 42 ++-- topics.html | 16 +- topics.js.html | 42 ++-- transliteration.html | 16 +- transliteration.js.html | 39 ++-- 54 files changed, 1591 insertions(+), 751 deletions(-) create mode 100644 events.html create mode 100644 events.js.html create mode 100644 recordSimilarity.html create mode 100644 recordSimilarity.js.html diff --git a/Api.html b/Api.html index 79c4bed..c50c49b 100644 --- a/Api.html +++ b/Api.html @@ -88,7 +88,7 @@

new ApiCopyright: - + @@ -101,7 +101,7 @@

new ApiSource:
@@ -162,7 +162,7 @@

parameters<
- The Rosette API endpoint parameters + The Analytics API endpoint parameters
@@ -210,7 +210,7 @@

Type:
Source:
@@ -282,7 +282,7 @@
Type:
Source:
@@ -306,7 +306,7 @@

userKey - The Rosette API key used for authentication + The Analytics API key used for authentication @@ -354,7 +354,7 @@
Type:
Source:
@@ -390,7 +390,7 @@

rosette - Accepts a Rosette API endpoint name and forwards user parameters to the endpoint + Accepts an Analytics API endpoint name and forwards user parameters to the endpoint @@ -442,7 +442,7 @@
Parameters:
- The Rosette API endpoint to be utilized + The Analytics API endpoint to be utilized @@ -483,7 +483,7 @@
Parameters:
Source:
@@ -529,13 +529,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/Api.js.html b/Api.js.html index b62f16f..2c499db 100644 --- a/Api.js.html +++ b/Api.js.html @@ -27,9 +27,9 @@

Source: Api.js

/**
- * Rosette API.
+ * Babel Street Analytics API.
  *
- * @copyright 2016-2019 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -52,18 +52,20 @@ 

Source: Api.js

var addressSimilarity = require("./addressSimilarity") var categories = require("./categories"); var entities = require("./entities"); +var events = require("./events"); var info = require("./info"); var language = require("./language"); var matchedName = require("./nameSimilarity"); var morphology = require("./morphology"); var nameDeduplication = require("./nameDeduplication"); var ping = require("./ping"); +var recordSimilarity = require("./recordSimilarity"); var relationships = require("./relationships"); var semanticVectors = require("./semanticVectors"); var sentences = require("./sentences"); var sentiment = require("./sentiment"); var similarTerms = require("./similarTerms"); -var syntax_dependencies = require("./syntax_dependencies"); +var syntaxDependencies = require("./syntax_dependencies"); var textEmbedding = require("./textEmbedding"); var tokens = require("./tokens"); var topics = require("./topics"); @@ -78,19 +80,19 @@

Source: Api.js

* Api server endpoints. * * @example var api = new API(userKey, serviceUrl); - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function Api(userKey, serviceURL) { /** * @type {string} - * @desc The Rosette API key used for authentication + * @desc The Analytics API key used for authentication */ this.userKey = userKey; /** * @type {object} - * @desc The Rosette API endpoint parameters + * @desc The Analytics API endpoint parameters */ this.parameters = new paramObj(); @@ -106,30 +108,33 @@

Source: Api.js

* @default */ if (serviceURL) { - if (serviceURL.slice(-1) != '/') { + if (serviceURL.slice(-1) !== '/') { serviceURL = serviceURL.concat('/') this.serviceURL = serviceURL; } else { this.serviceURL = serviceURL; } } else { - this.serviceURL = "https://api.rosette.com/rest/v1/"; + this.serviceURL = "https://analytics.babelstreet.com/rest/v1/"; } var urlParts = URL.parse(this.serviceURL); if (urlParts.protocol === "http:") { this.protocol = http; } -}; +} /** * @type {string} - * @desc Accepts a Rosette API endpoint name and forwards user parameters to the endpoint - * @param {string} endpoint - The Rosette API endpoint to be utilized + * @desc Accepts an Analytics API endpoint name and forwards user parameters to the endpoint + * @param {string} endpoint - The Analytics API endpoint to be utilized */ Api.prototype.rosette = function(endpoint, callback) { var api = this; + if (typeof(api.parameters.genre) !== 'undefined' && api.parameters.genre != null) { + console.warn("The genre parameter is deprecated and will be removed in a future release."); + } endpoint = require("./" + endpoint); var e = new endpoint(); @@ -154,13 +159,13 @@

Source: Api.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/addressSimilarity.html b/addressSimilarity.html index d860448..fae6b94 100644 --- a/addressSimilarity.html +++ b/addressSimilarity.html @@ -82,7 +82,7 @@

new - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/addressSimilarity.js.html b/addressSimilarity.js.html index 4683730..97cb68c 100644 --- a/addressSimilarity.js.html +++ b/addressSimilarity.js.html @@ -27,9 +27,9 @@

Source: addressSimilarity.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2019 Basis Technology Corporation.
+ * @copyright 2019-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,19 +50,19 @@ 

Source: addressSimilarity.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function addressSimilarity() { - -}; +// Works as a constructor +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ addressSimilarity.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { @@ -92,13 +92,13 @@

Source: addressSimilarity.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/categories.html b/categories.html index d6ec287..7954434 100644 --- a/categories.html +++ b/categories.html @@ -82,7 +82,7 @@

new categor - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/categories.js.html b/categories.js.html index 20807b6..f162d52 100644 --- a/categories.js.html +++ b/categories.js.html @@ -27,9 +27,9 @@

Source: categories.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: categories.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function categories() { - -}; +// constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ categories.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "categories", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of content or contentUri", "bad arguments")); - } else if (parameters.loadParams().content != null && parameters.loadParams().contentUri != null) { - return callback(new RosetteException("badArgument", "Cannot supply content and contentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "categories"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("categories", parameters, userKey, protocol, serviceURL, callback); }; module.exports = categories; @@ -94,13 +80,13 @@

Source: categories.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/entities.html b/entities.html index 05d6ff8..49ea19f 100644 --- a/entities.html +++ b/entities.html @@ -82,7 +82,7 @@

new entities< - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/entities.js.html b/entities.js.html index cd6331f..6803a4f 100644 --- a/entities.js.html +++ b/entities.js.html @@ -27,9 +27,9 @@

Source: entities.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: entities.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function entities() { - -}; +// constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ entities.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "entities", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "entities"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("entities", parameters, userKey, protocol, serviceURL, callback); }; module.exports = entities; @@ -94,13 +80,13 @@

Source: entities.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/events.html b/events.html new file mode 100644 index 0000000..507f15f --- /dev/null +++ b/events.html @@ -0,0 +1,382 @@ + + + + + JSDoc: Class: events + + + + + + + + + + +
+ +

Class: events

+ + + + + + +
+ +
+ +

events()

+ + +
+ +
+
+ + + + + + +

new events()

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
License:
+
  • http://www.apache.org/licenses/LICENSE-2.0
+ + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

getResults(parameters, userKey, serviceURL, callback)

+ + + + + + +
+ Makes an HTTP request to the specified Analytics API endpoint and returns the result +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
parameters + + +string + + + + The Analytics API endpoint parameters
userKey + + +string + + + + The Analytics API user access key
serviceURL + + +string + + + + The base service URL to be used to access the Analytics API
callback + + +function + + + + Callback function to be executed after the function to which it is passed is complete
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/events.js.html b/events.js.html new file mode 100644 index 0000000..1bbf141 --- /dev/null +++ b/events.js.html @@ -0,0 +1,95 @@ + + + + + JSDoc: Source: events.js + + + + + + + + + + +
+ +

Source: events.js

+ + + + + + +
+
+
/**
+ * Analytics API.
+ *
+ * @copyright 2024 Basis Technology Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * @license http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ **/
+"use strict";
+
+var URL = require("url");
+
+var rosetteConstants = require("./rosetteConstants");
+var RosetteException = require("./rosetteExceptions");
+var rosetteRequest = require("./rosetteRequest");
+
+/**
+ * @class
+ *
+ * @copyright 2024 Basis Technology Corporation.
+ * @license http://www.apache.org/licenses/LICENSE-2.0
+ */
+function events() {
+// constructor function
+}
+
+/**
+ * Makes an HTTP request to the specified Analytics API endpoint and returns the result
+ * @param {string} parameters - The Analytics API endpoint parameters
+ * @param {string} userKey - The Analytics API user access key
+ * @param {string} serviceURL - The base service URL to be used to access the Analytics API
+ * @param {function} callback - Callback function to be executed after the function to which it is passed is complete
+ */
+events.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) {
+    var req = new rosetteRequest();
+    req.makeDocumentRequest("events", parameters, userKey, protocol, serviceURL, callback);
+};
+
+module.exports = events;
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time) +
+ + + + + diff --git a/global.html b/global.html index fbf2baa..1d84051 100644 --- a/global.html +++ b/global.html @@ -494,13 +494,13 @@

Roset
- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/index.html b/index.html index e2d137c..6496d42 100644 --- a/index.html +++ b/index.html @@ -50,13 +50,13 @@


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/info.html b/info.html index 8e38269..55c5880 100644 --- a/info.html +++ b/info.html @@ -82,7 +82,7 @@

new infoCopyright: - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/info.js.html b/info.js.html index f473ea0..6cbdf74 100644 --- a/info.js.html +++ b/info.js.html @@ -27,9 +27,9 @@

Source: info.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,19 +50,19 @@ 

Source: info.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function info() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ info.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { @@ -83,13 +83,13 @@

Source: info.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/language.html b/language.html index 7a938fc..04dbd2d 100644 --- a/language.html +++ b/language.html @@ -82,7 +82,7 @@

new language< - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/language.js.html b/language.js.html index fae11c3..6b38c98 100644 --- a/language.js.html +++ b/language.js.html @@ -27,9 +27,9 @@

Source: language.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: language.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function language() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ language.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "language", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "language"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("language", parameters, userKey, protocol, serviceURL, callback); }; module.exports = language; @@ -94,13 +80,13 @@

Source: language.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/morphology.html b/morphology.html index 24fa0af..7ccb515 100644 --- a/morphology.html +++ b/morphology.html @@ -82,7 +82,7 @@

new morphol - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/morphology.js.html b/morphology.js.html index e0f5b0c..d0971a4 100644 --- a/morphology.js.html +++ b/morphology.js.html @@ -27,9 +27,9 @@

Source: morphology.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,35 +50,36 @@ 

Source: morphology.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function morphology() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ morphology.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "morphology" + "/" + parameters.morphology, callback); + parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, `morphology/${parameters.morphology}`, callback); } else { + var responseMessage = "bad arguments"; // validate parameters if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); + return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", responseMessage)); } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); + return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", responseMessage)); } else if (!parameters.morphology) { - return callback(new RosetteException("badArgument", "Must supply type of morphology", "bad arguments")); + return callback(new RosetteException("badArgument", "Must supply type of morphology", responseMessage)); } else { // configure URL - var urlParts = URL.parse(serviceURL + "morphology" + "/" + parameters.morphology); + var urlParts = URL.parse(serviceURL + `morphology/${parameters.morphology}`); var req = new rosetteRequest(); req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); } @@ -96,13 +97,13 @@

Source: morphology.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/nameDeduplication.html b/nameDeduplication.html index c74e42b..e9af9a1 100644 --- a/nameDeduplication.html +++ b/nameDeduplication.html @@ -82,7 +82,7 @@

new - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/nameDeduplication.js.html b/nameDeduplication.js.html index 2e7b15b..93465d1 100644 --- a/nameDeduplication.js.html +++ b/nameDeduplication.js.html @@ -27,9 +27,9 @@

Source: nameDeduplication.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,19 +50,19 @@ 

Source: nameDeduplication.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function nameDeduplication() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ nameDeduplication.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { @@ -92,13 +92,13 @@

Source: nameDeduplication.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/nameSimilarity.html b/nameSimilarity.html index b613d80..8c27429 100644 --- a/nameSimilarity.html +++ b/nameSimilarity.html @@ -82,7 +82,7 @@

new nam - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/nameSimilarity.js.html b/nameSimilarity.js.html index ac2c05b..b17ceda 100644 --- a/nameSimilarity.js.html +++ b/nameSimilarity.js.html @@ -27,9 +27,9 @@

Source: nameSimilarity.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,19 +50,19 @@ 

Source: nameSimilarity.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function nameSimilarity() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ nameSimilarity.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { @@ -92,13 +92,13 @@

Source: nameSimilarity.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/nameTranslation.html b/nameTranslation.html index 43eae7e..c6d17b3 100644 --- a/nameTranslation.html +++ b/nameTranslation.html @@ -82,7 +82,7 @@

new na - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/nameTranslation.js.html b/nameTranslation.js.html index a2ec614..dda4c60 100644 --- a/nameTranslation.js.html +++ b/nameTranslation.js.html @@ -27,9 +27,9 @@

Source: nameTranslation.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,30 +50,30 @@ 

Source: nameTranslation.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function nameTranslation() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ nameTranslation.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - + var responseMessage = "bad arguments"; if (parameters.documentFile != null) { - return callback(new RosetteException("badArgument", "Name translation does not support documentFile", "bad arguments")); + return callback(new RosetteException("badArgument", "Name translation does not support documentFile", responseMessage)); } else { // validate parameters if (!parameters.loadParams().name) { - return callback(new RosetteException("badArgument", "Must supply name parameter", "bad arguments")); + return callback(new RosetteException("badArgument", "Must supply name parameter", responseMessage)); } else if (!parameters.loadParams().targetLanguage) { - return callback(new RosetteException("badArgument", "Must supply target language parameter", "bad arguments")); + return callback(new RosetteException("badArgument", "Must supply target language parameter", responseMessage)); } else { // configure URL var urlParts = URL.parse(serviceURL + "name-translation"); @@ -94,13 +94,13 @@

Source: nameTranslation.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/parameters.html b/parameters.html index 0077724..3d581fd 100644 --- a/parameters.html +++ b/parameters.html @@ -82,7 +82,7 @@

new paramet - + @@ -252,7 +252,7 @@

Parameters:
Source:
@@ -296,7 +296,7 @@

loadParams<
- Loads all non-null parameters into a new JSON that will be used as parameters for a Rosette API endpoint + Loads all non-null parameters into a new JSON that will be used as parameters for an Analytics API endpoint Parameters that start with '_' are internal and not included in the endpoint request
@@ -341,7 +341,7 @@

loadParams<
Source:
@@ -387,13 +387,13 @@

loadParams<
- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/parameters.js.html b/parameters.js.html index 959b848..515fe2e 100644 --- a/parameters.js.html +++ b/parameters.js.html @@ -27,9 +27,9 @@

Source: parameters.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2019 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -58,12 +58,12 @@ 

Source: parameters.js

* * @type string */ -var BINDING_VERSION = "1.1"; +var BINDING_VERSION = RosetteConstants.BINDING_VERSION; /** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function parameters() { @@ -73,12 +73,13 @@

Source: parameters.js

this.contentUri = null; this.language = null; this.documentFile = null; - this.genre = null; this.options = null; + this.profileId = null; // address similarity parameters this.address1 = null; this.address2 = null; + this.parameters = null; // name matching parameters this.name1 = null; @@ -97,6 +98,7 @@

Source: parameters.js

this.sourceScript = null; this.targetScript = null; this.targetScheme = null; + this.maximumResults = null; // transliteration parameters this.sourceLanguage = null; @@ -117,43 +119,53 @@

Source: parameters.js

//URL parameters this.urlParameters = null; + //record similarity + this.fields = null; + this.records = null; + this.properties = null; + } /** - * Loads all non-null parameters into a new JSON that will be used as parameters for a Rosette API endpoint + * Loads all non-null parameters into a new JSON that will be used as parameters for an Analytics API endpoint * Parameters that start with '_' are internal and not included in the endpoint request */ parameters.prototype.loadParams = function() { var tempJSON = {}; var paramJSON = { + "address1": this.address1, + "address2": this.address2, "content": this.content, "contentUri": this.contentUri, + "entityType": this.entityType, + "explain": this.explain, + "fields": this.fields, "language": this.language, - "genre": this.genre, - "address1": this.address1, - "address2": this.address2, + "maximumResults": this.maximumResults, + "name": this.name, "name1": this.name1, "name2": this.name2, - "name": this.name, "names": this.names, - "threshold": this.threshold, - "targetLanguage": this.targetLanguage, - "entityType": this.entityType, + "options": this.options, + "parameters": this.parameters, + "profileId": this.profileId, + "properties": this.properties, + "records": this.records, + "short-string": this.shortString, + "sourceLanguage": this.sourceLanguage, "sourceLanguageOfOrigin": this.sourceLanguageOfOrigin, "sourceLanguageOfUse": this.sourceLanguageOfUse, - "sourceLanguage": this.sourceLanguage, "sourceScript": this.sourceScript, - "targetScript": this.targetScript, + "targetLanguage": this.targetLanguage, "targetScheme": this.targetScheme, - "options": this.options, - "explain": this.explain, - "short-string": this.shortString, + "targetScript": this.targetScript, + "threshold": this.threshold, "_customHeaders": this.customHeaders, "_urlParameters": this.urlParameters }; for (var key in paramJSON) { - if (key.substring(0, 1) !== '_' && paramJSON[key] != null && key != "customHeaders") { + if (key.substring(0, 1) !== '_' && paramJSON[key] != null && key !== "customHeaders") { tempJSON[key] = paramJSON[key]; } } @@ -180,7 +192,7 @@

Source: parameters.js

mp.addPart({ headers: { "Content-Type": "text/plain", - "Content-Disposition": "mixed; name=\"content\"; filename=\"" + path.basename(filePath) + "\"" + "Content-Disposition": `mixed; name="content"; filename="${path.basename(filePath)}"` }, body: str.toString() }) @@ -196,29 +208,32 @@

Source: parameters.js

"accept": 'application/json', "accept-encoding": "gzip", "content-type": 'multipart/mixed', - "user-agent": "rosetteapinode/" + BINDING_VERSION + "/" + process.version, + "user-agent": `Babel-Street-Analytics-API-Node/${BINDING_VERSION}/${process.version}`, + "X-BabelStreetAPI-Binding": "nodejs", + "X-BabelStreetAPI-Binding-Version": BINDING_VERSION, + //todo remove in the future "X-RosetteAPI-Binding": "nodejs", "X-RosetteAPI-Binding-Version": BINDING_VERSION } - headers["X-RosetteAPI-Key"] = userKey; + headers["X-BabelStreetAPI-Key"] = userKey; - if (parameters.customHeaders != null) { - parameters.customHeaders.forEach(function(element, index) { + if (loadedParameters.customHeaders != null) { + loadedParameters.customHeaders.forEach(function(element, index) { headers[element[0]] = element[1]; }); } - var path = urlParts.path; + var urlPath = urlParts.path; - if (parameters.urlParameters != null) { - path = path + '?' + querystring.stringify(parameters.urlParameters); + if (loadedParameters.urlParameters != null) { + urlPath = `${urlPath}?${querystring.stringify(loadedParameters.urlParameters)}`; } - var result = new Buffer(""); + var result = Buffer.from(""); var options = { hostname: urlParts.hostname, - path: path, + path: urlPath, method: 'POST', headers: headers, agent: false @@ -248,9 +263,9 @@

Source: parameters.js

result = JSON.stringify(result); if (res.statusCode === 200) { - return callback(err, JSON.parse(result.toString())); - } else if (res.statusCode != 200) { - return callback(err, JSON.parse(result.toString())); + return callback(null, JSON.parse(result.toString())); + } else { + return callback(new RosetteException(res.statusCode, result.toString())); } }); }); @@ -279,13 +294,13 @@

Source: parameters.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/ping.html b/ping.html index 5016f68..9200583 100644 --- a/ping.html +++ b/ping.html @@ -82,7 +82,7 @@

new pingCopyright: - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/ping.js.html b/ping.js.html index 2e2bc62..6566122 100644 --- a/ping.js.html +++ b/ping.js.html @@ -27,9 +27,9 @@

Source: ping.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,19 +50,19 @@ 

Source: ping.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function ping() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ ping.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { @@ -83,13 +83,13 @@

Source: ping.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/recordSimilarity.html b/recordSimilarity.html new file mode 100644 index 0000000..69cef48 --- /dev/null +++ b/recordSimilarity.html @@ -0,0 +1,382 @@ + + + + + JSDoc: Class: recordSimilarity + + + + + + + + + + +
+ +

Class: recordSimilarity

+ + + + + + +
+ +
+ +

recordSimilarity()

+ + +
+ +
+
+ + + + + + +

new recordSimilarity()

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
License:
+
  • http://www.apache.org/licenses/LICENSE-2.0
+ + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

getResults(parameters, userKey, serviceURL, callback)

+ + + + + + +
+ Makes an HTTP request to the specified Analytics API endpoint and returns the result +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
parameters + + +string + + + + The Analytics API endpoint parameters
userKey + + +string + + + + The Analytics API user access key
serviceURL + + +string + + + + The base service URL to be used to access the Analytics API
callback + + +function + + + + Callback function to be executed after the function to which it is passed is complete
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/recordSimilarity.js.html b/recordSimilarity.js.html new file mode 100644 index 0000000..98ad50e --- /dev/null +++ b/recordSimilarity.js.html @@ -0,0 +1,109 @@ + + + + + JSDoc: Source: recordSimilarity.js + + + + + + + + + + +
+ +

Source: recordSimilarity.js

+ + + + + + +
+
+
/**
+ * Analytics API.
+ *
+ * @copyright 2024 Basis Technology Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * @license http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and limitations under the License.
+ **/
+"use strict";
+
+var URL = require("url");
+
+var rosetteConstants = require("./rosetteConstants");
+var RosetteException = require("./rosetteExceptions");
+var rosetteRequest = require("./rosetteRequest");
+
+/**
+ * @class
+ *
+ * @copyright 2024 Basis Technology Corporation.
+ * @license http://www.apache.org/licenses/LICENSE-2.0
+ */
+function recordSimilarity() {
+//constructor function
+}
+
+/**
+ * Makes an HTTP request to the specified Analytics API endpoint and returns the result
+ * @param {string} parameters - The Analytics API endpoint parameters
+ * @param {string} userKey - The Analytics API user access key
+ * @param {string} serviceURL - The base service URL to be used to access the Analytics API
+ * @param {function} callback - Callback function to be executed after the function to which it is passed is complete
+ */
+recordSimilarity.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) {
+
+    if (parameters.documentFile != null) {
+        return callback(new RosetteException("badArgument", "Record similarity does not support documentFile", "bad arguments"));
+    } else {
+        // validate parameters
+        if (!parameters.loadParams().records) {
+            return callback(new RosetteException("badArgument", "Required Record Similarity parameter is missing: 'records'"));
+        } else if (!parameters.loadParams().fields) {
+            return callback(new RosetteException("badArgument", "Required Record Similarity parameter is missing: 'fields'"));
+        } else {
+            // configure URL
+            var urlParts = URL.parse(serviceURL + "record-similarity");
+            var req = new rosetteRequest();
+            req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback);
+        }
+    }
+};
+
+module.exports = recordSimilarity;
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time) +
+ + + + + diff --git a/relationships.html b/relationships.html index 3195a00..a5d759f 100644 --- a/relationships.html +++ b/relationships.html @@ -82,7 +82,7 @@

new rela - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/relationships.js.html b/relationships.js.html index d5d6110..e243190 100644 --- a/relationships.js.html +++ b/relationships.js.html @@ -27,9 +27,9 @@

Source: relationships.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: relationships.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function relationships() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ relationships.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "relationships", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "relationships"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("relationships", parameters, userKey, protocol, serviceURL, callback); }; module.exports = relationships; @@ -94,13 +80,13 @@

Source: relationships.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/rosetteConstants.js.html b/rosetteConstants.js.html index 08c8d50..4d08031 100644 --- a/rosetteConstants.js.html +++ b/rosetteConstants.js.html @@ -27,9 +27,9 @@

Source: rosetteConstants.js

/**
- * Container for the Rosette Constants.
+ * Container for the Analytics Constants.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -66,8 +66,12 @@ 

Source: rosetteConstants.js

"COMPLETE": "complete" }; +//todo make sure that version is overwritten here in rapid developer tools publishing +var BINDING_VERSION = "1.31.0"; + exports.dataFormat = dataFormat; exports.morpholoyOutput = morphologyOutput; +exports.BINDING_VERSION = BINDING_VERSION;
@@ -78,13 +82,13 @@

Source: rosetteConstants.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/rosetteExceptions.js.html b/rosetteExceptions.js.html index 99cceb0..714e964 100644 --- a/rosetteExceptions.js.html +++ b/rosetteExceptions.js.html @@ -75,13 +75,13 @@

Source: rosetteExceptions.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/rosetteRequest.html b/rosetteRequest.html index 651aeda..7096b2d 100644 --- a/rosetteRequest.html +++ b/rosetteRequest.html @@ -82,7 +82,7 @@

new ros - + @@ -159,7 +159,7 @@

makeReques
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -234,7 +234,7 @@

Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -303,7 +303,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -344,7 +344,7 @@
Parameters:
Source:
@@ -390,13 +390,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/rosetteRequest.js.html b/rosetteRequest.js.html index da34fe2..5d37f91 100644 --- a/rosetteRequest.js.html +++ b/rosetteRequest.js.html @@ -27,9 +27,9 @@

Source: rosetteRequest.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -56,29 +56,33 @@ 

Source: rosetteRequest.js

* * @type string */ -var BINDING_VERSION = "1.14.4"; -var USER_AGENT = "rosetteapinode/" + BINDING_VERSION + "/" + process.version; +var BINDING_VERSION = rosetteConstants.BINDING_VERSION; +var USER_AGENT = `Babel-Street-Analytics-API-Node/${BINDING_VERSION}/${process.version}`; /** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function rosetteRequest() { +// constructor function +} -}; - -rosetteRequest.prototype.bindingVersion = function() { return BINDING_VERSION; } -rosetteRequest.prototype.userAgent = function() { return USER_AGENT; } +rosetteRequest.prototype.bindingVersion = function() { + return BINDING_VERSION; +} +rosetteRequest.prototype.userAgent = function() { + return USER_AGENT; +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result + * Makes an HTTP request to the specified Analytics API endpoint and returns the result * @param {string} requestType - GET/POST - * @param {string} userKey - The Rosette API user access key + * @param {string} userKey - The Analytics API user access key * @param {object} urlParts - Structure containing the url parameters * @param {object} parameters - Structure containing the API parameters - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ rosetteRequest.prototype.makeRequest = function(requestType, userKey, protocol, urlParts, parameters, callback) { var headers = { @@ -86,14 +90,18 @@

Source: rosetteRequest.js

"accept-encoding": "gzip", "content-type": "application/json", "user-agent": USER_AGENT, + "X-BabelStreetAPI-Binding": "nodejs", + "X-BabelStreetAPI-Binding-Version": BINDING_VERSION, + //todo remove these in the future "X-RosetteAPI-Binding": "nodejs", "X-RosetteAPI-Binding-Version": BINDING_VERSION } if (userKey != null) { - headers["X-RosetteAPI-Key"] = userKey; + headers["X-BabelStreetAPI-Key"] = userKey; } + // to see custom headers format example in languages examples if (parameters.customHeaders != null) { parameters.customHeaders.forEach(function(element, index) { headers[element[0]] = element[1]; @@ -104,7 +112,7 @@

Source: rosetteRequest.js

var path = urlParts.path; if (parameters.urlParameters != null) { - path = path + '?' + querystring.stringify(parameters.urlParameters); + path = `${path}?${querystring.stringify(parameters.urlParameters)}`; } var options = { @@ -119,50 +127,67 @@

Source: rosetteRequest.js

options.port = urlParts.port; } - var requestTask = function(callback) { - var result = new Buffer(""); - // execute the http/https request - var req = protocol.request(options, function(res) { - res.on("data", function(docs) { - result = Buffer.concat([result, docs]); - }); - - res.on("end", function(err) { - if (err) { - return callback(err) - } - - if (res.headers["content-encoding"] === "gzip") { - result = zlib.gunzipSync(result); - } - - result = JSON.parse(result); - result.headers = res.headers; - result = JSON.stringify(result); - - if (res.statusCode === 200) { - return callback(null, JSON.parse(result.toString())); - } else { - return callback(new RosetteException(res.statusCode, result.toString())); - } - }); - }); + requestTask(protocol, options, parameters, callback); +}; - req.on("error", function(e) { - console.log(e) - return callback(e); +function requestTask(protocol, options, parameters, callback) { + var result = Buffer.from(""); + // execute the http/https request + var req = protocol.request(options, function(res) { + res.on("data", function(docs) { + result = Buffer.concat([result, docs]); }); - if (parameters !== null) { - req.write(JSON.stringify(parameters.loadParams())); - } + res.on("end", function(err) { + if (err) { + return callback(err) + } - req.end(); - }; + if (res.headers["content-encoding"] === "gzip") { + result = zlib.gunzipSync(result); + } - requestTask(callback); + result = JSON.parse(result); + result.headers = res.headers; + result = JSON.stringify(result); -}; + if (res.statusCode === 200) { + return callback(null, JSON.parse(result.toString())); + } else { + return callback(new RosetteException(res.statusCode, result.toString())); + } + }); + }); + + req.on("error", function(e) { + console.log(e) + return callback(e); + }); + + if (parameters !== null) { + req.write(JSON.stringify(parameters.loadParams())); + } + + req.end(); +} + +rosetteRequest.prototype.makeDocumentRequest = function(endpoint, parameters, userKey, protocol, serviceURL, callback) { + if (parameters.documentFile != null) { + parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, endpoint, callback); + } else { + // validate parameters + if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { + return callback(new RosetteException("badArgument", "Must supply one of content or contentUri", "bad arguments")); + } else if (parameters.loadParams().content != null && parameters.loadParams().contentUri != null) { + return callback(new RosetteException("badArgument", "Cannot supply content and contentUri", "bad arguments")); + } else { + // configure URL + var urlParts = URL.parse(serviceURL + endpoint); + var req = new rosetteRequest(); + req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); + } + } +} module.exports = rosetteRequest;
@@ -175,13 +200,13 @@

Source: rosetteRequest.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/semanticVectors.html b/semanticVectors.html index 9479034..37064b0 100644 --- a/semanticVectors.html +++ b/semanticVectors.html @@ -82,7 +82,7 @@

new se - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/semanticVectors.js.html b/semanticVectors.js.html index aa5152d..e22ab41 100644 --- a/semanticVectors.js.html +++ b/semanticVectors.js.html @@ -27,9 +27,9 @@

Source: semanticVectors.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: semanticVectors.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function semanticVectors() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ semanticVectors.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "semantics/vector", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "semantics/vector"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("semantics/vector", parameters, userKey, protocol, serviceURL, callback); }; module.exports = semanticVectors; @@ -94,13 +80,13 @@

Source: semanticVectors.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/sentences.html b/sentences.html index 415e246..048e3b4 100644 --- a/sentences.html +++ b/sentences.html @@ -82,7 +82,7 @@

new sentence - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/sentences.js.html b/sentences.js.html index d82b0a8..b4824fb 100644 --- a/sentences.js.html +++ b/sentences.js.html @@ -27,9 +27,9 @@

Source: sentences.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: sentences.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function sentences() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ sentences.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "sentences", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "sentences"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("sentences", parameters, userKey, protocol, serviceURL, callback); }; module.exports = sentences; @@ -94,13 +80,13 @@

Source: sentences.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/sentiment.html b/sentiment.html index 17eafc4..6ad4217 100644 --- a/sentiment.html +++ b/sentiment.html @@ -82,7 +82,7 @@

new sentimen - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/sentiment.js.html b/sentiment.js.html index 7e9d914..ca56904 100644 --- a/sentiment.js.html +++ b/sentiment.js.html @@ -27,9 +27,9 @@

Source: sentiment.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: sentiment.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function sentiment() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ sentiment.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "sentiment", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "sentiment"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("sentiment", parameters, userKey, protocol, serviceURL, callback); }; module.exports = sentiment; @@ -94,13 +80,13 @@

Source: sentiment.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/similarTerms.html b/similarTerms.html index fe0c3f2..64d1741 100644 --- a/similarTerms.html +++ b/similarTerms.html @@ -82,7 +82,7 @@

new simil - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/similarTerms.js.html b/similarTerms.js.html index c61eae5..a3c9bdb 100644 --- a/similarTerms.js.html +++ b/similarTerms.js.html @@ -27,9 +27,9 @@

Source: similarTerms.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2018 Basis Technology Corporation.
+ * @copyright 2018-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,40 +50,27 @@ 

Source: similarTerms.js

/** * @class * - * @copyright 2018 Basis Technology Corporation. + * @copyright 2018-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function similarTerms() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ similarTerms.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "semantics/similar", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of content or contentUri", "bad arguments")); - } else if (parameters.loadParams().content != null && parameters.loadParams().contentUri != null) { - return callback(new RosetteException("badArgument", "Cannot supply content and contentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "semantics/similar"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("semantics/similar", parameters, userKey, protocol, serviceURL, callback); }; -module.exports = similarTerms;
+module.exports = similarTerms; +
@@ -93,13 +80,13 @@

Source: similarTerms.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/syntax_dependencies.html b/syntax_dependencies.html index bf732c8..8e0f239 100644 --- a/syntax_dependencies.html +++ b/syntax_dependencies.html @@ -82,7 +82,7 @@

ne - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/syntax_dependencies.js.html b/syntax_dependencies.js.html index 9265f87..5cdc676 100644 --- a/syntax_dependencies.js.html +++ b/syntax_dependencies.js.html @@ -27,9 +27,9 @@

Source: syntax_dependencies.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: syntax_dependencies.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function syntax_dependencies() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ syntax_dependencies.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "syntax/dependencies", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "syntax/dependencies"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("syntax/dependencies", parameters, userKey, protocol, serviceURL, callback); }; module.exports = syntax_dependencies; @@ -94,13 +80,13 @@

Source: syntax_dependencies.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/textEmbedding.html b/textEmbedding.html index 9dd5e70..d507d54 100644 --- a/textEmbedding.html +++ b/textEmbedding.html @@ -82,7 +82,7 @@

new text - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/textEmbedding.js.html b/textEmbedding.js.html index c827b87..73363cd 100644 --- a/textEmbedding.js.html +++ b/textEmbedding.js.html @@ -27,9 +27,9 @@

Source: textEmbedding.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: textEmbedding.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function textEmbedding() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ textEmbedding.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "text-embedding", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "text-embedding"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("text-embedding", parameters, userKey, protocol, serviceURL, callback); }; module.exports = textEmbedding; @@ -94,13 +80,13 @@

Source: textEmbedding.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/tokens.html b/tokens.html index ef393d2..627a929 100644 --- a/tokens.html +++ b/tokens.html @@ -82,7 +82,7 @@

new tokensCopyright: - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/tokens.js.html b/tokens.js.html index f8238a0..3a65b42 100644 --- a/tokens.js.html +++ b/tokens.js.html @@ -27,9 +27,9 @@

Source: tokens.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: tokens.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function tokens() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ tokens.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "tokens", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "tokens"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("tokens", parameters, userKey, protocol, serviceURL, callback); }; module.exports = tokens; @@ -94,13 +80,13 @@

Source: tokens.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/topics.html b/topics.html index b8869fb..8b47b98 100644 --- a/topics.html +++ b/topics.html @@ -82,7 +82,7 @@

new topicsCopyright: - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/topics.js.html b/topics.js.html index 138dfed..285ee7f 100644 --- a/topics.js.html +++ b/topics.js.html @@ -27,9 +27,9 @@

Source: topics.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,37 +50,23 @@ 

Source: topics.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function topics() { - -}; +//constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ topics.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "topics", callback); - } else { - // validate parameters - if (!parameters.loadParams().content && !parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Must supply one of Content or ContentUri", "bad arguments")); - } else if (parameters.loadParams().content && parameters.loadParams().contentUri) { - return callback(new RosetteException("badArgument", "Cannot supply both Content and ContentUri", "bad arguments")); - } else { - // configure URL - var urlParts = URL.parse(serviceURL + "topics"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } - } + var req = new rosetteRequest(); + req.makeDocumentRequest("topics", parameters, userKey, protocol, serviceURL, callback); }; module.exports = topics; @@ -94,13 +80,13 @@

Source: topics.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/transliteration.html b/transliteration.html index f9bcc44..ff77a56 100644 --- a/transliteration.html +++ b/transliteration.html @@ -82,7 +82,7 @@

new tr - + @@ -159,7 +159,7 @@

getResults<
- Makes an HTTP request to the specified Rosette API endpoint and returns the result + Makes an HTTP request to the specified Analytics API endpoint and returns the result
@@ -211,7 +211,7 @@

Parameters:
- The Rosette API endpoint parameters + The Analytics API endpoint parameters @@ -234,7 +234,7 @@
Parameters:
- The Rosette API user access key + The Analytics API user access key @@ -257,7 +257,7 @@
Parameters:
- The base service URL to be used to access the Rosette API + The base service URL to be used to access the Analytics API @@ -280,7 +280,7 @@
Parameters:
- Callback function to be exectuted after the function to which it is passed is complete + Callback function to be executed after the function to which it is passed is complete @@ -367,13 +367,13 @@
Parameters:

- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)
diff --git a/transliteration.js.html b/transliteration.js.html index 212240d..06608ef 100644 --- a/transliteration.js.html +++ b/transliteration.js.html @@ -27,9 +27,9 @@

Source: transliteration.js

/**
- * Rosette API.
+ * Analytics API.
  *
- * @copyright 2016-2018 Basis Technology Corporation.
+ * @copyright 2016-2024 Basis Technology Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
@@ -50,34 +50,23 @@ 

Source: transliteration.js

/** * @class * - * @copyright 2016-2018 Basis Technology Corporation. + * @copyright 2016-2024 Basis Technology Corporation. * @license http://www.apache.org/licenses/LICENSE-2.0 */ function transliteration() { - -}; +// constructor function +} /** - * Makes an HTTP request to the specified Rosette API endpoint and returns the result - * @param {string} parameters - The Rosette API endpoint parameters - * @param {string} userKey - The Rosette API user access key - * @param {string} serviceURL - The base service URL to be used to access the Rosette API - * @param {function} callback - Callback function to be exectuted after the function to which it is passed is complete + * Makes an HTTP request to the specified Analytics API endpoint and returns the result + * @param {string} parameters - The Analytics API endpoint parameters + * @param {string} userKey - The Analytics API user access key + * @param {string} serviceURL - The base service URL to be used to access the Analytics API + * @param {function} callback - Callback function to be executed after the function to which it is passed is complete */ transliteration.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) { - - if (parameters.documentFile != null) { - parameters.loadFile(parameters.documentFile, parameters, userKey, protocol, serviceURL, "transliteration", callback); - } else { - // validate parameters - if (!parameters.loadParams().content) { - return callback(new RosetteException("badArgument", "Must supply Content", "bad arguments")); - } - // configure URL - var urlParts = URL.parse(serviceURL + "transliteration"); - var req = new rosetteRequest(); - req.makeRequest('POST', userKey, protocol, urlParts, parameters, callback); - } + var req = new rosetteRequest(); + req.makeDocumentRequest("transliteration", parameters, userKey, protocol, serviceURL, callback); }; module.exports = transliteration; @@ -91,13 +80,13 @@

Source: transliteration.js


- Documentation generated by JSDoc 3.6.4 on Tue Jun 16 2020 19:45:41 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Fri Nov 22 2024 22:59:41 GMT+0000 (Coordinated Universal Time)