Page MenuHomePhabricator
Paste P8830

Jade API Spec v3
ActivePublic

Authored by Halfak on Jul 30 2019, 4:38 PM.
jadeproposeorendorse -- Catch all, routing method that tries to *do the right thing*
@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}.
jadecreateandendorse -- Creates a new proposal and files an endorsement. If the user already endorsed another proposal within the facet, move the user's endorsement to the new proposal.
@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.
@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 nomove (str) If set, do not move an endorsement. Instead throw an error.
@param token (str) [required]
@error proposalexists -- If a proposal with the specified data already exists
@warning endorsingnonpreferredproposal -- This action resulted in creating an endorsement for a proposal that is not flagged as preferred.
jadeendorse -- Adds a new endorsement to a proposal
@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 label data [required]
@param endorsementcomment (str) Comment to leave with the endorsement. Defaults to "As proposer" if not set.
@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 nomove (bool) If set, do not move an endorsement. Instead throw an error. If true, warn that the endorsement was moved.
@param token (str) [required]
@error proposalnotfound -- Could not find a proposal with matching "data"
@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}.
jademoveendorsement -- Moves an endorsement to a new proposal. If "data" matches the currently endorsed proposal, make no change (except maybe to endorsement comment)
@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 [required]
@param labeldata (json) The relevant new label data [required]
@param comment (str) Revision summary
@param endorsementcomment (str) Leave unchanged if unset.
@param token (str) [required]
@error proposalnotfound -- Could not find a proposal with matching "data"
@warning endorsingnonpreferredproposal -- This action resulted in 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}.
jadedeleteproposal -- Removes a specific proposal
@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 [required]
@param labeldata (json) The relevant label data [required]
@param comment (str) Revision summary
@param token (str) [required]
@error proposalnotfound -- Could not find a proposal with matching "data"
@error proposalispreferred -- Cannot delete a preferred proposal except when it is the only remaining proposal for a facet. You must set another proposal to be "preferred"
jadedeleteendorsement -- Removes the user's endorsement
@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 [required]
@param user_id (int) If set, remove this user's endorsement [default: self] [required one of (user_id, global_id, ip)]
@param global_id (int) If set, remove this user's endorsement (If centralauth is in use) [default: self] [required one of (user_id, global_id, ip)]
@param ip (str) If set, remove this user's endorsement [default: self] [required one of (user_id, global_id, ip)]
@param comment (str) Revision summary
@param token (str) [required]
@error endorsementnotfound -- Could not find an endorsement from the target user
jadesetpreference -- Moves the preference bit from one proposal to another within a facet
@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 [required]
@param labeldata (json) The relevant label data [required]
@param token (str) [required]
@error proposalnotfound -- Could not find a proposal with matching "data"
@warning nochange -- This action would result in no change. {labeldata} is already set as "preferred"
jadeupdateproposal
@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 [required]
@param labeldata (json) The relevant label data [required]
@param notes (str) The new notes field for the proposal [required]
@param token (str) [required]
@error proposalnotfound -- Could not find a proposal with matching "data"
@warning nochange -- This action would result in no change. Notes are identical.
jadeupdateendorsement
@param title (str) The encoded entity name. (E.g. "Jade:Diff/123456") [required if entitytype or entityid are not set]
@param entitydata (json) The Jade entity (E.g., {"type": "diff", "id": 3245678}) [required if title not set]
@param facet (str) The facet of the entity [required]
@param user_id (int) If set, remove this user's endorsement [default: self] [required one of (user_id, global_id, ip)]
@param global_id (int) If set, remove this user's endorsement (If centralauth is in use) [default: self] [required one of (user_id, global_id, ip)]
@param ip (str) If set, remove this user's endorsement [default: self] [required one of (user_id, global_id, ip)]
@param endorsementcomment (str) The new comment field for the endorsement
@param token (str) [required]
@error endorsementnotfound -- Could not find an endorsement from the target user
@warning nochange -- This action would result in no change. Endorsement comments are identical.
jadegetlabels
@param titles (str, multiple) The encoded entity name. (E.g. "Jade:Diff/123456") [required if entitytype or entityid are not set]
@param entitydata (json, multiple) The Jade entity (E.g., {"type": "diff", "id": 3245678}) [required if title not set]
@param facet (str, multiple) Which facets to include in the response [default: all]
@param props (str, multiple) Which facet parts to include endorsements, notes, nonpreferred. [default: notes]

Event Timeline

Halfak edited the content of this paste. (Show Details)Jul 30 2019, 4:45 PM
Halfak edited the content of this paste. (Show Details)Jul 30 2019, 5:36 PM
Halfak edited the content of this paste. (Show Details)Jul 31 2019, 1:49 PM
Halfak edited the content of this paste. (Show Details)Jul 31 2019, 1:52 PM
Halfak edited the content of this paste. (Show Details)Sep 16 2019, 9:13 PM