Hi,
neither checkuser nor checkuserlog of checkuser extension is well documented and there are no generators implemented yet. You have to setup your own generator e.g. useing api.ListGenerator [2] e.g.
gen = api.ListGenerator(listaction='checkuserlog', total=25, site=pywikibot.Site(), culuser='WikiSysop', cultarget=None, culfrom=None)
cul parameters with None can be omitted. Another way it to use APISite._generator but note that this is a hidden method and may be dropped:
site = pywikibot.Site()
gen = site._generator(api.ListGenerator, type_arg='checkuserlog', total=25, culuser='WikiSysop', cultarget=None, culfrom=None)Maybe this APISite method should become a public method.
To implement direct APISite methods like APISite.checkuserlog() file a phab task for it.
Best
xqt
[1] https://www.mediawiki.org/wiki/Extension:CheckUser#CheckUser_and_CheckUserLog_API
[2] https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.data.html#data.api.ListGenerator
Roy Smith <
roy@panix.com> ezt írta (időpont: 2023. febr. 23., Cs, 20:09):
It's based on mwclient instead of pywikibot, but I do have some code that uses the checkuserlog API.
Thank you! I don't know mwclient and hate dealing with login, but I will have a look.