Package Exports
- swift
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (swift) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Swift
OpenStack Object Storage(Swift) REST client API for Node.JS
Installing
GIT
$ git clone git://github.com/firejune/swift.gitNPM
$ npm install swiftCode
var Swift = require('./swift');
var swift = new Swift({
user: 'auth-user'
, pass: 'auth-key'
, host: 'auth.api.yourcloud.com'
, port: 443
}, function(req) {
if (req.statusCode == 200)
// success
else
// error
});
// Authentication
swift.listContainers(handlerFunction);
swift.retrieveAccountMetadata(handlerFunction);
// Storage Services
swift.listObjects(containerName, handlerFunction);
swift.createContainer(containerName, handlerFunction);
swift.deleteContainer(containerName, handlerFunction);
swift.retrieveContainerMetadata(containerName, handlerFunction);
// Object Services
swift.retrieveObject(containerName, objectName, handlerFunction);
swift.createObject(containerName, objectName, handlerFunction);
swift.copyObject(containerName, destObject, fromContainer, sourceObject, handlerFunction);
swift.deleteObject(containerName, objectName, handlerFunction);
swift.retrieveObjectMetadata(containerName, objectName, handlerFunction);
swift.updateObjectMetadata(containerName, objectName, handlerFunction);