Neetochat JavaScript API
JavaScript API is an easy yet powerful way to integrate your website or application with the Neetochat platform. It exposes certain methods to a global object: Neetochat
. Developers can use them to control the Neetochat widget programmatically.
For instance, if you need to hide or show the Neetochat window within your application via a button or link, you can do the following:
- Login using your admin account.
- Go to
Chat -> Customize -> Options
. - By selecting the Enable hidden mode option you can make sure that Neetochat will not be shown on your website.
- You can open Neetochat via JavaScript code using the
Neetochat.contextualHelp.openWidget()
API. - You can again hide it via JavaScript code using the
Neetochat.contextualHelp.closeWidget()
API.
The following methods are exposed via the global object: Neetochat
.
openWidget/showWidget
Call this method to load the Neetochat.
Neetochat.contextualHelp.openWidget()
closeWidget/hideWidget
Call this method to close or hide the Neetochat.
Neetochat.contextualHelp.closeWidget()
maximizeWidget
Call this method to maximize the Neetochat.
Neetochat.contextualHelp.maximizeWidget()
minimizeWidget
Call this method to minimize the Neetochat.
Neetochat.contextualHelp.minimizeWidget()
isWidgetOpened/isWidgetShown
Call this method to check whether the Neetochat is opened or not. This method call returns a boolean.
Neetochat.contextualHelp.isWidgetOpened()
isWidgetMaximized
Call this method to check whether the Neetochat is maximized or not. This method call returns a boolean.
Neetochat.contextualHelp.isWidgetMaximized()