From 9b079be6987ae662e858d4e1431d01cd913538ab Mon Sep 17 00:00:00 2001 From: Igor Tkach <itkach@aarddict.org> Date: Sat, 14 Mar 2015 19:17:50 -0400 Subject: [PATCH] Add 'toponly' parameter for recentchanges. When rctoponly is set only changes which are the latest revision are listed. --- mwclient/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mwclient/client.py b/mwclient/client.py index 18485f7..2b58cca 100644 --- a/mwclient/client.py +++ b/mwclient/client.py @@ -689,10 +689,11 @@ class Site(object): return listing.List(self, 'random', 'rn', limit=limit, **kwargs) def recentchanges(self, start=None, end=None, dir='older', namespace=None, - prop=None, show=None, limit=None, type=None): + prop=None, show=None, limit=None, type=None, toponly=None): kwargs = dict(listing.List.generate_kwargs('rc', start=start, end=end, dir=dir, - namespace=namespace, prop=prop, show=show, type=type)) + namespace=namespace, prop=prop, show=show, type=type, + toponly='1' if toponly else None)) return listing.List(self, 'recentchanges', 'rc', limit=limit, **kwargs) def search(self, search, namespace='0', what='title', redirects=False, limit=None): -- GitLab