mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-08 03:34:02 +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 {
|
sub disable_caching {
|
||||||
my ($response) = @_;
|
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");
|
$response->push_header("Expires", "Sat, 26 Jul 1997 05:00:00 GMT");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -427,50 +427,50 @@ sub web_brmstatus_json {
|
||||||
|
|
||||||
$response->content(<<EOT
|
$response->content(<<EOT
|
||||||
{
|
{
|
||||||
"api": "0.13",
|
"api": "0.13",
|
||||||
"space": "brmlab",
|
"space": "brmlab",
|
||||||
"logo": "http://brmlab.cz/_media/brmlab.png?w=256",
|
"logo": "http://brmlab.cz/_media/brmlab.png?w=256",
|
||||||
"url": "http://brmlab.cz",
|
"url": "http://brmlab.cz",
|
||||||
"location": {
|
"location": {
|
||||||
"lat": 50.0984614,
|
"lat": 50.0984614,
|
||||||
"lon": 14.4369158,
|
"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",
|
"address": "Bubenska 1477/1, 170 00 Praha 7, Czech republic",
|
||||||
"stream": {
|
"stream": {
|
||||||
"mpeg": "http://brmlab.cz/stream.flv"
|
"mpeg": "http://brmlab.cz/stream.flv"
|
||||||
},
|
},
|
||||||
|
"open":${\($status ? 'true' : 'false')},
|
||||||
|
"lastchange":$laststchange,
|
||||||
|
"state": {
|
||||||
"open":${\($status ? 'true' : 'false')},
|
"open":${\($status ? 'true' : 'false')},
|
||||||
"lastchange":$laststchange,
|
"lastchange":$laststchange,
|
||||||
"status": {
|
"message": ${\($status ? 'true' : 'false')},
|
||||||
"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": {
|
"icon": {
|
||||||
"open": "https://brmlab.cz/status-open-icon.png",
|
"open": "https://brmlab.cz/status-open-icon.png",
|
||||||
"closed": "https://brmlab.cz/status-closed-icon.png"
|
"closed": "https://brmlab.cz/status-closed-icon.png"
|
||||||
},
|
}
|
||||||
"contact": {
|
},
|
||||||
"phone": "+420608801582",
|
"icon": {
|
||||||
"twitter": "\@brmlab",
|
"open": "https://brmlab.cz/status-open-icon.png",
|
||||||
"ml": "brmlab\@brmlab.cz",
|
"closed": "https://brmlab.cz/status-closed-icon.png"
|
||||||
"issue-mail": "rada\@brmlab.cz",
|
},
|
||||||
"irc": "irc://freenode/#brmlab",
|
"contact": {
|
||||||
"facebook": "brmlab"
|
"phone": "+420608801582",
|
||||||
},
|
"twitter": "\@brmlab",
|
||||||
"issue-report-channels": [
|
"ml": "brmlab\@brmlab.cz",
|
||||||
"issue-mail"
|
"issue-mail": "rada\@brmlab.cz",
|
||||||
],
|
|
||||||
"irc": "irc://freenode/#brmlab",
|
"irc": "irc://freenode/#brmlab",
|
||||||
"feeds": [
|
"facebook": "brmlab"
|
||||||
{ "name": "blog", "type": "application/rss+xml", "url": "http://soup.brmlab.cz/rss" }
|
},
|
||||||
|
"issue-report-channels": [
|
||||||
|
"issue-mail"
|
||||||
|
],
|
||||||
|
"irc": "irc://freenode/#brmlab",
|
||||||
|
"feeds": [
|
||||||
|
{ "name": "blog", "type": "application/rss+xml", "url": "http://soup.brmlab.cz/rss" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue