Page MenuHomePhabricator

Watchlist Expiry: list=watchlistraw should return watchlist expiry if present
Open, Needs TriagePublic

Description

Currently there is no way to get all watched items on a user's watchlist along with the expiries using a single API call. Having this could for instance allow someone to write a script or gadget to return only temporarily watched pages, so that they can keep tabs on them. See T269867 for a use-case.

list=watchlistraw currently returns items like:

{
  "ns": 0,
  "title": "Free and open-source software"
}

It should also include the "expiry" if there is one. (Note we name it just "expiry" and not "watchlistexpiry", because this API is only relevant to the watchlist, similar to the action=watch API).

There is no performance loss by always including the expiry, so I don't think they need to be exposed only through i.e. wrprop=expiry.

Taking it a step further, the wrshow parameter could accept expiring and !expiring to show only expiring/non-expiring items.