Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.03 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.03 KB

keyvalue-xyz

An unnoficial keyvalue.xyz client.

Usage

var kvs = require('keyvalue-xyz');

// Creating a new token
kvs.createToken(key, function(error, token) {
    // error: any error that has occurred
    // token: the token that can be used to fetch and update the specified key
});

// Setting the value for a key
kvs.setValueForKey(token, key, value, function(error) {
    // error: any error that has occurred
});

// Setting the JSON value for a key
kvs.setJSONForKey(token, key, jsonValue, function(error) {
    // error: any error that has occurred
});

// Getting the value for a key
kvs.getValueForKey(token, key, function(error, value) {
    // error: any error that has occurred
    // value: the value for the provided key
});

// Getting the JSON value for a key
kvs.getJSONForKey(token, key, function(error, value) {
    // error: any error that has occurred
    // value: the JSON value for the provided key
});

Building / Testing

  1. Checkout this repository
  2. npm install
  3. npm test