Page MenuHomePhabricator

prop=info&inprop=watched
Closed, ResolvedPublic

Description

Author: herd

Description:
There is no way to tell if a title is being watched, via the API. This is ubiquitous in the UI so should have some API vector. If a bit expensive it should probably be a non-default prop=info parameter like &inprop=watched returning watched="".

If not expensive, this could be generated (optionally optionally) for all logged-in queries using &titles= and/or a list module?

Ref:

<Reedy> and we had it setup to work out if the page was currently watched, to set a button to watch/unwatch as appropriate...
<Reedy> So was after a way to move that accross
<Reedy> We pull action=query&prop=info|revisions&intoken=edit&titles=Main%20Page&rvprop=timestamp|user|comment|content currently.. So if it was in there somewhere without pulling more/an extra query, that'd be nice


Version: 1.16.x
Severity: enhancement

Details

Reference
bz19523

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:37 PM
bzimport set Reference to bz19523.

Yup, something like that.

As with everything, if we moved AWB to full Api editing losing functionality, users would complain ;)

This sounds feasible, and should be done as an optional inprop=watched. I have no time to do this, but patches are welcome :)

Bryan.TongMinh wrote:

Could be implemented as a LEFT JOIN against the watchlist table or as a separate query. I would opt for the latter option.

(In reply to comment #3)

Could be implemented as a LEFT JOIN against the watchlist table or as a
separate query. I would opt for the latter option.

I don't think it makes much of a difference: MySQL optimized LEFT JOINs when it notices you use something like WHERE wl_user IS NULL. Keeping everything in one query is cleaner.

I'm having a go at trying to implement this..

Just having to get used to the code and whats going on..

We shall see ;)