Embdr Client for Node.JS
The Node.JS client to communicate with the Embdr REST API
Dependencies
- Node.JS
Installation
You can install the client through NPM
npm install embdr
Example
var Embdr = ; // Create a new embdr instancevar embdr = 'VUT6blsAabPE2Vw7BkDZiCJ45duoBtit'; // Process a file on diskembdr;
The process
function is overloaded and can take other types such as HTTP links:
var url = 'https://upload.wikimedia.org/wikipedia/meta/b/be/Wikipedia-logo-v2_2x.png';
embdr.process(url, {
'complete': function(resource) {
console.log('Completely processed a URL
');
console.log(resource);
}
});
It can also take in any kind of readable stream:
var stream = myFunctionThatReturnsAStream();
embdr.process(stream, {
'complete': function(resource) {
console.log('Completely processed a resource');
console.log(resource);
}
});
Documentation
TODO