MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:https://www.mediawiki.org/wiki/API:Main_page/zh

action=voteny

main | voteny
  • 此模块需要读取权限。
  • 此模块需要写入权限。
  • 此模块只允许POST请求。
  • 来源:VoteNY
  • 许可协议:GPL-2.0-or-later

VoteNY API模块

参数:
what

要进行的操作;有效值为“vote”(绿色投票框)、“multi”(投票星标)或“delete”(删除之前投出的投票)

This parameter is required.
pageId

投票框/星标所在页面的页面ID

This parameter is required.
Type: integer
voteValue

数字投票值(1~5之间)

Type: integer
type

将此设置为“stars”来调用投票星标(投票星标PHP类),否则会使用绿色投票框(投票框PHP类)

token

action=query&meta=tokens取回的“csrf”令牌

This parameter is required.
例子:
为ID为666的页面投出一票
api.php?action=voteny&what=vote&pageId=666 [在沙盒中打开]
删除您为ID为666的页面投出的票
api.php?action=voteny&what=delete&pageId=666 [在沙盒中打开]
为ID为666的页面投出一票(5颗星中的3颗)
api.php?action=voteny&what=vote&type=stars&pageId=666&voteValue=3 [在沙盒中打开]
删除您为ID为666的页面(使用星级)投出的票
api.php?action=voteny&what=delete&type=stars&pageId=666 [在沙盒中打开]
为ID为666的页面投出一票(5颗星中的4颗),并删除您之前的投票(如果有)
api.php?action=voteny&what=multi&type=stars&pageId=666&voteValue=4 [在沙盒中打开]