Get Poll Result
With the "Get Poll Result" method, you can retrieve the poll results in real-time and display in your application. You can integrate the above by following the given steps.
Steps to Get Poll Result
- To get poll results, use the
getPollUsers()
method provided by the client. - Pass in the required parameter.
- Process the response as per your requirement.
const payload = {
conversationId: 12122, // Conversation Id
pollId: 40212, // Poll Id
};
const response = await lmChatClient.getPollUsers(payload);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}
Get Poll Result Payload
Variable | Type | Description | Optional |
---|---|---|---|
conversationId | number | Conversation Id | |
pollId | number | Poll Id |
Get Poll Result Response
Variable | Type | Description | Optional |
---|---|---|---|
success | boolean | Indicates the success status of the response | |
error_message | string | Error message in case of failure | ✔️ |
data | object | Data object containing the list of members | ✔️ |