Feature summary
For a wiki using PageTriage, it is complicated to figure out if a page is reviewed. The algorithm is basically to SQL query the pagetriage_page table, see if your page_id is in there, then read the ptrp_status field, which can have a value of 0, 1, 2, or 3. Your page not being in the table and getting no result at all is also a frequent occurrence. So 1, 2, 3, or missing is basically "reviewed", and 0 is "unreviewed".
This logic should be moved to an API call, so our developers don't need to implement this logic themselves.
Benefits (why should this be implemented?):
- Less cognitive load on programmers
- More concise code for programmers
Acceptance criteria
- Should take title (namespace:title) or pageid, like the query API does
- Should return isReviewed: true/false, or throw a "page does not exist" type error, or a "not a namespace pagetriage patrols" error
After code review, instead of making a new API, may be best to add this to query->prop.