Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.
pofallon edited this page Aug 16, 2012 · 14 revisions

Welcome to the node-bluesky wiki!

API Documentation and Samples

Blob Storage API | Samples

Queue Storage API | Samples

Table Storage API | Samples

General Concepts

Callbacks or Events - the choice is yours!

Pass a callback to a list-oriented method and you'll get an array of results in the callback. Leave off the callback and you'll get an event emitter which will emit 'data' events for each item and an 'end' event with a count of items.

var storage = require('bluesky').storage();

var container = storage.container('test');

container.list().on('data', function(blob) {
  console.log(blob);
}).on('end', function(count) {
  console.log(count);
});

This applies to lists of containers, blobs, tables and queues. It also applies to the rows() method on a table object.

It all starts with 'storage'

The storage API's are accessible via a reference to storage, which is obtained by:

var storage = require('bluesky').storage(options);

Available options include:

  • account
  • key

You can also invoke it without an account and key to access the local storage emulator:

var storage = require('bluesky').storage();