mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-07 19:24:01 +02:00
status -> state, cache-control
JSON compliant to the specs 0.13, 0.12, 0.11, 0.9, 0.8 spaceapi
This commit is contained in:
parent
3aecb5f7c5
commit
dfaa084f1b
1 changed files with 40 additions and 40 deletions
80
brmd/brmd.pl
80
brmd/brmd.pl
|
@ -325,7 +325,7 @@ sub register {
|
|||
|
||||
sub disable_caching {
|
||||
my ($response) = @_;
|
||||
$response->push_header("Cache-Control", "no-cache, must-revalidate");
|
||||
$response->push_header("Cache-Control", "no-cache");
|
||||
$response->push_header("Expires", "Sat, 26 Jul 1997 05:00:00 GMT");
|
||||
}
|
||||
|
||||
|
@ -427,50 +427,50 @@ sub web_brmstatus_json {
|
|||
|
||||
$response->content(<<EOT
|
||||
{
|
||||
"api": "0.13",
|
||||
"space": "brmlab",
|
||||
"logo": "http://brmlab.cz/_media/brmlab.png?w=256",
|
||||
"url": "http://brmlab.cz",
|
||||
"location": {
|
||||
"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",
|
||||
"stream": {
|
||||
"mpeg": "http://brmlab.cz/stream.flv"
|
||||
},
|
||||
"api": "0.13",
|
||||
"space": "brmlab",
|
||||
"logo": "http://brmlab.cz/_media/brmlab.png?w=256",
|
||||
"url": "http://brmlab.cz",
|
||||
"location": {
|
||||
"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",
|
||||
"stream": {
|
||||
"mpeg": "http://brmlab.cz/stream.flv"
|
||||
},
|
||||
"open":${\($status ? 'true' : 'false')},
|
||||
"lastchange":$laststchange,
|
||||
"state": {
|
||||
"open":${\($status ? 'true' : 'false')},
|
||||
"lastchange":$laststchange,
|
||||
"status": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"message": ${\($status ? 'true' : 'false')},
|
||||
"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"
|
||||
],
|
||||
"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",
|
||||
"feeds": [
|
||||
{ "name": "blog", "type": "application/rss+xml", "url": "http://soup.brmlab.cz/rss" }
|
||||
"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
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue