Extension:InterwikiMap/Data

From mediawiki.org
Jump to navigation Jump to search

What data should the InterwikiMap API module provide upon request, and possibly use in filters for determining what interwiki prefixes to include in the interwiki table (using recursive AND, OR, XOR, and NOT tests similar to what is found in Autopromote.php)? "Low priority" means that it will require retrieving data from actual APIs, because it's not available from WikiIndex. Ideas:

  • Data for the interwiki table fields:
    • Implemented:: iw_prefix
    • Implemented:: iw_url
    • Approved for implementation iw_api: Get this from the RSD discovery
    • iw_wikiid: I'm not too familiar with this, but I assume it's unnecessary and probably unavailable in many cases; it's sensitive
    • iw_local: I'm not sure how to make the decision of what settings to use for this
    • iw_trans: I'm not sure how to make the decision of what settings to use for this
  • Data from wikiindex:Template:Wiki, including:
    • Approved for implementation name: Available through meta=siteinfo
    • Approved for implementation logo: May as well make this available through ApiQuerySiteinfoEnhanced, so that wiki index bots can more easily get it. Use $wgLogo. May as well include it where it's available; you can never have too much data.
    • Approved for implementation wide logo: There might be a way to test for this and get that data.
    • Approved for implementation recentchanges URL: Make available through ApiQuerySiteinfoEnhanced
    • Approved for implementation wikinode URL: These never really caught on, but we may as well make it an available option, either through an optional configuration setting or (probably preferably) through a MediaWiki:Wikinode-url page.
    • Approved for implementation status: Use Wikiindex's assessment. Pretty important data; if the site is dead, people probably don't want it on their interwiki prefix list.
    • Approved for implementation language: Make available through ApiQuerySiteinfoEnhanced; it's config setting $wgLanguageCode
    • Approved for implementation editmode: Can probably be discerned from config settings; see Manual:Preventing access. Or we can use Wikiindex's data.
    • Approved for implementation engine: Shouldn't be too hard to detect by polling the wiki; also available from Wikiindex.
    • Approved for implementation license: Available from siprop=general
    • Approved for implementation maintopic: There should probably be a MediaWiki:Maintopic system message. Of course, there can be an "official" main topic and what outsiders (e.g. Wikiindex) assess it as being. Maybe both should be provided.
    • Approved for implementation backupurl: Found at '/Special:Statistics' on Wikia sites. This should be another system message, probably.
    • Approved for implementation backupdate: This should be another system message, probably.
    • Approved for implementation pages: siprop=statistics
    • Approved for implementation statistics URL: Shouldn't be too hard to get, by similar means as getting the RecentChanges page
    • Approved for implementation wikiFactor: From Wikiindex. Appears easy to manipulate or inflate; if shown to be otherwise, may be included.
    • Approved for implementation wikiFactor URL: From Wikiindex, or get from Special:PopularPages, if it's available.
    • Approved for implementation categorization and subcategorization: We could store the whole category tree as metadata, which would allow for, say, including all prefixes that are in a category or one of its subcategories. Low priority.
  • Approved for implementation All the data from meta=siteinfo. Low priority.
    • Approved for implementation siprop=extensions: pretty useful for generating extension usage info at MediaWiki.org. The data is not yet available, so it will be necessary to poll for it. This is a low-priority item.
    • Approved for implementation Any other siprop=statistics data: articles, edits, images, users, activeusers, admins, jobs. It should also say how "activeusers" is defined. This data can be inflated by spamming and such, though.
    • Approved for implementation siprop=namespaces: could provide some interesting namespace ideas. Some wikis might have massive numbers of namespaces, though; we'll have to check on that. The data is not yet available, so it will be necessary to poll for it. This is a low-priority item.
  • Other
    • Approved for implementation url for this wiki's about page. Available at MediaWiki:Aboutpage.
    • Approved for implementation url for this wiki's wikiindex entry. Get from wikiindex through a reverse lookup.