API:Usercontribs
From MediaWiki.org
| Language: | English • polski • 中文 |
|---|
| Usercontribs | ||
|---|---|---|
This module cannot be used as a Generator. |
||
| Prefix | uc | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
| This page is part of the MediaWiki action API documentation. |
MediaWiki action API
- Introduction and quick start
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Searching (by title, content, coordinates...)
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
Gets a list of contributions made by a given user, ordered by modification time. This module cannot be used as a generator.
Version notes: Prior to MW 1.14, the start parameter was used to continue. Between 1.14 and 1.22, start was used as a continue for single-user mode; continue was used as a continue for multi-user mode. From 1.23 forwards, continue is the only continue parameter.
Contents
Parameters[edit | edit source]
uclimit: Maximum amount of contributions to list No more than 500 (5000 for bots) allowed. (Default: 10)ucstart: The timestamp to start listing from (see API:Data formats#Timestamps). Also seeucdirbelow for more information.ucend: The timestamp to end listing at (see API:Data formats#Timestamps). Also seeucdirbelow for more information.uccontinue: When more results are available, use this to continue. 1.14+ucuser: Users to retrieve contributions forucuserprefix: List contributions of all users whose name starts with this string. Overridesucuser. This is useful for getting contributions of IP ranges. Note that contributions will be sorted by user first, then by timestamp, when using this option. 1.13+ucdir: Direction to list in. (Default:older)older: List newest contributions first. If there are multiple users, they will be listed in descending order (Z to A). Note:ucstarthas to be earlier thanucendnewer: List oldest contributions first. If there are multiple users, they will be listed in ascending order (A to Z). Note:ucstarthas to be later thanucend.
ucnamespace: Only list contributions in these namespaces (pipe-separated numeric values). 1.11+ucprop: Which properties to get. (Default:ids|title|timestamp|comment|size|flags) 1.11+ids: Page ID and revision ID. Starting in MediaWiki 1.22 this will also include the parent revision's id.title: Title of the page that was changedtimestamp: Time and date of the contributioncomment: Edit/log commentparsedcomment: Parsed edit/log comment 1.16+size: Size of the edit 1.16+sizediff: Size delta between the edit and its parent 1.20+flags: Flags that apply to the edit (note that thebotflag is not included, it is only available through API:Recentchanges):new: A new page was createdminor: The change was a minor edittop: This is the latest version of the article
patrolled: Whether the change is patrolled. Only available to users with thepatrolright 1.15+tags: List of tags for the edit 1.16+
ucshow: Only list contributions that meet these criteria. Conflicting options (such asminorand!minor) cannot be used together. Note: Ifpatrolledor!patrolledare used, revisions older than $wgRCMaxAge will not be shown. 1.11+minor: Only list minor edits!minor: Don't list minor editspatrolled: Only list patrolled edits. Only available to users with thepatrolright 1.15+!patrolled: Only list non-patrolled edits. Only available to users with thepatrolright 1.15+top: Only list top (latest) edits. 1.23+!top: Only list non-top edits. 1.23+new: Only list page creations. 1.23+!new: Don't list page creations. 1.23+
uctag: Only list revisions tagged with this tag 1.16+uctoponly: Only show top edits (deprecated in favor of ucshow=top) 1.18+ (deprecated in 1.23)
Example[edit | edit source]
Get the first three contributions by en:User:Catrope
| Result |
|---|
<?xml version="1.0" encoding="utf-8"?>
<api>
<query-continue>
<usercontribs ucstart="2007-06-11T09:23:57Z" />
</query-continue>
<query>
<usercontribs>
<item
user="Catrope" pageid="11650099" revid="136629050"
ns="3" title="User talk:Catrope" timestamp="2007-06-07T16:45:30Z"
minor="" comment="Creation; directing to BW"
/>
<item
user="Catrope" pageid="11650100" revid="136629120"
ns="2" title="User:Catrope" timestamp="2007-06-07T16:45:49Z"
new="" minor="" comment="Creation; directing to BW"
/>
<item
user="Catrope" pageid="3383874" revid="136629407"
ns="3" title="User talk:Ruud Koot" timestamp="2007-06-07T16:47:09Z"
comment="Nested collapsible tables fix"
/>
</usercontribs>
</query>
</api>
|
Error Codes[edit | edit source]
| Code | Info |
|---|---|
| ucparam_user | User name username is not valid |
| ucparam_user | User parameter may not be empty |
| ucshow | Incorrect parameter - mutually exclusive values may not be supplied |
| permissiondenied | You need the patrol right to request the patrolled flag |
See also[edit | edit source]
- API:Logevents (to get the user's uploads for example)