http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10171
Revision: 10171
Author: xqt
Date: 2012-05-03 10:49:55 +0000 (Thu, 03 May 2012)
Log Message:
-----------
new ImagePage.getFirstUploader() method
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2012-05-03 07:49:44 UTC (rev 10170)
+++ trunk/pywikipedia/wikipedia.py 2012-05-03 10:49:55 UTC (rev 10171)
@@ -3920,6 +3920,11 @@
result.append((datetime, username, resolution, size, comment))
return result
+ def getFirstUploader(self):
+ """ Function that uses the APIs to detect the first uploader of
the image """
+ inf = self.getFileVersionHistory()[-1]
+ return [inf[1], inf[0]]
+
def getLatestUploader(self):
""" Function that uses the APIs to detect the latest uploader of
the image """
if not self._infoLoaded: