User:Barbontempo/Sandbox/API:ClearHasMsg


API documentation edit


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]

Example edit


GET Request edit

Description of script


Response edit

{
    "batchcomplete":""
}

Sample code edit

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 errors edit

Code Info

Parameter history edit

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

Additional notes edit

See also edit

  • Add link to documentation of related modules