From 32637856959876e8be1c44184a56cf00712bdfae Mon Sep 17 00:00:00 2001 From: Calvert Yang Date: Mon, 4 Nov 2013 15:28:26 +0800 Subject: [PATCH] Fix credentials typo --- CHANGELOG.md | 4 ++++ lib/nexmo.js | 12 ++++++------ package.json | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d7816..6b68934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog +#### 1.0.1 +_2013-11-04_ + * Fix credentials typo + #### 1.0.0 _2013-11-03_ * Created initial version \ No newline at end of file diff --git a/lib/nexmo.js b/lib/nexmo.js index b9279aa..f3a02c3 100644 --- a/lib/nexmo.js +++ b/lib/nexmo.js @@ -28,8 +28,8 @@ var headers = { }; var initialized = false; var credentials = { - apiKey: '', - apiSecret: '' + api_key: '', + api_secret: '' }; var useHttps = false; var debugMode = false; @@ -62,7 +62,7 @@ module.exports = { /** * @constant */ - VERSION: '1.0.0', + VERSION: '1.0.1', /** * Initialize settings, protocol and debug are optional @@ -71,8 +71,8 @@ module.exports = { if (!key || !secret) { throw ERROR_MESSAGES.keyAndSecretRequired; } - credentials.apiKey = key; - credentials.apiSecret = secret; + credentials.api_key = key; + credentials.api_secret = secret; smsEndpoint += querystring.stringify(credentials); useHttps = protocol && protocol == 'https'; // default to http debugMode = debug; @@ -481,7 +481,7 @@ function sendRequest(path, method, callback) { * Get api endpoint path */ function getPath(action) { - return action + credentials.apiKey + '/' + credentials.apiSecret; + return action + credentials.api_key + '/' + credentials.api_secret; } /** diff --git a/package.json b/package.json index 131d5eb..f3e74ec 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "simple-nexmo", "author": "Calvert Yang ", - "version": "1.0.0", + "version": "1.0.1", "description": "A nodejs wrapper for nexmo API to send SMS", "contributors": [ "Calvert Yang "