This task is done when huggle users making judgments about edits is written directly to Jade.
- When a user decides to revert obvious vandalism, a "damaging", "badfaith" label is stored in Jade: labeldata={"damaging": true, "goodfaith": false}
- When a user decides to revert a goodfaith edit, a "damaging", "goodfaith" labels is stores in Jade: labeldata={"damaging": true, "goodfaith": true}
- When a user decides that an edit is good, a "good", "goodfaith" label is stored in Jade: labeldata={"damaging": false, "goodfaith": true}
- When a user thinks an edit needs expert review, TODO
We'll want to use the proposeorendorse endpoint to store the labels. See the endpoint running on beta: https://deployment.wikimedia.beta.wmflabs.org/w/api.php?action=help&modules=jadeproposeorendorse
jadeproposeorendorse -- Catch all, routing method that tries to *do the right thing* with a label
@param title (str) The encoded entity name. (E.g. "Jade:Diff/123456") [required if entitytype or entityid are not set]
@param entitydata (json) The type of Jade entity (E.g., {"type": "diff", "id": 3245678}) [required if title not set]
@param facet (str) The facet of the entity being labeled [required]
@param labeldata (json) The relevant new label data [required]
@param notes (str) Notes to save when creating a new proposal (A warning will be raised if a proposal already exists. Notes will not be automatically overwritten.)
@param endorsementcomment (str) Comment to leave with the endorsement. Defaults to "As proposer" if not set and creating new proposal.
@param origin (str) A structured string representing what the user was looking at when they made this judgment [required]
@param comment (str) Revision summary
@param token (str) [required]
@warning endorsingnonpreferredproposal -- This action resulted in creating an endorsement for a proposal that is not flagged as preferred.
@warning nochange -- This action would result in no change. {user} has already endorsed {labeldata}.An expected call from Huggle might look something like this:
?action=jadeproposeorendorse
&entitydata={"type": "diff", "id": 123456}
&labeldata={"damaging": true, "goodfaith": false}
&origin=Huggle 2.5.3
&comment=Submitted from Huggle
&token=+SOMESTRINGFROMSOMEWHEREELSEIf it returns warnings, they probably don't matter. You might want to catch "endorsingnonpreferredproposal" as that means the user is performing some action that disagrees with someone else. A confirm dialog would probably be enough.