Page MenuHomePhabricator

Add filtering to list=allimages for feature parity with Special:NewFiles
Open, Needs TriagePublic

Description

[17:52:11] <mathemancer> Actually, I found the relevant page: https://commons.wikimedia.org/wiki/Special:NewFiles . Is there a separate API (other than the mediawiki API) that serves that page?

While there are other ways to get (most) of the same information/functionality, this seems a reasonable filtered view to potentially include otherwise

Event Timeline

Reedy created this task.Mon, Dec 2, 5:56 PM
Restricted Application added a project: Core Platform Team. · View Herald TranscriptMon, Dec 2, 5:56 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Mon, Dec 2, 6:51 PM
Anomie added a subscriber: Anomie.

I note Special:NewFiles seems almost the same as the existing list=allimages with aisort=timestamp. Missing features are the media type filters and an equivalent to the "Hide patrolled uploads" checkbox. The best thing to do would probably be to add those features to the existing module.

Reedy added a comment.Mon, Dec 2, 6:59 PM

I note Special:NewFiles seems almost the same as the existing list=allimages with aisort=timestamp. Missing features are the media type filters and an equivalent to the "Hide patrolled uploads" checkbox. The best thing to do would probably be to add those features to the existing module.

Makes more sense.

It'd be useful if we had some sort of "mapping" between special pages and api modules as a method of increasing visability

Reedy renamed this task from Add API for Special:NewFiles to Add filtering to list=allimages for feature parity with Special:NewFiles.Mon, Dec 2, 7:00 PM
Reedy added a comment.Mon, Dec 2, 7:04 PM

It'd be useful if we had some sort of "mapping" between special pages and api modules as a method of increasing visability

T239648: Document mapping between Special Pages and API modules

Hello, I'm the one who started the thread on IRC. To clarify, I'm aware that a get request to https://www.mediawiki.org/w/api.php?action=query&list=allimages&aiprop=user%7Ctimestamp%7Curl&aisort=timestamp&aidir=older returns more-or-less the same info as is available at the page https://www.mediawiki.org/wiki/Special:NewFiles . What I'd like is the ability to make an API request that returns the same info as is available at https://commons.wikimedia.org/wiki/Special:NewFiles . The second page has many more pictures available. Note that the first page has only a couple of pictures from September, then before that nothing all the way back to mid March.

Anomie added a comment.Tue, Dec 3, 4:51 PM

What I'd like is the ability to make an API request that returns the same info as is available at https://commons.wikimedia.org/wiki/Special:NewFiles . The second page has many more pictures available. Note that the first page has only a couple of pictures from September, then before that nothing all the way back to mid March.

https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aiprop=user|timestamp|url&aisort=timestamp&aidir=older&ailimit=50&aiprop=timestamp|url|size|user ?

What I'd like is the ability to make an API request that returns the same info as is available at https://commons.wikimedia.org/wiki/Special:NewFiles . The second page has many more pictures available. Note that the first page has only a couple of pictures from September, then before that nothing all the way back to mid March.

https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aiprop=user|timestamp|url&aisort=timestamp&aidir=older&ailimit=50&aiprop=timestamp|url|size|user ?

That's perfect. Thanks. I was misunderstanding the meaning of the API domains. Consider me properly embarassed. Thanks!