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", "address": "Bubenska 1477/1, 170 00 Praha 7, Czech republic",
"contact":{ "stream": {
"phone":"+420608801582", "mpeg": "http://brmlab.cz/stream.flv"
"twitter":"\@brmlab",
"facebook":"brmlab",
"ml":"brmlab\@brmlab.cz",
"irc":"irc://freenode/#brmlab"
}, },
"logo":"https://brmlab.cz/_media/brmlab.png?w=256",
"open":${\($status ? 'true' : 'false')}, "open":${\($status ? 'true' : 'false')},
"lastchange":$laststchange, "lastchange":$laststchange,
"feeds":[ "status": {
{"name":"blog","type":"application/rss+xml","url":"https://soup.brmlab.cz/rss"}, "open":${\($status ? 'true' : 'false')},
"lastchange":$laststchange,
"message": "open",
"icon": {
"open": "https://brmlab.cz/status-open-icon.png",
"closed": "https://brmlab.cz/status-closed-icon.png"
}
},
"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"
], ],
"lat":37.0625, "irc": "irc://freenode/#brmlab",
"lon":-95.67706 "feeds": [
{ "name": "blog", "type": "application/rss+xml", "url": "http://soup.brmlab.cz/rss" }
]
} }
EOT EOT
); );