Skip to content

Commit

Permalink
Merge pull request #7 from fugle-dev/new-url
Browse files Browse the repository at this point in the history
New url
  • Loading branch information
bistin authored Nov 18, 2021
2 parents 0effedb + af9e723 commit 30961bb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ console.log(result2);

# Reference:

https://tw.every8d.com/E8DPortal/InformationDownload.aspx

https://www.teamplus.tech/product/every8d-download/
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "every8d-sms",
"version": "0.0.9",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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() {
Expand Down

0 comments on commit 30961bb

Please sign in to comment.