Beamable SDK
Public Member Functions | Properties | List of all members
Beamable.Experimental.Api.Chat.ChatService Class Reference

This type defines the Client main entry point for the Chat feature. More...

Inheritance diagram for Beamable.Experimental.Api.Chat.ChatService:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Experimental.Api.Chat.ChatService:
Collaboration graph
[legend]

Public Member Functions

 ChatService (IPlatformService platform, IBeamableRequester requester, IDependencyProvider provider)
 
Promise< MessageSendMessage (string roomId, string message)
 Send a message to chat room. More...
 
Promise< List< RoomInfo > > GetMyRooms ()
 Get the current player's set of RoomInfo. The player can create a new room using the CreateRoom method. More...
 
Promise< RoomInfoCreateRoom (string roomName, bool keepSubscribed, List< long > players)
 Creates a new private chat room for the current player, and a set of other players. More...
 
Promise< EmptyResponseLeaveRoom (string roomId)
 Remove the current player from a room More...
 
Promise< EmptyResponseProfanityAssert (string text)
 Check to see if a piece of text would trigger the Beamable profanity filter. More...
 

Properties

ChatSubscription Subscribable [get]
 
- Properties inherited from Beamable.Api.IHasPlatformSubscriber< ChatSubscription, GetMyRoomsResponse, ChatView >
TPlatformSubscriber Subscribable [get]
 Allows scopes to consume fresh data when available.
 

Detailed Description

This type defines the Client main entry point for the Chat feature.

Related Links

img beamable-logo

Member Function Documentation

◆ CreateRoom()

Promise< RoomInfo > Beamable.Experimental.Api.Chat.ChatService.CreateRoom ( string  roomName,
bool  keepSubscribed,
List< long >  players 
)
inline

Creates a new private chat room for the current player, and a set of other players.

Parameters
roomNameA name for the room
keepSubscribedWhen true, the current player will receive messages for the room.
playersA list of gamertags of other players who will be included in the chat room.
Returns
A Promise containing the newly created RoomInfo

◆ GetMyRooms()

Promise< List< RoomInfo > > Beamable.Experimental.Api.Chat.ChatService.GetMyRooms ( )
inline

Get the current player's set of RoomInfo. The player can create a new room using the CreateRoom method.

Returns
A Promise containing the player's RoomInfo

◆ LeaveRoom()

Promise< EmptyResponse > Beamable.Experimental.Api.Chat.ChatService.LeaveRoom ( string  roomId)
inline

Remove the current player from a room

Parameters
roomIdThe room id to leave
Returns
A Promise representing the network call.

◆ ProfanityAssert()

Promise< EmptyResponse > Beamable.Experimental.Api.Chat.ChatService.ProfanityAssert ( string  text)
inline

Check to see if a piece of text would trigger the Beamable profanity filter.

Parameters
textsome text
Returns
A Promise representing the network call. If the text contains profanity, the promise will fail with a PlatformRequesterException with an error of "ProfanityFilter" and a status of 400.

◆ SendMessage()

Promise< Message > Beamable.Experimental.Api.Chat.ChatService.SendMessage ( string  roomId,
string  message 
)
inline

Send a message to chat room.

Parameters
roomIdThe room id
messageThe message to send to the room
Returns
A Promise containing the sent Message

The documentation for this class was generated from the following file: