Is it possible to add my own rvprop=... for prop=revisions?

View: New views
2 Messages — Rating Filter:   Alert me  

Is it possible to add my own rvprop=... for prop=revisions?

by Andrew Dunbar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I know a MediaWiki extension can add its own api.php action=... but
can I add my own rvprop=... for action=query&prop=revisions?

I'd like to experient with creating some Wiktionary-specific APIs that
can parse the article format and return grammatical information on
words.

Andrew Dunbar (hippietrail)

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@...
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Parent Message unknown Re: Is it possible to add my own rvprop=... for prop=revisions?

by Roan Kattouw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

---- Andrew Dunbar <hippytrail@...> schrijft:
> I know a MediaWiki extension can add its own api.php action=... but
> can I add my own rvprop=... for action=query&prop=revisions?
>
> I'd like to experient with creating some Wiktionary-specific APIs that
> can parse the article format and return grammatical information on
> words.
>
That's kind of non-standard, but it's probably doable. What you want to do is subclass ApiQueryRevisions [1], override whichever function is responsible for what you want to add to, and set $wgAPIPropModules['revisions'] = 'MyClass'; Hint: use parent::methodName() instead of duplicating core code.

Roan Kattouw (Catrope)

[1] http://svn.wikimedia.org/doc/classApiQueryRevisions.html

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@...
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
LightInTheBox - Buy quality products at wholesale price!