New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

send-anywhere

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

send-anywhere

A sweet layer on top of Send-Anywhere API to use it with node.js

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

A sweet layer on top of Send-Anywhere API to use it with node.js

Installation

npm install send-anywhere

API

Initialize SDK

You can get the API key by requesting it from Send-Anywhere team.

var config = {
	API_KEY  : "XXXXXXXXXXXXXXXXXXXXXXXX" ,
	PROFILE_NAME :  'YYYYYY'	 	
};

var sa = require('./index.js')(config);

sendFile(SRC_FILE , detailsCallback , completedCallback)

sa.sendFile('package.json' , function(err , details){
	console.log(details);
} , function(err , completedObj){
	console.log(completedObj);
});
  • detailsCallback - Use this to fetch the details that are required for receiving the file. check out details object for further information.
  • completedCallback - Use this to execute something after the transfer of file is complete.

receiveAsData(KEY , receivedCallback)

sa.receiveAsData(KEY ,function(err , data , reponse){
  console.log(data);
  console.log(response); //contains headers and other meta data
});

Error Handling

Use the err objects in the callback to handle errors. err has two objects err.error and err.response. In case you would want to dig deep on your errors , a knowledge about this may come handy.

Resources

Contributing

Anything ! More than welcomed.

License

Keywords

send

FAQs

Package last updated on 20 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts