API: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
Jacobolus (talk | contribs)
Revert to the revision prior to revision 22874674 dated 2022-02-22 05:23:35 by Ogmommy3 using popups
Tag: Manual revert
 
(157 intermediate revisions by 26 users not shown)
Line 1: Line 1:
{{MovedToMediaWiki|API}}
I was not able to find a list of suggested API functions for retrieving Information via SOAP/WHATEVER. If you find one that already exists, please delete this page. If you consider meta inappropriete for this kind of page, please delete it. Or move it to my user name subpage. If you feel offended by the pseudo-syntax or naming of these functions, alter them unless they are beyond repair. Thanks.


Moved preserving full histories. '''[[User:Robchurch|robchurch]]''' | [[User_talk:Robchurch|talk]] 07:09, 14 May 2007 (UTC)
=== Data Retrieval ===

==== Articles ====

:'''article_mw''' ( string lemma )

article_mw() returns a single article from a wiki in the original Mediawiki syntax

:'''article_xml''' ( string lemma )

article_xml returns a single article from a wiki in xml output

:'''article_section_mw''' ( string lemma, int section)

returns a single section from a single article from a wiki in the original mediawiki syntax. section is the same as section in the [http://en.wikipedia.org/w/index.php?title=Wikipedia&action=edit&section=14 edit option]

==== Search ====

* list of articles that contain string query
* size of an article (chars, bytes, words)
* list of authors of an article (ugly to compute when it comes to articles with 1000+ revisions)

==Wikimania API discussion==
[[Image:Wikimedia hacking days 2006 API discussion whiteboard.jpeg|thumb|The whiteboard these notes were taken from]]
===Basic needs===
* login
** in: username, passwd, [[API key]]
** out: success or auth failure or temp failure

Dates need to be in UTC
Dates need to be ISO 8601
Date = 0 means current revision

* readrevision
** out: -return speacial:Export and preferably metadata about redirect
** in: - article title or revision ID or page ID

* readhistory
** in: artile title or pageID, rangestart, +- limit
:: range can be, ISO date or timestamp, if negative rangestart, fetch last rangestartrevisions bounded by a maximum amount of revisions: currently: 5000
::always return up to 5000 revisions
** out: export xml metadata (see readrevision)

* writeArticle
** in: lastRevisionID or 0, pagetext, pagetitle, comment, minor
** out: success(versionID), edit conflict fail, permission failure, temp failure

Latest revision as of 06:02, 22 February 2022

Moved preserving full histories. robchurch | talk 07:09, 14 May 2007 (UTC)[reply]