Support sort-direction for API call pwg.categories.getImages #564

Closed
opened 2026-10-05 00:04:42 +02:00 by adam · 2 comments
Owner

At the moment it's possible to order by id, file, name, hit, rating_score, date_creation, date_available, or random with the pwg.categories.getImages API call. It would be great to be able to reverse the direction of the sorting (with the exception of random).

So for example https://example.org/ws.php?format=php&method=pwg.categories.getImages&order=date_creation&direction=desc would give the most recently-created images (at the moment, without the direction sort option, it returns images without any creation date first).

At the moment it's possible to order by id, file, name, hit, rating_score, date_creation, date_available, or random with the `pwg.categories.getImages` API call. It would be great to be able to reverse the direction of the sorting (with the exception of random). So for example `https://example.org/ws.php?format=php&method=pwg.categories.getImages&order=date_creation&direction=desc` would give the most recently-created images (at the moment, without the direction sort option, it returns images *without any creation date* first). <!-- github-sync-id:205056142 -->
adam closed this issue 2026-10-05 00:04:42 +02:00
Author
Owner

you can fill the order parameter with "date_creation desc" to sort descending

you can fill the order parameter with "date_creation desc" to sort descending <!-- github-comment-id:277228742 -->
Author
Owner

Thanks! I didn't see that in the documentation.

Thanks! I didn't see that in the documentation. <!-- github-comment-id:277583334 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#564