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

apiai-nodejs-co

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apiai-nodejs-co

Node.js SDK for api.ai

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

api-ai-node-js

Fork of Original Node.js SDK for Api.ai, for making api.ai requests

Plugin makes it easy to integrate your Node.js application with api.ai natural language processing service.

Installation

  • Make sure that Node.js installed.
  • Install Node.js library with npm:
npm install apiai-nodejs-co

Usage

  • Create main.js file. Insert into following code.
var apiai = require('apiai-nodejs-co');

var options = {
    hostname: "api.api.ai",
    port: 443,
    path: "/v1/query",
    version: "20150910"
}
var app = apiai("<your client acces token>", "<your client subscribtion key>" options);

var reqOptions = {
	lang: "en",
	timezone: "<eg Africa/Lagos>",
	sessionId: "<sessionId here>"
}
var request = app.textRequest('<Your text query>' reqOptions);

request.on('response', function(response) {
    console.log(response);
});

request.on('error', function(error) {
    console.log(error);
});

request.end()
  • Run following command.
node main.js

Keywords

FAQs

Package last updated on 25 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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