0.0.5 • Published 9 years ago

jaas-node v0.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

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

0.0.5

9 years ago

0.0.4

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago