Page MenuHomePhabricator

Implement sort APIs in RESTBase proxy service
Closed, ResolvedPublic

Description

In order to support lists being ordered by the user, we must allow clients to both set and fetch the order of lists and entries.

This will work by passing a JSON array or the entry ids to set the list/entry order and by receiving a similar array of list/entry ids when getting the sort order.

Sorting

Sorting works by getting/setting an array of all list / list entry ids. The number of lists per user / entries per list will be capped at some high but reasonable number so these arrays cannot grow too long.

  • GET /lists/reading/list_order: get order of lists
  • PUT /lists/reading/list_order: set order of lists
  • GET /lists/reading/{list_id}/entry_order: get order of list entries
  • PUT /lists/reading/{list_id}/entry_order: set order of list entries

Event Timeline

Fjalapeno updated the task description. (Show Details)
Fjalapeno removed a project: Epic.
Tgr closed this task as Resolved.Nov 14 2017, 12:02 AM
Tgr claimed this task.
Tgr added a subscriber: Tgr.

Was done in https://github.com/wikimedia/restbase/pull/887 (although it will be undone soon per T180402).