spaceapi 0.13 changes prepared for future use

validated in OpenSpaceLint validator http://openspace.slopjong.de/

beware, can possibly break compatibility with applications with
spaceapi 0.12 and older because "status" is string in spaceapi
versions up to 0.12 and object in spaceapi 0.13

http://openspace.slopjong.de/specs/0.13
http://openspace.slopjong.de/specs/changelog
This commit is contained in:
Ruzicka Pavel 2013-02-28 02:51:08 +01:00
parent 992112ce29
commit 3aecb5f7c5

View file

@ -427,29 +427,49 @@ sub web_brmstatus_json {
$response->content(<<EOT $response->content(<<EOT
{ {
"api":"0.12", "api": "0.13",
"space":"brmlab", "space": "brmlab",
"url":"http://brmlab.cz", "logo": "http://brmlab.cz/_media/brmlab.png?w=256",
"icon":{ "url": "http://brmlab.cz",
"open":"https://brmlab.cz/status-open-icon.png", "location": {
"closed":"https://brmlab.cz/status-closed-icon.png" "lat": 50.0984614,
}, "lon": 14.4369158,
"address":"Bubenska 1477/1, 170 00 Praha 7, Czech republic", "address": "Bubenska 1477/1, 170 00 Praha 7, Czech republic"
"contact":{ },
"phone":"+420608801582", "address": "Bubenska 1477/1, 170 00 Praha 7, Czech republic",
"twitter":"\@brmlab", "stream": {
"facebook":"brmlab", "mpeg": "http://brmlab.cz/stream.flv"
"ml":"brmlab\@brmlab.cz", },
"irc":"irc://freenode/#brmlab" "open":${\($status ? 'true' : 'false')},
}, "lastchange":$laststchange,
"logo":"https://brmlab.cz/_media/brmlab.png?w=256", "status": {
"open":${\($status ? 'true' : 'false')}, "open":${\($status ? 'true' : 'false')},
"lastchange":$laststchange, "lastchange":$laststchange,
"feeds":[ "message": "open",
{"name":"blog","type":"application/rss+xml","url":"https://soup.brmlab.cz/rss"}, "icon": {
], "open": "https://brmlab.cz/status-open-icon.png",
"lat":37.0625, "closed": "https://brmlab.cz/status-closed-icon.png"
"lon":-95.67706 }
},
"icon": {
"open": "https://brmlab.cz/status-open-icon.png",
"closed": "https://brmlab.cz/status-closed-icon.png"
},
"contact": {
"phone": "+420608801582",
"twitter": "\@brmlab",
"ml": "brmlab\@brmlab.cz",
"issue-mail": "rada\@brmlab.cz",
"irc": "irc://freenode/#brmlab",
"facebook": "brmlab"
},
"issue-report-channels": [
"issue-mail"
],
"irc": "irc://freenode/#brmlab",
"feeds": [
{ "name": "blog", "type": "application/rss+xml", "url": "http://soup.brmlab.cz/rss" }
]
} }
EOT EOT
); );