keyvalue-xyz

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i keyvalue-xyz

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • mattmcneeney