On Wed, Apr 16, 2008 at 8:10 PM, Manos Batsis
<manos_lists(a)geekologue.com> wrote:
Roan Kattouw wrote:
Yuri Astrakhan schreef:
Can you use callback=MyMethod JSON call
parameter?
Example:
http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop…
<http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces&format=jsonfm&callback=MyFunction>
Do you mean like a class method? I don't know, but you can always use a
wrapper function, can't you?
Doing something like callback=Sarissa.test works fine; it's just a param
value for the php code, dots are ok. Furthermore, i guessed some of my
code may need to handle anonymous functions so, just to test the API, i
tried "naming" them with the weirdest way i could think of, e.g.
window["tmpFunction1"] = functionObject;
And then pass that to the API like
url+"&callback=" +
encodeURIComponent("window['tmpFunction1']")
That works as well.
hth,
Manos
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
The allowed characters are ][.'"_A-Za-z0-9
Bryan