backblaze-b2
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -1,4 +0,12 @@ | ||
### v0.9.0 - The bucket release | ||
### v0.9.1 (November 21, 2015) - The moar tests release | ||
Features implemented | ||
Features | ||
- Added tests for all existing code | ||
Fixes | ||
- Implementation internally of request module | ||
### v0.9.0 (November 20, 2015) - The bucket release | ||
Features | ||
- Authorization | ||
@@ -5,0 +13,0 @@ - Bucket Creation |
@@ -11,3 +11,3 @@ var q = require('q'); | ||
var requestInstance = request.getRequest(); | ||
var requestInstance = request.getInstance(); | ||
requestInstance(options, utils.getProcessAuthSuccess(b2, deferred)); | ||
@@ -14,0 +14,0 @@ |
@@ -24,2 +24,4 @@ var actions = require('./actions'); | ||
/* | ||
B2.prototype.list_buckets = function() {}; | ||
B2.prototype.delete_file_version = function() {}; | ||
@@ -37,4 +39,2 @@ | ||
B2.prototype.list_buckets = function() {}; | ||
B2.prototype.list_file_names = function() {}; | ||
@@ -41,0 +41,0 @@ |
@@ -11,13 +11,6 @@ var q = require('q'); | ||
exports.getRequest = function() { | ||
if (!REQUEST) { | ||
REQUEST = require('request'); | ||
} | ||
return REQUEST; | ||
}; | ||
exports.sendRequest = function(options) { | ||
var deferred = q.defer(); | ||
var requestInstance = exports.getRequest(); | ||
var requestInstance = exports.getInstance(); | ||
requestInstance(options, utils.processResponseGeneric(deferred)); | ||
@@ -27,1 +20,8 @@ | ||
}; | ||
exports.getInstance = function() { | ||
if (!REQUEST) { | ||
REQUEST = require('request'); | ||
} | ||
return REQUEST; | ||
}; |
@@ -1,4 +0,9 @@ | ||
var utils = require('./utils'); | ||
exports.getAuthHeaderObject = function(accountId, applicationKey) { | ||
if (!accountId) { | ||
throw new Error('Invalid accountId'); | ||
} | ||
if (!applicationKey) { | ||
throw new Error('Invalid applicationKey'); | ||
} | ||
var base64 = new Buffer(accountId + ':' + applicationKey).toString('base64'); | ||
@@ -11,2 +16,8 @@ return { | ||
exports.getAuthHeaderObjectWithToken = function(b2) { | ||
if (!b2) { | ||
throw new Error('Invalid B2 instance'); | ||
} | ||
if (!b2.authorizationToken) { | ||
throw new Error('Invalid authorizationToken'); | ||
} | ||
return { | ||
@@ -13,0 +24,0 @@ Authorization: b2.authorizationToken |
{ | ||
"name": "backblaze-b2", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Node.js Library for the Backblaze B2 Storage Service", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,2 +11,9 @@ ### Backblaze B2 Node.js Library | ||
### Status of project | ||
At this time not all API features of Backblaze B2 are yet implemented. | ||
Once all API features are implemented, version will be updated to 1.0.x | ||
### Usage | ||
@@ -13,0 +20,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21477
20
496
37
1