User:Barbontempo/Sandbox/API:ClearHasMsg/en

API documentationEdit


action=clearhasmsg

(main | clearhasmsg)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Clears the hasmsg flag for the current user.

Example:
Clear the hasmsg flag for the current user.
api.php?action=clearhasmsg [open in sandbox]

ExampleEdit


GET RequestEdit

Description of script

ResponseEdit

{
    "batchcomplete":""
}

Sample codeEdit

hello.py

#!/usr/bin/python3

"""
    hello.py

    MediaWiki Action API Code Samples
    Demo of `...` module
    MIT license
"""

import requests

S = requests.Session()

URL = "https://en.wikipedia.org/w/api.php"

PARAMS = {
    'action':"query",
    'format':"json"
}

R = S.get(url=URL, params=PARAMS)
DATA = R.json()

print(DATA)

Demo app(s)Edit

  • Add a link to the demo app. Embed an image of the demo if applicable

Possible errorsEdit

Code Info

Parameter historyEdit

  • v1.x: Introduced parameter_1, parameter_2
  • v0.x: Deprecated parameter_3

Additional notesEdit

See alsoEdit

  • Add link to documentation of related modules