On 28.03.2011, 19:39 SALIL wrote:
I was planning to make an api sandbox for mediawiki as
a part of gsoc 2011.
while going through mediawiki documentation, i found
that many functions
needed POST rather than GET requests. i am planning for flickr like api
in flickr the documentation of every method has a link to api explorer
(sandbox) where user can test different values for each parameter and the
result is displayed in a div in the same page.
media wiki sandbox will display available parameters
that can be used for a
particular method (drop-down if the values are previously known). the user
can fill the forms with his own values. the api then will send a GET or POST
request (AJAX request) according to the scenario (using JQuery or some other
JS library) and display the results in a div in the same page. the page
shall also display a url for executing the same ajax request.
to make the api sandbox really useful, it ideally
should have automatic php
code generation too ( i don't know if it is overambitious ). for example for
login and logout, user can just give his userid and password and the code he
would write for php is automatically displayed.
Since this project wasn't accepted for GSoC, I decided to do it
myself. Although there is still some work to do, it's already in
extensions/ApiSandbox and awaits your comments, suggestions and bashing:)
Description page is at http://www.mediawiki.org/wiki/Extension:ApiSandbox
Max Semenik ([[User:MaxSem]])