NodeCloudPT -- NodeJS SDK for the CloudPT service
NodeCloudPT
NodeCloudPT is a NodeJS SDK for the CoudPT service that covers all the API methods and parameters. You can see all the API documentation here.
Also has an experimental function that imports directly a file from a URL.
Basic Examples
Create an instance
var cloudpt = oauth : consumer_key : "your consumer key" consumer_secret : "your consumer secret" token : "your access token" token_secret : "your access token secret" ;
Account Info
cloudpt;
Metadata
cloudpt;
List
;
Create Folder
cloudpt;
Delta
cloudpt;
Copy
cloudpt;
See more examples on tests folder
Uploading and downloading files
Upload
You have to describe the path
on the server to place the file
on your filesystem.
cloudpt;
Download
You have to describe the path
on the server where to get the content. You can indicate a file
on your filesystem to save the result our get it on the callback function.
// get content on data variablecloudpt;// save content to a filecloudpt;
Import directly from URL
You can import a file directly from a URL by describing the url
where to find the file and the path
where to store it.
// get content on data variablecloudpt;
TODO
- Functions to get the oAuth tokens
- Import directly from other storage services