1.0.7 • Published 8 years ago

kvpbase-sdk-js-node v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Node/Javascript SDK for kvpbase

kvpbase is a data storage platform for developers and sysadmins that allows you to quickly deploy an elastic object storage cloud with near-infinite key-value storage on your own machines within minutes. This SDK is intended to help you quickly integrate kvpbase into your application.

npm install kvpbase-sdk-js-node

Before you begin

  • Visit www.kvpbase.com to set up account, obtain your license keys, and download the kvpbase binaries to deploy on your own machines

  • This SDK is designed for integration into web or backend apps. It is not recommended that it be used in apps where the user will have access to your credentials or API keys

  • If you use the public kvpbase test servers to test the SDK, be aware that user data is expired and deleted daily

  • This SDK is designed for environments using Node.JS

Getting started

Please refer to kvpbase-sdk-js-test.js for a sample GET request using the SDK

Modify the SDK file to include your API key and the details for the kvpbase server (hostname, port, SSL)

Within your application, add a require statement for the SDK:

var kvp = require('kvpbase-sdk-js.js');

Perform the following operations using the SDK.

Retrieve an object by ID

  	kvp.kvpbase_read_obj(
  	  'object_name', 
  	  callback(err, data) { /* your function here */ });

Create an object (system-assigned name)

  	kvp.kvpbase_write_obj(
  	  'object data here', 
  	  'content-type here',
  	  callback(err, data) { /* your function here */ });

Create an object (user-assigned name)

  	kvp.kvpbase_write_inplace_obj(
  	  'object data here', 
  	  'content-type here',
  	  'desired object name',
  	  callback(err, data) { /* your function here */ });

Verify Object Exists

    kvp.kvpbase_obj_exists(
      'object_name', 
      callback(err, data) { /* your function here */ });

Rename Object

    kvp.kvpbase_rename_obj(
      'path/to/container',
      'object_name', 
      'new_object_name',
      callback(err, data) { /* your function here */ });

Move Object

    kvp.kvpbase_move_obj(
      'path/to/container',
      'object_name', 
      'path/to/different/container',
      'new_object_name',
      callback(err, data) { /* your function here */ });

Delete an object

  	kvp.kvpbase_del_obj(
  	  'object_name', 
  	  callback(err, data) { /* your function here */ });

Retrieve folder metadata

  	kvp.kvpbase_read_obj(
  	  callback(err, data) { /* your function here */ });

Rename Container

    kvp.kvpbase_rename_container(
      'path/to/container',
      'container_name', 
      'new_container_name',
      callback(err, data) { /* your function here */ });

Move Container

    kvp.kvpbase_move_container(
      'path/to/container',
      'container_name', 
      'path/to/different/container',
      'new_container_name',
      callback(err, data) { /* your function here */ });
1.0.7

8 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago