Page MenuHomePhabricator

pagetriagelist API does not list any pages
Closed, ResolvedPublic

Description

For my script I would like to retrieve a random new page, as seen on https://en.wikipedia.org/wiki/Special:NewPagesFeed.

But https://en.wikipedia.org/w/api.php?action=pagetriagelist&limit=10&namespace=0 -- this URL is provided by the API documentation page as an example, except I edited the limit from 1000 to 10 -- is empty. It is not expected to be empty, it is expected to be able to show results from the over 14,000 new pages list.

(I don't know what tag to put here. Put none, alas, so far.)

Event Timeline

this URL is provided by the API documentation page as an example

Link very welcome.

Hi,

this URL is provided by the API documentation page as an example

Link very welcome.

Thanks for asking. Please see some copy-pasted information below...

To quote https://en.wikipedia.org/w/api.php?action=help&modules=pagetriagelist,

"Example:

List 1000 pages in namespace 0

api.php?action=pagetriagelist&limit=1000&namespace=0"...

The example output:

{

"warnings": {
    "pagetriagelist": {
        "*": "\"limit\" may not be over 200 (set to 1000) for users."
    }
},
"pagetriagelist": {
    "result": "success",
    "pages": []
}

}

Now I alter it and try api.php?action=pagetriagelist&limit=100&namespace=0:

{

"pagetriagelist": {
    "result": "success",
    "pages": []
}

}

This API is weird and the example is bad: you need to either pass &showreviewed=1 or &showunreviewed=1 (or both).

This is obviously not best practice design for an api.php module. I'll at least fix the examples and then see if this module is used anywhere and if we can make the default parameters saner.

Change 330266 had a related patch set uploaded (by Catrope):
ApiPageTriageList: Better document parameter weirdness

https://gerrit.wikimedia.org/r/330266

Change 330266 merged by jenkins-bot:
ApiPageTriageList: Better document parameter weirdness

https://gerrit.wikimedia.org/r/330266

MPGuy2824 claimed this task.
MPGuy2824 subscribed.

This seems solved by https://gerrit.wikimedia.org/r/330266 mentioned above. Closing.