An unnoficial keyvalue.xyz client.
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
});
- Checkout this repository
npm install
npm test