Strainu added a comment.
Let's clarify the terminology and separate the concerns here: - I suggested that, based on the usecase, pageview data might be better retrieved from the **Wikimedia.org** REST API ( https://wikimedia.org/api/rest_v1/#/ ) which is **different** from the REST API on the other sites (see here <https://www.mediawiki.org/wiki/Wikimedia_REST_API>). As usual, extensions can add their own endpoints (see for instance `/pages/talk` at https://en.wikipedia.org/api/rest_v1/ which is missing from MediaWiki Confusing, I know. - Pageviews are only part of the Wikimedia API, so it is not exposed through the `PageViewInfo` extension. From a design point of view, they're totally separated and could potentially return different data at least occasionally (although I suppose they share a common data source) I think all three are valuable (local API, Wikimedia REST, MediaWiki REST) and should all have wrappers in PWB: 1. PWB should have a `RestAPISite` class and potentially subclasses per family (i.e. `WikipediaRestApi`, `CommonsRestApi`,`WikidataRestApi` etc.) + a `WikimediaOrgRestApi`. Exact naming is TBD, of course. 2. to expose pageviews data in the `Page` object the local API should be used, just like it's the case for `page_image()` or `coordinates()`. Use of REST API should be at most a backup, but I would personally leave the implementation of the backup mechanism to the bot builders. TASK DETAIL https://phabricator.wikimedia.org/T325473 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Strainu Cc: Strainu, Aklapper, pywikibot-bugs-list, binbot, Xqt, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
