dynectemail
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -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 |
@@ -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"); |
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
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
18921
15
495
56