@aronative/nextchat
package manager
1,390
| Install | |
|---|---|
npm install @aronative/nextchat |
|
| Latest Version: | 0.1.10 |
| Vue: | 2 |
| Last Updated: | May 16, 2021 |
| Links: | npm |
Maintainer: rasulalizadeh
NexChat Pusher Library
Installation
package manager
npm install next-pusher
or include in html
<script src="https://nexchat.ir/apps/NextPusher.umd.min.js?token=$API_KEY"></script>
Usage
Connect to websocket server
Provide <API_KEY> only if api key is not provided in include script tag.
const nextPusher = new NextPusher(/*<API_KEY: Optional>*/)
nextPusher.connect()
Connect to public broadcast channel for everyone
nextPusher.listenBroadcast(res => {
console.log('message > ' + res.message)
})
Connect ro private broadcast channel for all users
nextPusher.listenWhisper(res => {
console.log('message > ' + res.message)
})
Connect to Public room with identification id
Replace ROOM_ID with your room id
nextPusher.listenRoom(ROOM_ID, res => {
console.log('message > ' + res.message)
})
Private channel with identification id
Replace CHANNEL_ID with your channel id
nextPusher.listenChannel(CHANNEL_ID, res => {
console.log('message > ' + res.message)
})
Disconnect from Server
nextPusher.disconnect()
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.10 | ^2.6.12 | ||
| 0.1.9 | ^2.6.12 | ||
| 0.1.8 | |||
| 0.1.7 | |||
| 0.1.6 | |||
| 0.1.5 | |||
| 0.1.4 | |||
| 0.1.3 | |||
| 0.1.2 | |||
| 0.1.1 |
Pre-releases (13)
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.8-3 | ^2.6.12 | ||
| 0.1.8-2 | |||
| 0.1.8-1 | |||
| 0.1.7-0 | |||
| 0.1.5-9 | |||
| 0.1.5-8 | |||
| 0.1.5-7 | |||
| 0.1.5-6 | |||
| 0.1.5-5 | |||
| 0.1.5-4 | |||
| 0.1.5-3 | |||
| 0.1.5-2 | |||
| 0.1.5-1 |