1.0.2 • Published 7 years ago

keyvalue-xyz v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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