User:SPage (WMF)/APIExTest

From MediaWiki.org
Jump to navigation Jump to search

ApiEx[edit]

Now that I've merged [try in ApiSandbox] support in this diff, these should work

Expand wikitext {{Project:Sandbox}}

Damn <translate> tags in result!!


sandbox disabled[edit]

ApiEx with new apisandbox=0 to disable the [Try in ApiSandbox] link.

The above should not show the link because apisandbox=0 (should it be apisandbox=no) to disable?

OK with TNT?![edit]

Now try it with the mysterious {{TNT}} in front. From Extension:PageImages:

Sample request: Request page image for an article.

Try apisandbox=0 disabled parameter with TNT[edit]

ApiEx with new showSandboxLink=0

Try apisandbox=1 param with TNT[edit]

This is the default, but force it anyway. Sample request: Request page image for an article.

what is the mystery ApiEx/Post ?[edit]

and now with post

| desc=Expand wikitext {{Project:Sandbox}} | p1=action=expandtemplates | p2=text=%7B%7BProject:Sandbox%7D%7D | post=

, what is this | result=

A different result

}}

ApiEx local tests[edit]

Originally these were using User:SPage (WMF)/ApiEx, my mod of {{ApiEx}} to add "[try in Sandbox]

See API:Page info in search results, it's using it.


Default[edit]

basic test invocation

The above should have View in Sandbox

sandbox disabled[edit]

ApiEx with new showSandboxLink=0

The above should not show the link because sandbox=0 (should it be sandbox=no) to disable?

another[edit]

From API:Page info in search results Sample query for pageimages and pageterms properties of Albert Einstein:


Stress tests[edit]

# in API query?[edit]

(can't)

& in query[edit]

& alone doesn't work in the api.php link, what about %26 (URL-encoded value?): Test query with %26 (ampersand):

}

Bug: %26 works in the api.php request, but it's re-de-un-encoded to & in the Special:ApiSandbox URL fragment, and so doesn't work.