Nápověda k MediaWiki API
Toto je automaticky generovaná dokumentační stránka k MediaWiki API.
Dokumentace a příklady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=voteny
(main | voteny)
- Tento modul vyžaduje oprávnění ke čtení.
- Tento modul vyžaduje oprávnění k zápisu.
- Tento modul přijímá pouze požadavky POST.
- Zdroj: VoteNY
- Licence: GPL-2.0-or-later
VoteNY API modul
Parametry:
- what
Action to take; valid values are 'vote' (green voting box), 'multi' (voting stars) or 'delete' (delete a previously given vote)
- This parameter is required.
- pageId
Page ID of the page where the voting box/stars is/are
- This parameter is required.
- Type: integer
- voteValue
Numerický hlas v rozmezí 1 a 5
- Type: integer
- type
Set this to 'stars' to call the voting stars (VoteStars PHP class), otherwise the green vote box (Vote PHP class) is used
- token
Token typu „csrf“ získaný pomocí action=query&meta=tokens.
- This parameter is required.
Příklady:
- Cast a vote for the page which has the ID number 666
- api.php?action=voteny&what=vote&pageId=666 [otevřít v pískovišti]
- Delete your vote from the page which has the ID number 666
- api.php?action=voteny&what=delete&pageId=666 [otevřít v pískovišti]
- Cast a vote (3 stars out of 5) for the page which has the ID number 666
- api.php?action=voteny&what=vote&type=stars&pageId=666&voteValue=3 [otevřít v pískovišti]
- Delete your vote from the page which has the ID number 666 which is using the star rating
- api.php?action=voteny&what=delete&type=stars&pageId=666 [otevřít v pískovišti]
- Cast a vote (4 stars out of 5) for the page which has the ID number 666, deleting your previous vote, if any
- api.php?action=voteny&what=multi&type=stars&pageId=666&voteValue=4 [otevřít v pískovišti]