Revision: 8172
Author:   russblau
Date:     2010-05-14 19:19:16 +0000 (Fri, 14 May 2010)

Log Message:
-----------
Page.watch() method.

Modified Paths:
--------------
    branches/rewrite/pywikibot/page.py

Modified: branches/rewrite/pywikibot/page.py
===================================================================
--- branches/rewrite/pywikibot/page.py  2010-05-14 19:11:51 UTC (rev 8171)
+++ branches/rewrite/pywikibot/page.py  2010-05-14 19:19:16 UTC (rev 8172)
@@ -780,6 +780,15 @@
                         minorEdit=minorEdit, force=force, async=True,
                         callback=callback)
 
+    def watch(self, unwatch=False):
+        """Add or remove this page to/from bot account's watchlist.
+
+        @param unwatch: True to unwatch, False (default) to watch.
+        @return: True if successful, False otherwise.
+
+        """
+        return self.site().watchpage(self, unwatch)
+
     def linkedPages(self, namespaces=None, step=None, total=None):
         """Iterate Pages that this Page links to.
 



_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn

Reply via email to