Manage Poll Options
Last updated
Last updated
Before you proceed with managing poll options using the pollz-js SDK, ensure that you have already and by following the relevant guides in the "Guides" section.
You can add, delete, or rename poll options with ease using the pollz-js SDK.
In your Node.js application, ensure you have already imported the pollz-js SDK:
Use the addOption
method provided by the pollOptions
module of the SDK to add a new option to a specific poll. Provide the poll ID and the label for the new option.
Replace 'your-app-id' and 'your-app-secret' with the actual credentials obtained from the Pollz platform. Adjust the pollId
and the label for the new option according to your application's context.
Use the deleteOption
method provided by the pollOptions
module of the SDK to delete a poll option. Provide the option ID as an argument.
Use the renameOption
method provided by the pollOptions
module of the SDK to rename a poll option. Provide the option ID and the new name for the option.
Congratulations! You have successfully managed poll options by adding, deleting, and renaming them using the pollz-js SDK. Explore more SDK features and functionalities to customize your application's polling experience. Refer to the relevant guides for detailed instructions on other SDK capabilities.