Tom Wright schreef: > Would anyone be opposed to a "partial-content" call in the api that > would return a particular section of a media-wiki page. > This could be provided by adding a "rvpath=" option to the > "prop=revisions" call, that adds a path to a particular session. > > So for example > api.php?action=query&prop=revisions&titles=Telephone&rvprop=timestamp|user|comment|content&rvpath=History.Early%20Development > would return the early development subsection of the history section > of the telephone article. > > One would the need an additional call to return the section tree of a > document, perhaps: > api.php?action=query&prop=revisions&rvprop=sections. > > The motivation behind this would be > (a) To reduce bandwidth use for certain types of queries. > (b) To prevent client programs from having to parse so much html by hand. > > In this could be implemented on the server without too much overhead, > since the section tree could be cached, and needs to be calculated > when rendering a document to create tables of content. > > > Is this a terribly bad idea? > Is this syntax okay? > We kinda already have this. index.php?action=raw&title=Example§ion=2 will return the 2nd section only. Using section=0 will get the top of the article, i.e. the part before the first section header.
Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-api