https://github.com/fantasywind/hinet_sms
Hinet telecom from Taiwan, sms api module.
https://github.com/fantasywind/hinet_sms
Last synced: about 1 year ago
JSON representation
Hinet telecom from Taiwan, sms api module.
- Host: GitHub
- URL: https://github.com/fantasywind/hinet_sms
- Owner: fantasywind
- License: mit
- Created: 2015-03-11T16:42:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-12T08:22:49.000Z (over 11 years ago)
- Last Synced: 2025-03-05T06:56:20.138Z (over 1 year ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hinet_SMS
Hinet telecom from Taiwan, sms api module.
## Install
npm install hinet_sms
## Example
```
var sms = new SMS({
account: 'HN_NUMBERS',
password: 'SMS_PASSWORD'
});
sms.on('logined', function () {
sms.send('0912333333', 'Test Message');
});
sms.connect(function () {
sms.auth();
});
```
## Methods
The module defines the following functions:
### connect(callback)
Connect socket
### auth()
Get auth to CHT Server
### send(targetNumber, message)
Send a message to target number immediately.
## Events
* logined: when auth successful
* login_failed: auth failed
* sent: the message sent