Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Commit

Permalink
Fix credentials typo
Browse files Browse the repository at this point in the history
  • Loading branch information
calvertyang committed Nov 4, 2013
1 parent d06e308 commit 3263785
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

#### 1.0.1
_2013-11-04_
* Fix credentials typo

#### 1.0.0
_2013-11-03_
* Created initial version
12 changes: 6 additions & 6 deletions lib/nexmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ var headers = {
};
var initialized = false;
var credentials = {
apiKey: '',
apiSecret: ''
api_key: '',
api_secret: ''
};
var useHttps = false;
var debugMode = false;
Expand Down Expand Up @@ -62,7 +62,7 @@ module.exports = {
/**
* @constant
*/
VERSION: '1.0.0',
VERSION: '1.0.1',

/**
* Initialize settings, protocol and debug are optional
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "simple-nexmo",
"author": "Calvert Yang <calvert@apputu.com>",
"version": "1.0.0",
"version": "1.0.1",
"description": "A nodejs wrapper for nexmo API to send SMS",
"contributors": [
"Calvert Yang <calvert@apputu.com>"
Expand Down

0 comments on commit 3263785

Please sign in to comment.