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.
- 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)