User:ClueBot NG/API

Current ClueBot NG has 2 APIs, one for review entries and one for the report/vandalism data. Please be aware when using the APIs that some methods will return VERY large amounts of data.

= Review API =

Usage
`-Help: `-help - Get help documentation |- http://cluebotreview.g.cluenet.org/api?help `- http://cluebotreview.g.cluenet.org/api
 * -Users:
 * |-listUsers - List keys for all users known to the system.
 * | `- http://cluebotreview.g.cluenet.org/api?listUsers
 * `-getUser - Get user information from user key.
 * |-guKeys - Colon seperated list of user keys.
 * `- http://cluebotreview.g.cluenet.org/api?getUser&amp;guKeys=key1:key2:...:keyN
 * -Edits:
 * `-getEdit - Get edit information from edit key.
 * |-geKeys - Colon seperated list of edit keys.
 * |-geIds - Colon seperated list of edit IDs.
 * `- http://cluebotreview.g.cluenet.org/api?getEdit&amp;geKeys=key1:key2:...:keyN
 * -EditGroups:
 * |-listEditGroups - List keys for all EditGroups known to the system.
 * | `- http://cluebotreview.g.cluenet.org/api?listEditGroups
 * `-getEditGroup - Get EditGroup information from EditGroup key.
 * |-gegKeys - Colon seperated list of EditGroup keys.
 * `- http://cluebotreview.g.cluenet.org/api?getEditGroup&amp;gegKeys=key1:key2:...:keyN

listUsers
listUsers returns an array of user keys wrapped in a "ListUsers" element.

Acceptable parameters
None

Example output
  abc abc123  

Elements
UserKey - Contains the users unique identifier within the review interface

getUser
getUser returns an array of user information wrapped in a "User" element.

Acceptable parameters
guKeys - Colon seperated list of user keys.

Example output
   uberdooberkey OVER 9000 9001</Classifications> </User> </GetUser> </API>

Elements
Key - Contains the users unique identifier within the review interface Nick - Contains the users wikipedia nick Classifications - Contains the number of edits this user has reviewed

getEdit
geKeys - Colon seperated list of edit keys. geIds - Colon seperated list of edit IDs.

listEditGroups
listEditGroups returns an array of edit group keys wrapped in a "ListEditGroups" element.

Acceptable parameters
None

Example output
<API> <listEditGroups> <EditGroupKey>abc</EditGroupKey> <EditGroupKey>abc123</EditGroupKey> </listEditGroups> </API>

Elements
EditGroupKey - Contains the groups unique identifier within the review interface

getEditGroup
getEditGroup returns an array of edit group information wrapped in a "EditGroup" element.

Acceptable parameters
gegKeys - Colon seperated list of EditGroup keys.

Example output
<API> <GetEditGroup> <EditGroup> <Key>abc</Key> <Name>An example group</Name> <Weight>10</Weight> <Edits> <EditKey>examplekey</EditKey> </Edits> <Done> <EditKey>examplekey</EditKey> </Done> </EditGroup> </GetEditGroup> </API>

Elements
Key - Contains the groups unique identifier within the review interface Name - Human readable group name Weight - Determines which edits get shown in the review interface first, a higher number means the edits will get presented more often Edits - An array of edit keys that are active in this group (not done) Done - An array of edit keys that are done in this group (not active)

help
Help returns a human readable list of available actions/parameters wrapped in a "Help" element. The output is the same as listed under User:ClueBot_NG/API.

= Data API =

Usage
ClueBot NG API Options: format - Output format, valid values are as follows: - xml - json - php (serialize) - debug (print_r) Methods: `-Help: |- Get module documentation `- http://api.cluebot.cluenet.org/?action=help
 * -Reports:
 * |- List all reports
 * | `- http://api.cluebot.cluenet.org/?action=reports.list
 * | `- Accepts the following arguments:
 * |    status - (optional) Report status, valid values are as follows:
 * |      1 - Reported
 * |      2 - Invalid
 * |      3 - Sending to Review Interface
 * |      4 - Bug
 * |      5 - Resolved
 * |      6 - Queued to be reviewed
 * |      7 - Partially reviewed
 * |      8 - Reviewed (Included in dataset as Constructive)
 * |      8 - Reviewed (Included in dataset as Vandalism)
 * |      10 - Reviewed (Not included in dataset)
 * |- Get specific report
 * `- http://api.cluebot.cluenet.org/?action=reports.get
 * `- Accepts the following arguments:
 * rid - Report ID, valid values are obtained from the reports.list method
 * -Beaten: - These are not implimented yet
 * |- List all beaten reverts
 * `- http://api.cluebot.cluenet.org/?action=beaten.list
 * `- Accepts the following arguments:
 * article - (Optional) article the edit was on
 * user - (Optional) user the edit was by
 * -Users:
 * |- List all users
 * |`- http://api.cluebot.cluenet.org/?action=users.list
 * | `- Accepts the following arguments:
 * |   superadmin - (Optional) filter by superadmin status (1 for yes, 0 for no)
 * |   admin - (Optional) filter by admin status (1 for yes, 0 for no)
 * |- Get specific user - Certain information like hashed passwords will not be returned
 * `- http://api.cluebot.cluenet.org/?action=users.get
 * `- Accepts the following arguments:
 * uid - User ID
 * username - Username
 * -Edits:
 * |- List all edits
 * | `- http://api.cluebot.cluenet.org/?action=edits.list
 * | `- Accepts the following arguments:
 * |    eid - (Optional) Get edits after this id
 * |    user - (Optional) User the edit was by
 * |    article - (Optional) Article that the edit was on
 * |    heuristic - (Optional) Only return edits matching this heuristic
 * |    regex - (Optional) Only return edits matching this regex
 * |    reverted - (Optional) Edit reverted (1 for yes, 0 for no)
 * |- Get specific edit
 * `- http://api.cluebot.cluenet.org/?action=edits.get
 * `- Accepts the following arguments:
 * eid - CBNG edit ID (see talk page message comments)
 * diff - Diff URL
 * old_id - Old wikipedia revision ID
 * new_id - New wikipedia revision ID
 * -Live: - NOTE THESE DO NOT CHECK PRE/POST PROCESSING STUFF JUST THE CORE OUTPUT
 * |- Check a wikipedia id against the core
 * `- http://api.cluebot.cluenet.org/?action=live.edit
 * `- Accepts the following arguments:
 * article - Article the edit is in
 * diff - Diff ID of the edit
 * -Live: - NOTE THESE DO NOT CHECK PRE/POST PROCESSING STUFF JUST THE CORE OUTPUT
 * |- Check a wikipedia id against the core
 * `- http://api.cluebot.cluenet.org/?action=live.edit
 * `- Accepts the following arguments:
 * article - Article the edit is in
 * diff - Diff ID of the edit
 * diff - Diff ID of the edit

help
Help returns a human readable list of available actions/parameters wrapped in a "Help" element. The output is the same as listed under User:ClueBot_NG/API.