Stackable Javascript Library
This is the Official Stackable API Javascript library for getting data from stacks.
Available and Support in both Browser
and NodeJs
.
Working examples are found in examples
directory!
Install
You can get it on npm
npm install stackable --save
Or bower, too.
bower install get-stackable --save
Include Stackable file in your project
In browser
browser requires jQuery
In Node
var Stackable = require('stackable');
Usage
Make sure to create an account at http://www.stackable.space and setup your Stack and Containers.
To initialize
var stackable = 'YOUR-STACK-PUBLIC-KEY-HERE';
To list all containers
stackable;
To get single containers
stackable;
To get all items within single container
stackable;
To get all items within stack
stackable;
To get single item
stackable;
To create new item
- First initialize, using PRIVATE KEY, (MAKE SURE YOU KEEP THIS KEY SAFE! MOSTLY ON SERVER SIDE)
var stackable = 'YOUR-STACK-PRIVATE-KEY-HERE';
var dataToPost = name: 'John Doe' age: 29; stackable;
To update an item
var dataToUpdate = name: 'John Doe' age: 29; stackable;
To build (development)
Sources files are located in src
directory
Run npm install to setup required libraries.
npm install
npm Scripts
npm run build
- Lint then build the library
Todo
- Write tests