api.php should be able to load only a section of wikitext of a page
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
bzimport
Subscribers
wikibugs-l
Projects
Reference
bz11353
Description

Author: alistrius

Description:
hello,

it should be very useful that api.php can load only a section of wikitext like index.php can do :

index.php?title=titleOfThePage&action=edit&section=nSection

something like

action=query&prop=revisions&rvprop=content&titles=wgTitle&section=nSection ?


Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-API.Via ConduitNov 21 2014, 10:00 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz11353.
bzimport created this task.Via LegacySep 15 2007, 7:18 PM
bzimport added a comment.Via ConduitSep 20 2007, 8:20 PM

cannon.danielc wrote:

This could be quite problematic when loading content from a page's revisions over time. In particular, section numbers are determined based upon the placement of the sections within the current revision. In previous revisions, the section referred to may not exist or there may have been other sections previous to it that would effect the numbering of the section. For one revision, this should be do-able; however, I think it's best implemented not as a feature of the API but rather as a function of "action=raw". For instance, http://en.wikipedia.org/w/index.php?title=Chad&action=raw&section=1 (which doesn't work at the moment) could provide you with the contents of the "History" section.

bzimport added a comment.Via ConduitSep 26 2007, 5:24 AM

cannon.danielc wrote:

Committed r26142 which enables the retrieval of the raw content of a section of a page via action=raw; e.g. http://en.wikipedia.org/w/index.php?title=Chad&action=raw&section=1 now works. I think this should suffice.

bzimport added a comment.Via ConduitSep 26 2007, 4:12 PM

alistrius wrote:

the raw fits my need perfectly (absolutely nothing to strip above all) so it's even better than i expected with api.php, thanks.(In reply to comment #2)

Committed r26142 which enables the retrieval of the raw content of a section of
a page via action=raw; e.g.
http://en.wikipedia.org/w/index.php?title=Chad&action=raw&section=1 now works.
I think this should suffice.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.