From e14fcf95b8f68ca3d8df5a064ed0d6fad6c353d4 Mon Sep 17 00:00:00 2001 From: nullram Date: Tue, 2 May 2017 14:03:36 +0800 Subject: [PATCH 1/2] Update index.js semaphore new endpoint and params --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index f3543c8..a234c5c 100644 --- a/index.js +++ b/index.js @@ -18,14 +18,14 @@ function Semaphore(apikey) { Semaphore.prototype.sendsms = function sendsms(sms, callback) { var data = { - from: sms.from, + sendername: sms.from, api: this.apikey, - number: sms.to, + apikey: sms.to, message: sms.message } var options = { - url: this.endpoint + '/api/sms', + url: this.endpoint + '/api/v4/messages', method: 'POST', headers: this.headers, form: data @@ -54,7 +54,7 @@ Semaphore.prototype.bulksms = function bulksms(numbers, message, callback) { Semaphore.prototype.status = function status(callback) { var options = { - url: this.endpoint + '/api/sms/account?api=' + this.apikey, + url: this.endpoint + '/api/v4/account?apikey=' + this.apikey, method: 'GET' } From 5877adfed630b50361393e977a6c1270862db396 Mon Sep 17 00:00:00 2001 From: nullram Date: Tue, 2 May 2017 14:04:49 +0800 Subject: [PATCH 2/2] Update index.js new params --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a234c5c..3cf45b0 100644 --- a/index.js +++ b/index.js @@ -19,8 +19,8 @@ function Semaphore(apikey) { Semaphore.prototype.sendsms = function sendsms(sms, callback) { var data = { sendername: sms.from, - api: this.apikey, - apikey: sms.to, + apikey: this.apikey, + number: sms.to, message: sms.message }