0.0.1 • Published 7 years ago

angus-sdk-js v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

Angus Javascript SDK's documentation

Angus Javascript SDK is a npm client library for Angus.ai <https://www.angus.ai> perception web services. Please look at Angus.ai full API here <http://doc.angus.ai>.

Installation (Not ready yet)

Automatic installation::

npm install angus-sdk-js

Unit testing::

npm test

Hello, world

Here is a simple "Hello, world" example for Angus SDK (test within the folder and run 'node yourscript.js'):

.. parsed-literal::

 const Angus = require('./index.js')();

 const credentials = {
   client_id: 'YOUR CLIENT ID',
   access_token: 'YOUR ACCESS TOKEN',
   root: 'https://gate.angus.ai',
   email: 'YOUR EMAIL'
 };

 Angus.connect(credentials, function(err, sdk) {
   if (err) {
     return console.log(err);
   }

   let params = {
     metrics: ['interested', 'passing_by'],
     from_date: (new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)) // Seven days ago
   };

   sdk.data.get_entities(params, function(err, results) {
     if (err) {
       return console.log(err);
     }
     console.log(results.entities);
   });
 });

An other example using services (replace ./me.jpg by your picture):

.. parsed-literal::

 const Angus = require('./index.js')();
 const AngusBuffer = Angus.AngusBuffer;

 const credentials = {
   client_id: 'YOUR CLIENT ID',
   access_token: 'YOUR ACCESS TOKEN',
   root: 'https://gate.angus.ai',
   email: 'YOUR EMAIL'
 };

 Angus.connect(credentials, function(err, sdk) {
   if (err) {
     return console.log(err);
   }

   sdk.services.get_service('scene_analysis', {
     version: 1,
     error: err => console.log(err.response),
     callback: sceneAnalysis => {
       service.enable_session();
       sceneAnalysis.process({
         callback: function(job) {
           console.log(job);
         },
         error: function(err) {
           console.log(err.response);
         },
         async: false,
         parameters: {
           image: new AngusBuffer('./me.jpg'),
           timestamp: (new Date()).toISOString()
         }
       });
     }
   });
 });

Go further

  • The complete API documentation is available here <http://doc.angus.ai>_.
  • See "Discussion and support" bellow.

Discussion and support

You can contact Angus.ai team at contact@angus.ai <mailto:contact@angus.ai>

For technical issues or question, start on Angus forum to get support by sending email on support@angus.ai <mailto:support@angus.ai>_ or by using online web interface https://groups.google.com/a/angus.ai/d/forum/support

This web site and all documentation is licensed under Creative Commons 3.0 <http://creativecommons.org/licenses/by/3.0/>_.

Angus Javascript SDK is an Angus.ai open source technology. It is available under the Apache License, Version 2.0. <https://www.apache.org/licenses/LICENSE-2.0.html>_. Please read LICENSE and NOTICE files for more information.

Copyright 2015-2018, Angus.ai