Page MenuHomePhabricator

[Story] API module for retrieving diffs between entity revisions (wbentitydiff)
Open, MediumPublic

Description

We want to have an API module for retrieving diffs between entity revisions (wbentitydiff).

Use case: analysis of edits for revision scoring

wbentitydiff should support:

  • the same parameters for controlling diffing as index.php does with diff and oldid.
  • getting the diff between an entity's current revision and the previous revision, by supplying just the entity ID.
  • diffing any revisions of any entities of the same type

The diff should be represented as a json structure, just as we do in DiffChange.

Implementation notes:

  • Follow the exampel of the wbgetclaims module (see the GetClaims class).
  • Get the desired EntityRevisions using an EntityLoadingHelper
  • Create a EntityDiff using the appropriate EntityDiffer (TBD: provide a factory for this)
  • Convert the EntityDiff to a JSON-style array structure (TBD: provide an DiffSerializer for this)
  • Return the resulting array structure via the ApiResult (possibly using ResultBuilder)

Event Timeline

daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel added a project: Wikidata.
daniel subscribed.
daniel added subscribers: aaron, Ladsgroup.
daniel edited subscribers, added: Halfak; removed: aaron.
daniel triaged this task as Medium priority.Jul 19 2015, 10:56 PM

we decided we want this

Jonas renamed this task from API module for retrieving diffs between entity revisions (wbentitydiff) to [Story] API module for retrieving diffs between entity revisions (wbentitydiff).Aug 13 2015, 2:36 PM
Jonas updated the task description. (Show Details)