Jump to content

User:ClueBot NG/API

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

|-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&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&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&gegKeys=key1:key2:...:keyN
`-Help:
  `-help - Get help documentation
    |- http://cluebotreview.g.cluenet.org/api?help
    `- http://cluebotreview.g.cluenet.org/api

Methods

Users

listUsers

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

Acceptable parameters

None

Example output
<API>
<ListUsers>
<UserKey>abc</UserKey>
<UserKey>abc123</UserKey>
</ListUsers>
</API>
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
<API>
<GetUser>
<User>
<Key>uberdooberkey</Key>
<Nick>OVER 9000</Nick>
<Classifications>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

Edits

getEdit

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

EditGroups

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

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#usage usage.

Data API

Usage

ClueBot NG API
 
Options:
format - Output format, valid values are as follows:
- xml
- json
- php (serialize)
- debug (print_r)
 
Methods:
|-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
|
`-Help:
 |- Get module documentation
   `- http://api.cluebot.cluenet.org/?action=help

Methods

Reports

reports.list

Acceptable parameters
Example output
Elements

reports.get

Acceptable parameters
Example output
Elements

Beaten

beaten.list

Acceptable parameters
Example output
Elements

Users

users.list

Acceptable parameters
Example output
Elements

users.get

Acceptable parameters
Example output
Elements

Edits

edits.list

Acceptable parameters
Example output
Elements

edits.get

Acceptable parameters
Example output
Elements

Live

live.edit

Acceptable parameters
Example output
Elements

Help

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#usage_2 usage.