Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/85181
Change subject: Page.data_item() function to get a Wikibase item of a page ...................................................................... Page.data_item() function to get a Wikibase item of a page Change-Id: I10e5b4162b0ee4ec479c312acbdd833640e488aa --- M pywikibot/page.py 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/81/85181/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 6203459..86be801 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -998,6 +998,13 @@ # iterated upon. return self.site.pagelanglinks(self, step=step, total=total) + def data_item(self): + """ + Convinience function to get the Wikibase item of a page + @return: ItemPage + """ + return ItemPage.fromPage(self) + def templates(self, content=False): """Return a list of Page objects for templates used on this Page. -- To view, visit https://gerrit.wikimedia.org/r/85181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10e5b4162b0ee4ec479c312acbdd833640e488aa Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits