Skip to content

Commit

Permalink
fix readme text and npm readme bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Briuor committed Apr 8, 2020
1 parent 3a9d301 commit 8b2a2a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ wbm.start().then(async () => {

## API
### start(options)
* ##### options
* **options**<br />
Object containing optional parameters as attribute.<br />
Type: `object`<br />
* ##### showBrowser
* **showBrowser**<br />
Show browser running the script.<br />
Default: `false`<br />
Type: `boolean`<br />
* ##### qrCodeData
* **qrCodeData**<br />
Instead of generate the QR Code, returns the data used to generate the QR Code as promise.<br />
Default: `false`<br />
Type: `boolean`<br />
* ##### session
* **session**<br />
Keep user session, so the user must scan the QR Code once.<br />
Default: `true`<br />
Type: `boolean`
Expand All @@ -104,15 +104,15 @@ wbm.start({showBrowser: true, qrCodeData: true, session: false})

### send(phoneOrContacts, message)

Send same message to every phone number.
Send message to every phone number.

- ##### phoneOrContacts
- **phoneOrContacts**<br />
Array of phone numbers: ['5535988841854', ...].<br />
Or <br />
Array of contacts: [{phone: '5535988841854', name: 'Will', group: 'partner', age: 22', any: 'anything', ...}, ...]<br />
Type: `array`

- ##### message
- **message**<br />
Message to send to every phone number.<br />
Text inside curly braces like {{attribute}} will be replaced by the contact object respective attribute.<br />
Type: `string`
Expand All @@ -136,16 +136,15 @@ wbm.start().then(async () => {
### sendTo(phoneOrContact, message)

Send message to a single phone number.
*When using wbm.sendTo() make sure to use wbm.end() at the end of wbm.start().*

- ##### phoneOrContact
- **phoneOrContact**<br />
Phone number. Example '5535988841854'.<br />
Type: `string`<br />
Or
Contact object. Example: {phone: '5535988841854', name: 'Will', group: 'partner'}<br />
Type: `object`

- ##### message
- **message**<br />
Message to send to phone number.<br />
Text inside curly braces like {{attribute}} will be replaced by the contact object respective attribute.<br />
Type: `string`
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Up @@ -7,7 +7,7 @@
},
"name": "wbm",
"description": "wbm is an API to send bulk messages in whatsapp.",
"version": "1.1.8",
"version": "1.1.9",
"main": "src/index.js",
"devDependencies": {},
"repository": {
Expand Down

0 comments on commit 8b2a2a5

Please sign in to comment.