Page MenuHomePhabricator

Api Modules as followup to bug 14473 (Add iwlinks table to track inline interwiki link usage)
Closed, ResolvedPublic

Description

<RoanKattouw> Also, we'll want API support for http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65104
<RoanKattouw> It'd be trivial to expose ParserOutput::getInterwikiLinks() in action=parse
<Reedy> I'll log it as a bug and do it later :)
<RoanKattouw> Plus we'd probably want prop=interwikilinks and list=interwikibacklinks (bad name :P )
<RoanKattouw> Yeah thanks
<Reedy> yeah
<Reedy> i was thinking something linksonpage esk aswell
<RoanKattouw> Yeah that's what prop=interwikilinks would be, the equivalent of prop=links: "get me all (iw) links on this page"
<RoanKattouw> And list=(iw)backlinks is "get me all (iw) links to this page
<Reedy> mhmm


Version: unspecified
Severity: enhancement

Details

Reference
bz23524

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:02 PM
bzimport set Reference to bz23524.

Adding dependency of 14473 for lazy linking

For the parse bit.. We're gonna need the the target site and the target link..

<interwikilinks>
<iw>wikibooks:test</iw>
</interwikilinks>

Seems a bit crappy/pointless - Presumably we want both bits separate. Otherwise it's just more work for the client.

Just how to present it

<iw prefix="wikibooks">test</iw>

Bryan.TongMinh wrote:

We should of course also optionally output the full url as well.

Hmm. Good idea. Probably doing it as a property of fullinterwikilinks, or something. If it has that, do the url too, else without full, just the prefix/target

<iw prefix="wikibooks" link="test" />
<iw prefix="wikibooks" link="test">http://en.wikibooks.org/wiki/test</iw>

r66440 does prop=iwlinks

Won't commit any of the parse stuff till we decide on how we want it.

See if i can get the iwbacklinks done..

More a less got a backlinks module working

iwbltitle=wikibooks:Test

or something more like
iwblprefix=wikibooks&iwbltitle=Test

The latter would make more sense, i think.

(In reply to comment #6)

More a less got a backlinks module working

iwbltitle=wikibooks:Test

or something more like
iwblprefix=wikibooks&iwbltitle=Test

The latter would make more sense, i think.

Yes, I would agree.

(In reply to comment #2)

Just how to present it

<iw prefix="wikibooks">test</iw>

As this is what you seem to have done in prop=iwlinks, let's go with that throughout.

You didn't implement returning URLs (yet?), but as far as I'm concerned that can also be implemented as <iw prefix="wikibooks" url=".......">test</iw>

Where do we want to put the full links? On prop=iwlinks and on the parse output? Or just one?

r66872 gives &url for ApiQueryIWLinks to expand full URL

r66873 does the parse bit. Bar the external link expansion (if deemed needed)

Just backlinks to finish

r66891

I think this is finished...