On Mon, Apr 14, 2014 at 8:45 AM, Jason Ji <[email protected]> wrote:

> Greetings!
>

Hi!


> I am a relatively new MediaWiki extension developer,
>

If you're working on an extension and querying these links on the same wiki
on which your extension is installed, you might be better served by using
the appropriate PHP methods to fetch this data directly, rather than making
a query back into the MediaWiki API.

I know we can use *action=query&prop=extlinks *to get *external *links from
> our wiki page to other (non-wiki) web pages, *action=query&prop=links *to
> get internal links from our wiki page *out *to other wiki pages, and 
> *action=query&prop=backlinks
> *to get internal links from other wiki pages *into *our wiki page.
>

I expect it's just a typo, but for the benefit of anyone else reading that
last should list=backlinks, not prop=backlinks.


> However, in the case where a link is *external *but points *to an
> internal wiki page*, I can't find the proper API call. These links seem
> to be falling through the cracks somehow.
>

Those may be accessed, along with all other external links, by using
action=query&list=exturlusage. You'd specify the appropriate values for
euprotocol and euquery to limit the search to the particular link you're
interested in.


-- 
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to