id (EntryIdType): The ID of the poll for which you want to retrieve information.
orderOptionsBy (OrderBy, optional): The order in which to retrieve poll options. Default is OrderBy.Asc (ascending).
Returns:
A Promise resolving to the poll object (PollWithOptions) containing details about the specified poll.
Example:
constpollIdToRetrieve=1;try{constretrievedPoll=awaitpollz.polls.get(pollIdToRetrieve);console.log('Retrieved Poll:',retrievedPoll);}catch (error) {console.error('Failed to retrieve poll:',error.message);}
The get method allows you to retrieve detailed information about a specific poll by providing its unique ID (id). You can also specify the order in which the poll options should be retrieved using the optional parameter orderOptionsBy.
The method returns a Promise resolving to the poll object (PollWithOptions), which includes information such as the poll ID, name, creation date, associated poll type, options, total votes, and more.
Note: Ensure that the provided id corresponds to an existing poll in the system.