This repository has been archived by the owner on Nov 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Home
pofallon edited this page Aug 16, 2012
·
14 revisions
Welcome to the node-bluesky wiki!
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.
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();