Last modified: 2011-06-24 17:26:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31237, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29237 - Add option to output "iwurl" (interwiki target url) attribute in ApiQuery
Add option to output "iwurl" (interwiki target url) attribute in ApiQuery
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-01 21:12 UTC by merl
Modified: 2011-06-24 17:26 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description merl 2011-06-01 21:12:54 UTC
Please return the target url if a title contains an interwiki prefix like prop=langlinks&llurl=1 does.

At the momment it it not always possible to know the target url of an interwiki link. For language links llurl can be used which solves the problem. /api/query/interwiki only contains the interwiki prefix (@iw) without an possibility to request the url. Not all prefix are contained in the sitematrix (see bug 28743 / bug 19838), so there is no other sure possibility the build the url of the interwikitarget by your own.

My suggestion would be to add a new parameter interwikiurl, so that http://de.wikipedia.org/w/api.php?action=query&titles=en:Main%20Page&redirects=&interwikiurl=1
returns
<api>
  <query>
    <interwiki>
      <i title="en:Main Page" iw="en" iwurl="http://en.wikipedia.org/wiki/Main Page"/>
    </interwiki>
  </query>
</api>

New the iwurl attributes should return the same value like /api/query/pages/page/langlinks/ll/@url on querying prop=langlinks&url=1
Comment 1 Sam Reed (reedy) 2011-06-05 22:52:07 UTC
r89539

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links