Chat Rooms
Create chat room
This method creates a new chat room with the ability to pass in two optional arguments, title and visibility. Default visibility for the chatroom is members. It returns a Promise that resolves the chat room object.
import { createChatRoom } from '@livelike/javascript'
const chatroom = await createChatRoom({title: "myTitle", visibility: "everyone"})
Get chat room
Returns the chatRoom object using the roomId passed in the arguments. It returns a Promise that resolves the chatRoom object containing roomId and title.
import { getChatRoom } from '@livelike/javascript'
const chatroom = await getChatRoom({roomId: "<Chat Room ID>"})
Get available chat rooms
Returns all available chat rooms in an application as a paginated response with results as an array of chat room details.
import { getChatRooms } from '@livelike/javascript'
const chatrooms = await getChatRooms()
.then(paginatedResponse => paginatedResponse.results)
Updated 4 months ago