Jump to content

User:ClueBot NG/API

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by 2402:800:639c:cb90:a9ea:2d1a:261f:b7d2 (talk) at 17:06, 22 December 2020. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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

[edit]

Usage

[edit]
|-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

[edit]

Users

[edit]

listUsers

[edit]

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

Acceptable parameters
[edit]

None

Example output
[edit]
<API>
<ListUsers>
<UserKey>abc</UserKey>
<UserKey>abc123</UserKey>
</ListUsers>
</API>
Elements
[edit]

UserKey - Contains the users unique identifier within the review interface

getUser

[edit]

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

Acceptable parameters
[edit]

guKeys - Colon seperated list of user keys.

Example output
[edit]
<API>
<GetUser>
<User>
<Key>uberdooberkey</Key>
<Nick>OVER 9000</Nick>
<Classifications>9001</Classifications>
</User>
</GetUser>
</API>
Elements
[edit]

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

[edit]

getEdit

[edit]

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

EditGroups

[edit]

listEditGroups

[edit]

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

Acceptable parameters
[edit]

None

Example output
[edit]
<API>
<listEditGroups>
<EditGroupKey>abc</EditGroupKey>
<EditGroupKey>abc123</EditGroupKey>
</listEditGroups>
</API>
Elements
[edit]

EditGroupKey - Contains the groups unique identifier within the review interface

getEditGroup

[edit]

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

Acceptable parameters
[edit]

gegKeys - Colon seperated list of EditGroup keys.

Example output
[edit]
<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
[edit]

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

[edit]

help

[edit]

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

[edit]

Usage

[edit]
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

[edit]

Reports

[edit]

reports.list

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

reports.get

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

Beaten

[edit]

beaten.list

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

Users

[edit]

users.list

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

users.get

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

Edits

[edit]

edits.list

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

edits.get

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

Live

[edit]

live.edit

[edit]
Acceptable parameters
[edit]
Example output
[edit]
Elements
[edit]

Help

[edit]

help

[edit]

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.