API:Usercontribs
From MediaWiki.org
This page is part of the MediaWiki API documentation. |
Language: | English • polski |
---|
Quick overview:
- Quick start guide
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Search suggestions
- 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
MediaWiki version: | = 1.10 |
Gets a list of contributions made by a given user, ordered by modification time. This module cannot be used as a generator.
Parameters[edit | edit source]
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
ucstart
: The timestamp to start listing from (see API:Data formats#Timestamps)ucend
: The timestamp to end listing at (see API:Data formats#Timestamps)uccontinue
: When more results are available, use this to continueucdir
: Direction to list inolder
: List newest contributions first (default). Note:ucstart
has to be later thanucend
.- If using
ucuserprefix
, users will be listed in descending order (Z to A)
- If using
newer
: List oldest contributions first. Note:ucstart
has to be beforeucend
.- If using
ucuserprefix
, users will be listed in ascending order (A to Z)
- If using
uclimit
: Maximum amount of contributions to list (10 by default)ucnamespace
: Only list contributions in these namespaces (numeric value)ucshow
: Only list contributions that meet these criteria. Conflicting options (such asminor
and!minor
) cannot be used togetherminor
: Only list minor edits!minor
: Don't list minor editspatrolled
: Only list patrolled edits. Only available to users with thepatrol
right!patrolled
: Only list non-patrolled edits. Only available to users with thepatrol
right- If
patrolled
or!patrolled
is used, revisions older than $wgRCMaxAge will not be shown.
- If
ucprop
: Which properties to getids
: 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 commentsize
: Size of the editsizediff
: Size delta between the edit and its parentpatrolled
: Whether the change is patrolled. Only available to users with thepatrol
rightflags
:new
: A new page was createdminor
: The change was a minor editbot
: The change was a bot edittop
: This is the latest version of the article
tags
: List of tags for the edit
Example[edit | edit source]
Get the first three contributions by en:User:Catrope
Result |
---|
The following content has been placed in a collapsed box for improved usability. |
<?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> |
The above content has been placed in a collapsed box for improved usability. |
Error Codes[edit | edit source]
- code: ucparam_user
- info: User name username is not valid
- code: ucparam_user
- info: User parameter may not be empty
- code: ucshow
- info: Incorrect parameter - mutually exclusive values may not be supplied
- code: permissiondenied
- info: You need the patrol right to request the patrolled flag