Socket
Socket
Sign inDemoInstall

node-dropbox

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-dropbox - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

10

CHANGELOG.txt

@@ -11,2 +11,10 @@ VERSION 0.1.0:

- Renamed api.fileops.removeFolder to just remove.
- Updated README
- Updated README
VERSION 0.1.3:
- Added getMetadata() method (thanks @elarnellis)
VERSION 0.1.4:
- Added getFile() method for retreiving a files contents (thanks @elarnellis)

@@ -18,3 +18,4 @@ var request = require('request');

},
putFiles: '/files_put'
putFiles: '/files_put',
getFiles: '/files/auto'
};

@@ -29,3 +30,3 @@

}else{
redirect_url = authUrl + "client_id=" + ckey + "&response_type=code&redirect_uri=" + redirect_uri;
redirect_url = authUrl + "client_id=" + ckey + "&response_type=token&redirect_uri=" + redirect_uri;
}

@@ -108,2 +109,24 @@

});
},
/**
* get the metadata of a file or folder
* the result body.contents can be used to list a folder's content
*/
getMetadata: function(path, cb) {
options = optionsBuilder(apiRoot + api.metadata + path, access_token);
request.get(options, function(err, res, body) {
cb(err, res, body);
});
},
/**
* Downloads a file.
*/
getFile: function(path, cb) {
options = optionsBuilder(apiContentRoot + api.getFiles + path, access_token);
request(options, function(err, res, body) {
cb(err, res, body);
})
}

@@ -110,0 +133,0 @@ }

2

package.json
{
"name": "node-dropbox",
"description": "A simple Dropbox API client for node.js",
"version": "0.1.3",
"version": "0.1.4",
"author": "Joshua Kidd <kidd.josh.343@gmail.com>",

@@ -6,0 +6,0 @@ "keywords": [

@@ -63,2 +63,4 @@ # Node Dropbox

api.moveSomething(from_path, to_path, callback); // Moves/renames a file.
api.getMetadata(path, callback) // Retrieves file and folder metadata. Can be used to list a folder's content.
api.getFile(path, callback) // Downloads a file.

@@ -65,0 +67,0 @@ // Each callback will return the error message, response, and body(json data).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc