Page MenuHomePhabricator

Implement Action API for managing Reading Lists
Closed, ResolvedPublic

Description

The API will provide 4 distinct sets of functionality:

  • Returning Reading Lists for the authenticated user
  • Returning the entries of a Reading List for an authenticated user
  • Allow a user to mange Reading Lists and their entries
  • Return changes to lists and entries (including deletions) since a provided date

Action API syntax

(in case option 1 is chosen above)

  • list=readinglists to get all lists of the current user
    • rlprop=entries to enable/disable returning the entries together with the list
    • rllimit, rlentrylimit
    • list=readinglists&rllist={list_id} to get the entries of a single list
    • list=readinglists&rlproject={project}&rltitle={title} to get the lists containing a given page
  • list=readinglistchanges&rlcsince={date} to get changed/deleted entries/lists
  • action=readinglists&command=[setup|teardown|create|update|delete|createentry|deleteentry|order] for all the write operations on lists. (This is slightly against action API conventions which would put all "commands" as separate actions, which IMO would make the help interfaces unnecessarily hard to use.)
  • action=readinglistentries&command=[create|delete|order] for all the write operations on list entries.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Fjalapeno updated the task description. (Show Details)Jun 27 2017, 4:26 PM

Change 366980 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ReadingLists@master] [WIP] API

https://gerrit.wikimedia.org/r/366980

Tgr claimed this task.Aug 21 2017, 11:52 PM
Tgr added a comment.Aug 22 2017, 12:24 AM

After some changes based on code review feedback, the API syntax is

  • meta=readinglists to get all lists of the current user
    • rlchangedsince to get lists which changed recently
    • rlproject and rltitle to get which lists a page belongs to
  • list=readinglistentries to get all entries of the given lists
    • rlechangedsince to get entries which changed recently
    • can be used as a generator
  • list=readinglistorder to get the order of lists/list entries (not really useful, since it's also returned by the other modules, but the REST API wanted such an endpoint, so...)
  • action=readinglists&command=[setup|teardown|create|update|delete|createentry|deleteentry|order|orderentry] for all the write operations on lists.
    • commands are implemented as submodules

Change 366980 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@master] Add API modules

https://gerrit.wikimedia.org/r/366980

Tgr closed this task as Resolved.Nov 14 2017, 12:11 AM