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

kuzzle-sdk

Package Overview
Dependencies
Maintainers
1
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kuzzle-sdk

Official Javascript SDK for Kuzzle

  • 1.8.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-15.91%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status codecov.io Dependency Status

Official Kuzzle Javascript SDK

This SDK version is compatible with Kuzzle 1.0.0-beta.1 and higher

About Kuzzle

For UI and linked objects developers, Kuzzle is an open-source solution that handles all the data management (CRUD, real-time storage, search, high-level features, etc).

You can access the Kuzzle repository on Github

SDK Documentation

The complete SDK documentation is available here

Installation

This SDK can be used either in NodeJS or in a browser.

NodeJS

npm install kuzzle-sdk --save
Basic usage
var
  Kuzzle = require('kuzzle-sdk'),
  kuzzle = new Kuzzle('http://foobar:7512');

var myDoc = {
  name: 'Rick Astley',
  birthDate: '1966/02/06',
  mainActivity: 'Singer',
  website: 'http://www.rickastley.co.uk',
  comment: 'Never gonna give you up, never gonna let you down'
};

kuzzle
  .dataCollectionFactory('music', 'people')
  .createDocument(myDoc, function(error, response) {
    if (error) {
      // handle error...
    }
    /*
    'response' is a KuzzleDocument object
    */
});

// In NodeJS version, you can also use Promise by suffixing functions with "Promise"
kuzzle
  .dataCollectionFactory('music', 'people')
  .createDocumentPromise(myDoc)
  .then(response => {
    /*
    'response' is a KuzzleDocument object
    */
  })
  .catch(error => {
    // handle error here
  });
});

Javascript

You can install this SDK with Bower.

bower install kuzzle-sdk --save
<!-- Don't forget to include socketio before kuzzle -->
<script type="text/javascript" src="bower_components/socket.io-client/socket.io.js"></script>
<script type="text/javascript" src="bower_components/kuzzle-sdk/dist/kuzzle.min.js"></script>
Basic usage
var
  kuzzle = new Kuzzle('http://foobar:7512');

var myDoc = {
  name: 'Rick Astley',
  birthDate: '1966/02/06',
  mainActivity: 'Singer',
  website: 'http://www.rickastley.co.uk',
  comment: 'Never gonna give you up, never gonna let you down'
};

kuzzle
  .dataCollectionFactory('music', 'people')
  .createDocument(myDoc, function(error, response) {
    if (error) {
      // handle error...
    }
    /*
    'response' is a KuzzleDocument object
    */
});

Building manually

Clone this github repository and run grunt. A dist directory will be created, containing a plain browserified version of this SDK, and a minified version.

License

Apache 2

Keywords

FAQs

Package last updated on 04 May 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