MediaWiki API ヘルプ
ãã®ãã¼ã¸ã¯èªåçæããã MediaWiki API ã®èª¬æææ¸ãã¼ã¸ã§ãã
èª¬æææ¸ã¨ä¾: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
prop=revisions (rv)
- ãã®ã¢ã¸ã¥ã¼ã«ã¯èªã¿åãã®æ¨©éãå¿ è¦ã¨ãã¾ãã
- ãã®ã¢ã¸ã¥ã¼ã«ã¯ã¸ã§ãã¬ã¼ã¿ã¼ã¨ãã¦ä½¿ç¨ã§ãã¾ãã
- ã½ã¼ã¹: MediaWiki
- ã©ã¤ã»ã³ã¹: GPL-2.0-or-later
çã®æ å ±ãåå¾ãã¾ãã
May be used in several ways:
- Get data about a set of pages (last revision), by setting titles or pageids.
- Get revisions for one given page, by using titles or pageids with start, end, or limit.
- Get data about a set of revisions by setting their IDs with revids.
- rvprop
Which properties to get for each revision:
- ids
- çã®IDã
- flags
- Revision flags (minor).
- timestamp
- çã®ã¿ã¤ã ã¹ã¿ã³ãã
- user
- ãã®çã使ããå©ç¨è ã
- userid
- ãã®çã®ä½æè ã®å©ç¨è IDã
- size
- ãã®çã®é·ã (ãã¤ã) ã
- slotsize
- Length (bytes) of each revision slot.
- sha1
- SHA-1 (base 16) of the revision. If the content has been revision deleted, a sha1hidden property will be returned.
- slotsha1
- SHA-1 (base 16) of each revision slot. If the content has been revision deleted, a sha1hidden property will be returned.
- contentmodel
- Content model ID of each revision slot.
- comment
- ãã®çã®å©ç¨è ã«ããã³ã¡ã³ãã
- parsedcomment
- ãã®çã®å©ç¨è ã«ãããæ§æè§£æãããã³ã¡ã³ãã
- content
- åãªãã¸ã§ã³ã¹ãããã®å 容ã
- tags
- ãã®çã®ã¿ã°ã
- roles
- List content slot roles that exist in the revision.
- parsetree
- 廿¢äºå®ã§ãã Use action=expandtemplates or action=parse instead. The XML parse tree of revision content (requires content model
wikitext).
- å¤ (|ãããã¯å¥ã®æååã§åºåã): commentãcontentãcontentmodelãflagsãidsãparsedcommentãrolesãsha1ãsizeãslotsha1ãslotsizeãtagsãtimestampãuserãuseridãparsetree
- Default: ids|timestamp|flags|comment|user
- rvslots
Which revision slots to return data for, when slot-related properties are included in rvprops. If omitted, data from the main slot will be returned in a backwards-compatible format.
- å¤ (|ãããã¯å¥ã®æååã§åºåã): main
- ãã¹ã¦ã®å¤ãæå®ããã«ã¯ã*ãç¨ãã¦ãã ããã
- rvlimit
è¿ãçã®æ°ãå¶éããã
- May only be used with a single page (mode #2).
- å: æ´æ°ã¾ã㯠max
- The value must be between 1 and 500.
- rvexpandtemplates
- 廿¢äºå®ã§ãã
Use action=expandtemplates instead. Expand templates in revision content (requires rvprop=content).
- å: çå½å¤ (詳細)
- rvgeneratexml
- 廿¢äºå®ã§ãã
Use action=expandtemplates or action=parse instead. Generate XML parse tree for revision content (requires rvprop=content).
- å: çå½å¤ (詳細)
- rvparse
- 廿¢äºå®ã§ãã
Use action=parse instead. Parse revision content (requires rvprop=content). For performance reasons, if this option is used, rvlimit is enforced to 1.
- å: çå½å¤ (詳細)
- rvsection
Only retrieve the content of this section number.
- rvdiffto
- 廿¢äºå®ã§ãã
Use action=compare instead. Revision ID to diff each revision to. Use prev, next and cur for the previous, next and current revision respectively.
- rvdifftotext
- 廿¢äºå®ã§ãã
Use action=compare instead. Text to diff each revision to. Only diffs a limited number of revisions. Overrides rvdiffto. If rvsection is set, only that section will be diffed against this text.
- rvdifftotextpst
- 廿¢äºå®ã§ãã
Use action=compare instead. Perform a pre-save transform on the text before diffing it. Only valid when used with rvdifftotext.
- å: çå½å¤ (詳細)
- rvcontentformat
- 廿¢äºå®ã§ãã
Serialization format used for rvdifftotext and expected for output of content.
- å¤ (次ã®å¤ã®ãããã1ã¤): application/jsonãtext/cssãtext/javascriptãtext/plainãtext/x-wiki
- rvstartid
Start enumeration from this revision's timestamp. The revision must exist, but need not belong to this page.
- May only be used with a single page (mode #2).
- å: æ´æ°
- rvendid
Stop enumeration at this revision's timestamp. The revision must exist, but need not belong to this page.
- May only be used with a single page (mode #2).
- å: æ´æ°
- rvstart
From which revision timestamp to start enumeration.
- May only be used with a single page (mode #2).
- Type: timestamp (allowed formats)
- rvend
åæã®çµç¹ã¨ãªãã¿ã¤ã ã¹ã¿ã³ãã
- May only be used with a single page (mode #2).
- Type: timestamp (allowed formats)
- rvdir
åæã®æ¹å:
- newer
- å¤ããã®ãå ã«è¡¨ç¤ºãã¾ããæ³¨æ: rvstart 㯠rvend 以åã§ãªããã°ãªãã¾ããã
- older
- æ°ãããã®ãå ã«è¡¨ç¤ºãã¾ã (æ¢å®)ãæ³¨æ: rvstart 㯠rvend 以éã§ãªããã°ãªãã¾ããã
- May only be used with a single page (mode #2).
- å¤ (次ã®å¤ã®ãããã1ã¤): newerãolder
- Default: older
- rvuser
ãã®å©ç¨è ã«ããçã®ã¿ãçµæã«å«ããã
- May only be used with a single page (mode #2).
- å: å©ç¨è åãIPãã¤ã³ã¿ã¼ã¦ã£ãã®ååï¼ä¾: "prefix>ExampleName"ï¼ããã³ å©ç¨è IDï¼ä¾: #12345ï¼ã®ããããã使ã£ãå©ç¨è
- rvexcludeuser
ãã®å©ç¨è ã«ããçãçµæã«å«ããªãã
- May only be used with a single page (mode #2).
- å: å©ç¨è åãIPãã¤ã³ã¿ã¼ã¦ã£ãã®ååï¼ä¾: "prefix>ExampleName"ï¼ããã³ å©ç¨è IDï¼ä¾: #12345ï¼ã®ããããã使ã£ãå©ç¨è
- rvtag
ãã®ã¿ã°ãä»ä¸ãããçã®ã¿ãä¸è¦§è¡¨ç¤ºããã
- rvtoken
- 廿¢äºå®ã§ãã
Which tokens to obtain for each revision.
- å¤ (|ãããã¯å¥ã®æååã§åºåã): rollback
- rvcontinue
When more results are available, use this to continue.
- ãã¼ã¸API ããã³ Main Page ã®ææ°ã®çã®ãã¼ã¿ã¨æ¬æãåå¾ããã
- api.php?action=query&prop=revisions&titles=API|Main%20Page&rvslots=*&rvprop=timestamp|user|comment|content [ãµã³ãããã¯ã¹ã§éã]
- Main Page ã®ç´è¿ã®5çãåå¾ããã
- api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment [ãµã³ãããã¯ã¹ã§éã]
- Main Page ã®æåã®5çãåå¾ããã
- api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer [ãµã³ãããã¯ã¹ã§éã]
- Main Page ã® 2006-05-01 以éã®æåã®5çãåå¾ããã
- api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer&rvstart=2006-05-01T00:00:00Z [ãµã³ãããã¯ã¹ã§éã]
- Main Page ã®å¿åå©ç¨è 127.0.0.1 以å¤ã«ããæåã®5çãåå¾ããã
- api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvexcludeuser=127.0.0.1 [ãµã³ãããã¯ã¹ã§éã]
- Main Page ã® MediaWiki default ã«ããæåã®5çãåå¾ããã
- api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvuser=MediaWiki%20default [ãµã³ãããã¯ã¹ã§éã]