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

dynectemail

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynectemail - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

tests/dynectemail-request-secure-test.js

7

example/index.js

@@ -7,3 +7,8 @@ var DynectEmailNode = require('./../lib/dynectemail/index').DynectEmailNode;

var dynectemail = new DynectEmailNode({
apikey: 'apikey'
apikey: 'apikey',
//useragent: 'my-app' // Change the user agent. Default is 'dynectemail-node'
//secure: true, // True will use port 443 instead of 80
//format: 'xml', // Possible formats: 'json', 'xml', 'html'. Default is json
// Please note if you change the format from json the example below wont work.
// 'data' will no longer be an object it will be a string.
});

@@ -10,0 +15,0 @@

# Changelog
## 0.0.4
* Added ssl support
* Fixed the format call so you can request it in something other than json
## 0.0.3

@@ -14,2 +19,2 @@

* The Dynect Email Node Wrapper is born
* The Dynect Email Node Wrapper is born

4

lib/dynectemail/dynectemail-request.js

@@ -46,4 +46,4 @@ if (global.GENTLY_HIJACK) require = GENTLY_HIJACK.hijack(require);

url = dynectemail.url + '/' + dynectemail.format + '/' + method,
port = 80,
connection = http.createClient(port, dynectemail.host),
port = dynectemail.secure ? 443 : 80,
connection = http.createClient(port, dynectemail.host, dynectemail.secure),
requestParams = buildRequestParams(params),

@@ -50,0 +50,0 @@ data = querystring.stringify(requestParams);

@@ -7,3 +7,4 @@ var DynectEmailRequest = require("./dynectemail-request");

this.host = "emailapi.dynect.net";
this.format = "json";
this.secure = options.secure || false;
this.format = options.format || "json";
this.apikey = options.apikey;

@@ -15,2 +16,2 @@ this.useragent = options.useragent || 'dynectemail-node';

return new DynectEmailRequest(this, method, params);
};
};
{
"name": "dynectemail",
"description": "Read and write to DynECT Email REST API",
"version": "0.0.3",
"version": "0.0.4",
"author": "John Norton <jnorton@dyn.com>",

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

@@ -14,4 +14,6 @@ # dynectemail-node

var dynectemail = new DynectEmailNode({
apikey: 'apikey' //you can get this from the Integration page http://email.dynect.net/index.php?Page=Integration
useragent: 'appname/vX.X MyApp' // optional. defaults to dynectemail-node.
apikey: 'apikey', // Required. You can get this from the Integration page http://email.dynect.net/index.php?Page=Integration
useragent: 'appname/vX.X MyApp', // Optional. Defaults to 'dynectemail-node'.
format: 'json', // Optional. Defaults to 'json'. (json, xml, html)
secure: true // Optional. Defaults to false. Will force ssl(port 443) if true.
});

@@ -18,0 +20,0 @@

require("./dynectemail-node-test.js");
require("./dynectemail-request-test.js");
require("./dynectemail-request-secure-test.js");
require("./dynectemail-base-test.js");
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