API function to return random page(s) in selected namespace(s)
Closed, ResolvedPublic

Description

Author: overlordq

Description:
ApiQueryRandom

Basically add the functionality of Special:Random to the API with the addition of a parameter to return more then one result.

I've (tried) to create a working implementation but I'm sure my lack in knowledge of WP internals severely screwed it up. I'll


Version: 1.12.x
Severity: enhancement

Attached: ApiQueryRandom.php

Details

Reference
bz12816
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz12816.

overlordq wrote:

Patch to add it to the API

Attached: apr_patch.patch

Added in r30217.

(In reply to comment #0)

I've (tried) to create a working implementation but I'm sure my lack in
knowledge of WP internals severely screwed it up.

Your patch contained some duplicate code and only listed redirects (page_is_redirect != 0 rather than = 0), but I've seen far worse.

Add Comment