Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 34 additions & 29 deletions roomstatus/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,43 +150,48 @@ def spaceapi(request):
lastchange = calendar.timegm(currentDoorstate.start.timetuple())

data = {
'api': '0.12',
'api': '0.13',
'space': 'Embassy of Nerdistan',
'logo': site % '/static/Embassy.png',
'icon': {
'open': site % '/static/icon-open.png',
'closed': site % '/static/icon-closed.png'},
'url': site % reverse('embassyweb.views.index'),
'open': isOpen,
'status': status,
'lastchange': lastchange,

'address': 'Embassy of Nerdistan, AUCOOP Bremen e.V., '\
'Weberstrasze 18, 28203 Bremen, Germany',
'lat': 53.07208,
'lon': 8.82183,
'state': {
'open': isOpen,
'lastchange': lastchange,
'message': status,
'icon': {
'open': site % '/static/icon-open.png',
'closed': site % '/static/icon-closed.png',
},
},
'location': {
'address': 'Embassy of Nerdistan, AUCOOP Bremen e.V., '\
'Weberstrasze 18, 28203 Bremen, Germany',
'lat': 53.07208,
'lon': 8.82183,
},
'contact': {
'twitter': '@embassyof',
'email': 'vorstand..ccchb.de',
'email': 'vorstand@ccchb.de',
'irc': 'irc://chat.freenode.net/#embassyof',
'ml': 'ccc@lists.erleuchtet.org',
'ml': 'ccc@lists.ccchb.org',
},
'feeds': [
{
'name': 'blog',
'type': 'application/rss+xml',
'url': site % reverse('feed-rss')},
{
'name': 'blog',
'type': 'application/atom+xml',
'url': site % reverse('feed-atom')},
{
'name': 'calendar',
'type': 'text/calendar',
'url': 'http://ccchb.de/CCCHB-Kalender.ics'},
],
'issue_report_channels': ['ml'],
'feeds': {
'blog': {
'type': 'application/atom+xml',
'url': site % reverse('feed-atom'),
},
'wiki': {
'type': 'application/atom+xml',
'url': 'http://ccchb.de/w/index.php?title=Spezial:Letzte_Änderungen&feed=atom',
},
'calendar': {
'type': 'text/calendar',
'url': 'http://ccchb.de/CCCHB-Kalender.ics',
},
},
'sensors': {
'leases': leases,
'network_connections': leases,
},
}
response = HttpResponse(json.dumps(data,
Expand Down