Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mailgun-js

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun-js - npm Package Compare versions

Comparing version 0.7.11 to 0.7.12

book.json

46

lib/schema.js
module.exports = {
"definitions": {
"message": {
"description": "This API allows you to send, access, and delete mesages programmatically.",
"links": [

@@ -151,2 +152,45 @@ {

},
"complaints": {
"description": "This API allows you to programmatically download the list of users who have complained, add a complaint, or delete a complaint.",
"links": [
{
"description": "Fetches the list of complaints.",
"href": "/complaints",
"method": "GET",
"title": "list",
"properties": {
"limit": {
"type": "number"
},
"skip": {
"type": "number"
}
}
},
{
"description": "Adds an address to the complaints table.",
"href": "/complaints",
"method": "POST",
"title": "create",
"properties": {
"address": {
"type": "string"
}
},
"required": ["address"]
},
{
"description": "Fetches a single spam complaint by a given email address.",
"href": "/complaints/{address}",
"method": "GET",
"title": "info"
},
{
"description": "Removes a given spam complaint.",
"href": "/complaints/{address}",
"method": "DELETE",
"title": "delete",
}
]
},
"unsubscribes": {

@@ -603,2 +647,2 @@ "description": "This API allows you to programmatically download the list of recipients who have unsubscribed from your emails. You can also programmatically “clear” the unsubscribe event.",

}
};
};

16

package.json

@@ -8,3 +8,3 @@ {

],
"version": "0.7.11",
"version": "0.7.12",
"homepage": "https://github.com/bojand/mailgun-js",

@@ -24,5 +24,5 @@ "license": "MIT",

"dependencies": {
"async": "~1.5.0",
"async": "~2.0.1",
"form-data": "~1.0.0-rc3",
"inflection": "~1.7.2",
"inflection": "~1.10.0",
"path-proxy": "~1.0.0",

@@ -40,8 +40,14 @@ "proxy-agent": "~2.0.0",

"mailcomposer": "~2.1.0",
"mocha": "~2.3.4",
"mocha": "~3.0.2",
"request": "^2.67.0"
},
"scripts": {
"test": "mocha"
"test": "mocha",
"docs:api": "./bin/docs",
"docs:clean": "rm -rf _book",
"docs:prepare": "gitbook install",
"docs:build": "npm run docs:api && npm run docs:prepare && npm run docs:clean && gitbook build",
"docs:watch": "npm run docs:api && npm run docs:prepare && gitbook serve",
"docs:publish": "npm run docs:build && cd _book && git init && git commit --allow-empty -m 'Update docs' && git checkout -b gh-pages && git add . && git commit -am 'Update docs' && git push https://github.com/bojand/mailgun-js.git gh-pages --force"
}
}

@@ -59,3 +59,6 @@ {

"newName": "my_new_campaign_name"
},
"complaints": {
"address": "testcomplaint@faketest.com"
}
}
}

@@ -963,6 +963,6 @@ var auth = require('./auth.json');

assert.ok(body);
assert.ok(body.message);
/*assert.ok(body.message);
assert.ok(body.campaign);
assert.equal(fixture.campaign.name, body.campaign.name);
assert.equal(fixture.campaign.id, body.campaign.id);
assert.equal(fixture.campaign.id, body.campaign.id);*/
done();

@@ -1252,3 +1252,49 @@ });

});
}
},
//
// Complaints
//
'test complaints().create() missing address': function (done) {
mailgun.complaints().create({}, function (err, body) {
assert.ok(err);
assert(/Missing parameter 'address'/.test(err.message));
done();
});
},
'test complaints().create()': function (done) {
mailgun.complaints().create({
address: fixture.complaints.address
}, function (err, body) {
assert.ifError(err);
assert.ok(body.message);
done();
});
},
'test complaints().list()': function (done) {
mailgun.complaints().list(function (err, body) {
assert.ifError(err);
assert.ok(body.items);
done();
});
},
'test complaints().info()': function (done) {
mailgun.complaints(fixture.complaints.address).info(function (err, body) {
assert.ifError(err);
assert.ok(body);
done();
});
},
'test complaints().delete()': function (done) {
mailgun.complaints(fixture.complaints.address).delete(function (err, body) {
assert.ifError(err);
assert.ok(body.message);
done();
});
},
};
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