addComment({ text:'<Your text comment>', customData:'<Your custom data to send with reply comment>', commentBoardId:'<Your comment board Id>' }).then(comment=>console.log(comment));
createAlertWidget({ programId:"<program id>", title:"<alert title>", text:"<alert text>", imageUrl:"<your image url>", linkUrl:"<link url to include on alert widget>", linkLabel:"<link label to show on alert widget>", }).then(alertWidget=>console.log(alertWidget))
editComment({ commentBoardId:"<comment-board-id>", commentId:"<comment-id>", text:'<Your text comment>', customData:'<Your custom data to send with reply comment>', }).then(comment=>console.log(comment))
Get a list of comment board bans in the Application. Each comment board
ban resource represents restrictive access to comment board for a given user profile.
Get list of chatroom memberships for current profile,
if profileIds are passed, it returns memberships corresponding to common chatroom(s) among all given profileIds.
Get targeted widget Id and widget kind from a given widget details
Targeted widget Id and kind could be different in the case of follow up widget.
This API could be used to get targeted widget id and kind when fetching
widget interaction or widget reward transactions
Publish a widget based on publish delay duration that would schedule a widget
to be published after a given duration.
When no publish duration is passed, widget would be instantly published.
async
since
0.1.0
example
publishWidget({ widgetId:"<widget question>", widgetKind:WidgetKind.TEXT_POLL, delayDuration:"P0DT00H05M00S"// publish widget after 5 mins }).then(res=>console.log(res))
Remove registered listenerFn for the given ChatRoomEvent, pass options based on the events
when no listener passed, all registered event listener will be removed
since
0.1.0
example
// for removing Invite new member event listener removeChatRoomEventListener(ChatRoomEvent.INVITE_NEW_MEMBER, onReceieveChatRoomInvitationListener); // for removing pin message event listener removeChatRoomEventListener( ChatRoomEvent.PIN_MESSAGE, onReceivedPinMessageListener, { roomId:"695ea6f4-fe7b-47cc-817c-2d73fdba264a" } );
Remove listener for a given event type occuring in a reactionSpaceId
if no listener function passed, remove all the listeners function for a given event type
Unblock profile using Block Info id for a given blocked profile, use getProfileBlockInfo or getBlockInfoList to get corresponding profile block info id
Upload a image to get image url for sending image message
since
0.1.0
async
example
// For Web usage // get the image blob data from image uri, uri could be local file uri constimageBlob = awaitfetch(imageUri).then(res=>res.blob()) // create formdata and append "type" and "image" keys constimageFormData = newFormData(); imageFormData.append('type', 'file') imageFormData.append('image', imageBlob)
Use SINGLE_INTERACTION_WIDGET_KINDS const instead