You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

jaas-node

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jaas-node

JAAS node client

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
5
-64.29%
Maintainers
1
Weekly downloads
 
Created
Source

jaas-node-client

Node client for JAAS api - https://jaas.tech/

##Install

npm install jaas-node

##Usage Get your API key from https://app.jaas.tech/

var jaas = require("jaas-node");
jaas.init('<Your API Key>');

###Create a Collection A collection is created when you put the first item into it.

jaas.createItem('<Collection Name>', <JSON object>, function(err, data) {
  if(err) console.log(err);
  console.log(data);
});

###Read a Collection It will return an array of objects

jaas.collection('<Collection Name>', function(err, data) {
  if(err) console.log(err);
  console.log(data);
});

Read a collection with filter

jaas.collection('<Collection Name>', { "name" : { "like" : "matt" } }, function(err, data) {
  if(err) console.log(err);
  console.log(data);
});

Refer to the API docs to read more about filters.

###Read an item in Collection

jaas.readItem('<Collection Name>', '<Item ID>', function(err, data) {
  if(err) console.log(err);
  console.log(data);
});

###Update an item in Collection

jaas.updateItem('<Collection Name>', '<Item ID>', <JSON object>, function(err, data) {
  if(err) console.log(err);
  console.log(data);
});

###Delete an item in Collection

jaas.deleteItem('<Collection Name>', '<Item ID>', function(err, data) {
  if(err) console.log(err);
  console.log(data);
});

###Help? email arjunkomath@gmail.com

Keywords

jaas

FAQs

Package last updated on 22 Jun 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