sailthru-client
Advanced tools
Comparing version 1.0.8 to 2.0.0
{ | ||
"name": "sailthru-client", | ||
"description": "Node.js client for Sailthru API", | ||
"version": "1.0.8", | ||
"version": "2.0.0", | ||
"author": { | ||
"name": "Prajwal Tuladhar", | ||
"email": "praj@sailthru.com", | ||
"url": "http://infynyxx.com" | ||
"name": "George Liao", | ||
"email": "gliao@sailthru.com", | ||
"url": "http://www.sailthru.com" | ||
}, | ||
@@ -19,3 +19,3 @@ "repository": { | ||
"devDependencies": { | ||
"nodeunit": ">=0.5.0", | ||
"nodeunit": ">=0.8.4", | ||
"coffee-script": ">=1.1.1" | ||
@@ -22,0 +22,0 @@ }, |
@@ -5,13 +5,25 @@ sailthru-node-client | ||
For installation instructions, documentation, and examples please visit: | ||
[http://getstarted.sailthru.com/developers/api-libraries/node](http://getstarted.sailthru.com/developers/api-libraries/node) | ||
<http://getstarted.sailthru.com/new-for-developers-overview/api-client-library/node-js-npm> | ||
A simple client library to remotely access the `Sailthru REST API` as per [http://getstarted.sailthru.com/developers/api](http://getstarted.sailthru.com/developers/api) | ||
A simple client library to remotely access the `Sailthru REST API` as per <http://getstarted.sailthru.com/new-for-developers-overview/api/api-overview/> | ||
By default, it will make request in `JSON` format. `XML` format is not supported. | ||
By default, it will make request in `JSON` format. | ||
Development | ||
----------- | ||
``` | ||
npm install # to install dependencies locally | ||
npm install -g coffee-script # to install coffee-script | ||
cake test # for running tests | ||
cake build # for building and generating JavaScript source | ||
cake watch # for watching file changes | ||
``` | ||
Installation | ||
------------ | ||
### npm install sailthru-client | ||
``` | ||
npm install sailthru-client | ||
``` | ||
@@ -35,3 +47,3 @@ Examples | ||
### Enable / Disable LOgging | ||
### Enable / Disable Logging | ||
@@ -52,8 +64,8 @@ ``` js | ||
}; | ||
sailthru.apiPost('email', data, function(response, err) { | ||
sailthru.apiPost('email', data, function(err, response) { | ||
if (!err) { | ||
console.log(response); | ||
console.log(response); | ||
} else { | ||
console.log('Error!'); | ||
console.log(err);' | ||
console.log(err); | ||
} | ||
@@ -74,3 +86,3 @@ }); | ||
var multipart_params = ['file']; // this is required to mark file as a multipart upload item' | ||
sailthru.apiPost('job', data, function(response, err) { | ||
sailthru.apiPost('job', data, function(err, response) { | ||
console.log(response); | ||
@@ -85,4 +97,4 @@ }, multipart_params); | ||
var send_id = 'TE8EZ3-LmosnAgAA'; | ||
sailthru.apiGet('send', {send_id: send_id}, function(response, err) { | ||
console.log(response); | ||
sailthru.apiGet('send', {send_id: send_id}, function(err, response) { | ||
console.log(response); | ||
}); | ||
@@ -95,3 +107,3 @@ ``` | ||
var send_id = 'TE8EZ3-LmosnAgAA'; | ||
sailthru.apiDelete('send', {send_id: send_id}, function(response, err) { | ||
sailthru.apiDelete('send', {send_id: send_id}, function(err, response) { | ||
console.log(response); | ||
@@ -117,3 +129,3 @@ }); | ||
}; | ||
sailthru.send(template, email, function(response, err) { | ||
sailthru.send(template, email, function(err, response) { | ||
if (err) { | ||
@@ -136,3 +148,3 @@ console.log("Status Code: " + err.statusCode); | ||
}; | ||
sailthru.multiSend(template, emails, function(response, err) { | ||
sailthru.multiSend(template, emails, function(err, response) { | ||
if (err) { | ||
@@ -144,2 +156,2 @@ //Process error | ||
}, options); | ||
``` | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
149
29334
10
0