Skip to content

A Node.js client for the Cortical.io Retina API

Notifications You must be signed in to change notification settings

bram-l/cortical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cortical

Promise based wrapper for the Cortical.io Retina API

Installation

npm install cortical --save

Usage

Create a new client instance

const Cortical = require('cortical');
const client = new Cortical({ key: YOUR_API_KEY });

Send a GET request

client.get('terms', { term: text })
	.then(result => console.log(result));

// [
//   {
//     "term": ...,
//     ...
//   }
// ]

Send a POST request

client.post('text', text)
	.then(result => console.log(result));

// [
//   {
//     "positions": [...]
//   }
// ]

Get a fingerprint for a text

client.getFingerprint(text)
	.then(result => console.log(result));

// [2,3,65,66...]

Get fingerprints for an array of texts

client.getFingerprints(texts)
	.then(results => console.log(results));

// [
//   [2,3,65,66...],
//   ....
// ]

About

A Node.js client for the Cortical.io Retina API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published