THIS PACKAGE HAS BEEN DEPRECATED AS A STANDALONE MODULE. USE STORJ/CORE INSTEAD.
A Simple HTTP client for communicating with Storj Bridge.
Install the Storj Bridge Command Line Interface using NPM:
npm install -g storj-bridge-client
Run the storjcli
program to view usage:
storjcli --help
Install the Storj Bridge client tools using NPM:
npm install storj-bridge-client --save
Optionally build a browser bundle:
npm run build
Register a user account on Storj Bridge:
// Import the client
var bridge = require('storj-bridge-client');
// Create unauthenticated instance
var client = new bridge.Client('https://api.storj.io');
// Register a user account
client.createUser('[email protected]', 'somebigsecret').then(function(result) {
console.log(result);
}, function(err) {
console.log(err);
});
Create a storage bucket for your user:
// Import the client
var bridge = require('storj-bridge-client');
// Authenticate with credentials
var client = new bridge.Client('https://api.storj.io', {
basicauth: {
email: '[email protected]',
password: 'somebigsecret'
}
});
// Create a bucket and print the result
client.createBucket().then(function(result) {
console.log(result);
}, function(err) {
console.log(err);
});
bridge-client-javascript - JavaScript client for Storj Bridge.
Copyright (C) 2016 Storj Labs, Inc
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.