Skip to content

Commit

Permalink
Update API Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jao-tawk committed Nov 9, 2023
1 parent 5123fe1 commit 051b4da
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Use the JavaScript API to manipulate the chat widget displayed on your website.
- [onTagsUpdated](#ontagsupdated)
- [onUnreadCountChanged](#onunreadcountchanged)
- [visitor](#visitor)
- [autoStart](#autostart)
- [start](#start)
- [shutdown](#shutdown)
- [maximize](#maximize)
- [minimize](#minimize)
- [toggle](#toggle)
Expand Down Expand Up @@ -457,6 +460,57 @@ this.tawkMessenger.visitor({

<br/>

## autoStart
If set to true, it will auto-start the Tawk socket connection for chat services. If set to false,
you will need to manually call the start API. It will not register and connect to the dashboard
if this is set to false.

```js
module.exports = function (environment) {
let ENV = {
...
tawkMessenger : {
autoStart : false
}
...
}
};
```

<br/>

## start
Start the tawk socket connection.

```js
this.tawkMessenger.start();

// Example

@action
handleOnLoad() {
this.tawkMessenger.start();
}
```

<br/>

## shutdown
End the tawk socket connection.

```js
this.tawkMessenger.shutdown();

// Example

@action
handleOnLoad() {
this.tawkMessenger.shutdown();
}
```

<br/>

## maximize
Maximizes the chat widget.

Expand Down

0 comments on commit 051b4da

Please sign in to comment.