-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsection_minimal_example.php
118 lines (110 loc) · 2.85 KB
/
section_minimal_example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
//$page->addContent("<h2>Minimal Example</h2>");
$html = <<<HTML
<pre class="spaceapi-box documentation-example-minimal"><code>{
"api": "0.13",
"space": "Slopspace",
"logo": "http://your-space.org/img/logo.png",
"url": "http://your-space.org",
"location": {
"address": "Ulmer Strasse 255, 70327 Stuttgart, Germany",
"lon": 9.236,
"lat": 48.777
},
"contact": {
"twitter": "@spaceapi"
},
"issue_report_channels": [
"twitter"
],
"state": {
"open": true
}
}
</code></pre>
<pre class="spaceapi-box documentation-example-cache-projects"><code>{
/* put here all the fields from the minimal example */
...
"projects": [
"http://github.com/spaceapi",
"http://wiki.example.com"
],
"cache": {
"schedule": "m.02"
}
}
</code></pre>
<pre class="spaceapi-box documentation-example-feeds"><code>{
/* put here all the fields from the minimal example */
...
"feeds": {
"blog": {
"type": "application/rss+xml",
"url": "https://example.com/feed/"
},
"calendar": {
"type": "text/calendar",
"url": "https://example.com/events.ics"
}
}
}
</code></pre>
<pre class="spaceapi-box documentation-example-radio-show"><code>{
/* put here all the fields from the minimal example */
...
"radio_show": [
{
"name": "Signal",
"url": "http://signal.hackerspaces.org:8090/signal.mp3",
"type": "mp3",
"start": "2013-06-10T12:00+02:00",
"end": "2013-06-10T13:00+02:00"
},
{
"name": "Random",
"url": "http://85.214.64.213:8060/;",
"type": "mp3",
"start": "2013-06-13T09:00+02:00",
"end": "2013-06-13T12:00+02:00"
}
]
}
</code></pre>
<pre class="spaceapi-box documentation-example-sensors"><code>{
/* put here all the fields from the minimal example */
...
"sensors" : {
"temperature": [
{
"value" : 3,
"unit" : "°C",
"location" : "Outside",
"name" : "Roof"
},
{
"value" : 3,
"unit" : "°C",
"location" : "Room 1",
"name" : "Corner 1"
},
{
"value" : 3,
"unit" : "°C",
"location" : "Room 1",
"name" : "Corner 2"
}
],
"ext_spiff_diff" : [ /* unofficial extension */
{
"value" : 32,
"unit" : "spdf",
"location" : "locker1",
"name" : "asdf"
}
]
}
}
</code></pre>
HTML;
$page->addContent($html);
unset($html);