update usage

master
iotcat 4 years ago
parent 32a3ccf699
commit 2499f8b030
  1. 4
      README.md
  2. 2
      index.js
  3. 2
      package.json
  4. 4
      test.js

@ -5,7 +5,7 @@
### Import sms module ### Import sms module
```js ```js
const sms = require('ushio-sms').sms(API_url); //substitute the API_url const sms = require('ushio-sms')(API_url); //substitute the API_url
``` ```
@ -17,4 +17,4 @@ await sms.send(Tel, Msg0, Msg1);
## License ## License
Apache-2.0 Apache-2.0

@ -21,5 +21,5 @@ var sms = (url) => {
} }
exports.sms = sms; module.exports = sms;

@ -1,6 +1,6 @@
{ {
"name": "ushio-sms", "name": "ushio-sms",
"version": "1.0.0", "version": "1.0.2",
"description": "sms for ushio", "description": "sms for ushio",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

@ -1,5 +1,5 @@
const sms = require('./index.js').sms('https://api.yimian.xyz/sms/'); const sms = require('./index.js')('https://api.yimian.xyz/sms/');
(async () => { (async () => {
console.log(await sms.send('18118155257', 'test', 'send')); console.log(await sms.send('18118155257', 'test', 'send'));
})(); })();

Loading…
Cancel
Save