MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=pollny
(main | pollny)
- This module requires read rights.
- Source: PollNY
- License: GPL-2.0-or-later
PollNY API - includes both user and admin functions.
Specific parameters:
Other general parameters are available.
- what
What to do?
- This parameter is required.
- choiceID
Same as clicking the <choiceID>th choice via the GUI; only used when what=vote.
- Type: integer
- pollID
Poll ID of the poll that is being deleted/updated/voted for.
- Type: integer
- pageID
Page ID (only used when what=getPollResults).
- Type: integer
- status
New status of the poll (when what=updateStatus); possible values are 0 (=closed), 1 and 2 (=flagged).
- Type: integer
Examples:
- Deletes the poll #66
- api.php?action=pollny&what=delete&pollID=66 [open in sandbox]
- Gets the results of the poll #666
- api.php?action=pollny&what=getPollResults&pollID=666 [open in sandbox]
- Gets a random poll to which the current user hasn't answered yet
- api.php?action=pollny&what=getRandom [open in sandbox]
- Sets the status of the poll #47 to 1 (=open); possible status values are 0 (=closed), 1 and 2 (=flagged)
- api.php?action=pollny&what=updateStatus&pollID=47&status=1 [open in sandbox]
- Votes (answers) the poll #33 with the 4th choice
- api.php?action=pollny&what=vote&pollID=33&choiceID=4 [open in sandbox]