From 6324d08dfb0877eb422c1a87c6ef4ff23d115fb7 Mon Sep 17 00:00:00 2001
From: starshine
Date: Thu, 18 Nov 2021 13:35:20 +0800
Subject: [PATCH 1/2] feat: apply new api.e8d.tw url
---
index.js | 4 ++--
package-lock.json | 14 +++++++-------
package.json | 2 +-
test.js | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/index.js b/index.js
index 6556f49..7c1a5de 100644
--- a/index.js
+++ b/index.js
@@ -11,7 +11,7 @@ const rp = require('request-promise');
* @returns {object} credit,sended numbers,cost,unsend numbers,batch id,error
*/
exports.send = async function(uid, password, subject, msg, dest, time) {
- const url = 'https://oms.every8d.com/API21/HTTP/sendSMS.ashx';
+ const url = 'https://api.e8d.tw/API21/HTTP/sendSMS.ashx';
try {
const result = await rp({
uri: url,
@@ -53,7 +53,7 @@ exports.send = async function(uid, password, subject, msg, dest, time) {
* @returns {object} credit,error
*/
exports.getCredit = async function(uid, password) {
- const url = 'https://oms.every8d.com/API21/HTTP/getCredit.ashx';
+ const url = 'https://api.e8d.tw/API21/HTTP/getCredit.ashx';
try {
const result = await rp({
uri: url,
diff --git a/package-lock.json b/package-lock.json
index 0184bac..cd677e9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "every8d-sms",
- "version": "0.0.7",
+ "version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -631,9 +631,9 @@
},
"dependencies": {
"ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"ansi-styles": {
@@ -2364,9 +2364,9 @@
}
},
"ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"emoji-regex": {
diff --git a/package.json b/package.json
index 9928739..978084b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "every8d-sms",
- "version": "0.0.9",
+ "version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
diff --git a/test.js b/test.js
index 6172553..b1d6a73 100644
--- a/test.js
+++ b/test.js
@@ -13,7 +13,7 @@ describe('send sms', function() {
it('wrong password', async function() {
const result = await send(uid, '1234', '', '', '', '');
- expect(result.error).to.equal('return format error: -101, 密碼錯誤。');
+ expect(result.error).to.equal('return format error: -100, 帳號或密碼錯誤(Hl2)!');
});
it('complete message', async function() {
@@ -30,7 +30,7 @@ describe('get credit', function() {
it('wrong password', async function() {
const result = await getCredit(uid, '1234');
- expect(result.error).to.equal('return format error: -101, 密碼錯誤。');
+ expect(result.error).to.equal('return format error: -100, 帳號或密碼錯誤(Hl2)!');
});
it('complete message', async function() {
From af9e723ee93beef97480c4d82b73a27d4ed4a9af Mon Sep 17 00:00:00 2001
From: starshine
Date: Thu, 18 Nov 2021 13:36:04 +0800
Subject: [PATCH 2/2] chore: update docs url
---
README.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/README.md b/README.md
index e588e8b..2ccb080 100644
--- a/README.md
+++ b/README.md
@@ -17,5 +17,4 @@ console.log(result2);
# Reference:
-https://tw.every8d.com/E8DPortal/InformationDownload.aspx
-
+https://www.teamplus.tech/product/every8d-download/