User:SPage (WMF)/APIExTest
ApiEx
editNow that I've merged [try in ApiSandbox] support in this diff, these should work
{{Project:Sandbox}}
Result |
---|
{
}
|
Damn <translate> tags in result!!
sandbox disabled
editThe above should not show the link because apisandbox=0
(should it be apisandbox=no
) to disable?
OK with TNT?!
editNow try it with the mysterious {{TNT }} in front. From Extension:PageImages:
Sample request:
Result |
---|
{
"query": {
"normalized": [
{
"from": "Lightbox_demo",
"to": "Lightbox demo"
}
],
"pages": {
"162510": {
"pageid": 162510,
"ns": 0,
"title": "Lightbox demo",
"thumbnail": {
"source": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Crystal_Clear_app_korganizer.png/50px-Crystal_Clear_app_korganizer.png",
"width": 50,
"height": 50
},
"pageimage": "Crystal_Clear_app_korganizer.png"
}
}
}
}
|
Try apisandbox=0 disabled parameter with TNT
editTry apisandbox=1 param with TNT
editThis is the default, but force it anyway.
Sample request:
Result |
---|
{
"query": {
"normalized": [
{
"from": "Lightbox_demo",
"to": "Lightbox demo"
}
],
"pages": {
"162510": {
"pageid": 162510,
"ns": 0,
"title": "Lightbox demo",
"thumbnail": {
"source": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Crystal_Clear_app_korganizer.png/50px-Crystal_Clear_app_korganizer.png",
"width": 50,
"height": 50
},
"pageimage": "Crystal_Clear_app_korganizer.png"
}
}
}
}
|
what is the mystery ApiEx/Post ?
editand now with post
{{Project:Sandbox}}
Result | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
, what is this
A different result
|
ApiEx local tests
editOriginally 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
editResult |
---|
{
dummy result
}
|
The above should have View in Sandbox
sandbox disabled
editApiEx with new showSandboxLink=0
The above should not show the link because sandbox=0
(should it be sandbox=no
) to disable?
another
editFrom 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.