Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aylien_textapi

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aylien_textapi - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

2

lib/apirequest.js

@@ -24,3 +24,3 @@ /**

var VERSION = "0.4.0";
var VERSION = "0.5.0";

@@ -27,0 +27,0 @@ function getMissingParams(params, required) {

{
"name": "aylien_textapi",
"description": "AYLIEN Text API Client Library for Node.js",
"version": "0.4.0",
"version": "0.5.0",
"author": "AYLIEN Inc.",

@@ -6,0 +6,0 @@ "contributors": [

@@ -137,2 +137,28 @@ /**

/**
* textapi.classifyByTaxonomy
*
* @desc Classifies a body of text according to the specified taxonomy.
*
* @memberof! aylien_textapi(v1)
* @instance
*
* @param {object} params - Parameters for request
* @param {string} params.text - Text
* @param {string} params.url - URL
* @param {string} params.taxonomy - Taxonomy to classify according to
* @param {string=} [params.language=en] - Language of text
* @param {callback} callback - The callback that handles the response
*/
this.classifyByTaxonomy = function(params, callback) {
if (!params.taxonomy) {
callback(new Error('You must specify a taxonomy'));
} else {
var taxonomy = params.taxonomy;
delete params.taxonomy;
params = util.extend({endpointPath: 'classify/' + taxonomy}, this.normalizeParams(params));
createAPIRequest(params, [['text', 'url']], callback);
}
};
/**
* textapi.unsupervisedClassify

@@ -139,0 +165,0 @@ *

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc