MediaWiki-API-Hilfe

Dies ist eine automatisch generierte MediaWiki-API-Dokumentationsseite.

Dokumentation und Beispiele: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=voteny

(main | voteny)
  • Dieses Modul erfordert Leserechte.
  • Dieses Modul erfordert Schreibrechte.
  • Dieses Modul akzeptiert nur POST-Anfragen.
  • Quelle: VoteNY
  • Lizenz: GPL-2.0-or-later

VoteNY-API-Modul

Parameter:
what

Action to take; valid values are 'vote' (green voting box), 'multi' (voting stars) or 'delete' (delete a previously given vote)

Dieser Parameter ist erforderlich.
pageId

Page ID of the page where the voting box/stars is/are

Dieser Parameter ist erforderlich.
Typ: Ganzzahl
voteValue

Numerischer Abstimmungswert zwischen 1 und 5

Typ: Ganzzahl
type

Set this to 'stars' to call the voting stars (VoteStars PHP class), otherwise the green vote box (Vote PHP class) is used

token

Ein „csrf“-Token abgerufen von action=query&meta=tokens

Dieser Parameter ist erforderlich.
Beispiele:
Cast a vote for the page which has the ID number 666
api.php?action=voteny&what=vote&pageId=666 [in Spielwiese öffnen]
Löscht deine Stimme von der Seite, die die Kennung 666 hat.
api.php?action=voteny&what=delete&pageId=666 [in Spielwiese öffnen]
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 [in Spielwiese öffnen]
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 [in Spielwiese öffnen]
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 [in Spielwiese öffnen]