Page Menu
Home
Wolfplex
Search
Configure Global Search
Log In
Files
F408378
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Subscribers
None
View Options
diff --git a/space/index.php b/space/index.php
old mode 100755
new mode 100644
index 4b6d2ba..11654f1
--- a/space/index.php
+++ b/space/index.php
@@ -1,98 +1,98 @@
<?php
/**
* Wolfplex API - Space API implementation
*/
include("../_includes/CommonData.php");
include("../_includes/HackerspaceOpenStatus.php");
$status = new MediaWikiHackerspaceOpenStatus(
- 'http://www.wolfplex.be/w/api.php',
- 'Template:IsOpen/status'
+ 'http://www.wolfplex.be/w/api.php',
+ 'Template:IsOpen/status'
);
$document = [
- 'api' => '0.13',
- 'cache' => [
- 'schedule' => 'm.02', //Cache duration: 2 minutes
- ],
- 'space' => $HackerspaceData['name'],
- 'logo' => $HackerspaceData['logo']['default'],
- 'url' => $HackerspaceData['URL']['default'],
- 'location' => [
- 'address' => $HackerspaceData['places']['space']['address'],
- 'lat' => $HackerspaceData['places']['space']['coords'][0],
- 'lon' => $HackerspaceData['places']['space']['coords'][1],
- ],
- 'spacefed' => [
- 'spacenet' => false,
- 'spacesaml' => false,
- 'spacephone' => false,
- ],
- 'state' => [
- 'open' => $status->IsOpen(),
- 'lastchange' => $status->date,
- 'trigger_person' => $status->who,
- 'message' => $status->comment,
- ],
- 'contact' => [
- 'irc' => $HackerspaceData['URL']['IRC'],
- 'twitter' => $HackerspaceData['accounts']['twitter'],
- 'foursquare' => $HackerspaceData['accounts']['foursquare'],
- 'ml' => $HackerspaceData['lists']['default'],
- 'email' => $HackerspaceData['mail']['contact'],
- 'issue_mail' => base64_encode('spike@wolfplex.home.kg'),
- ],
- 'issue_report_channels' => [
- 'twitter',
- 'issue_mail',
- ],
- 'projects' => [
- $HackerspaceData['URL']['projects'],
- $HackerspaceData['URL']['github'],
- $HackerspaceData['URL']['bitbucket'],
- ],
- 'feeds' => [
- 'wiki' => [
- 'type' => 'atom',
- 'url' => $HackerspaceData['URL']['wikiRecentChangesFeed'],
- ]
- ],
+ 'api' => '0.13',
+ 'cache' => [
+ 'schedule' => 'm.02', //Cache duration: 2 minutes
+ ],
+ 'space' => $HackerspaceData['name'],
+ 'logo' => $HackerspaceData['logo']['default'],
+ 'url' => $HackerspaceData['URL']['default'],
+ 'location' => [
+ 'address' => $HackerspaceData['places']['space']['address'],
+ 'lat' => $HackerspaceData['places']['space']['coords'][0],
+ 'lon' => $HackerspaceData['places']['space']['coords'][1],
+ ],
+ 'spacefed' => [
+ 'spacenet' => false,
+ 'spacesaml' => false,
+ 'spacephone' => false,
+ ],
+ 'state' => [
+ 'open' => $status->IsOpen(),
+ 'lastchange' => $status->date,
+ 'trigger_person' => $status->who,
+ 'message' => $status->comment,
+ ],
+ 'contact' => [
+ 'irc' => $HackerspaceData['URL']['IRC'],
+ 'twitter' => $HackerspaceData['accounts']['twitter'],
+ 'foursquare' => $HackerspaceData['accounts']['foursquare'],
+ 'ml' => $HackerspaceData['lists']['default'],
+ 'email' => $HackerspaceData['mail']['contact'],
+ 'issue_mail' => base64_encode('spike@wolfplex.home.kg'),
+ ],
+ 'issue_report_channels' => [
+ 'twitter',
+ 'issue_mail',
+ ],
+ 'projects' => [
+ $HackerspaceData['URL']['projects'],
+ $HackerspaceData['URL']['github'],
+ $HackerspaceData['URL']['bitbucket'],
+ ],
+ 'feeds' => [
+ 'wiki' => [
+ 'type' => 'atom',
+ 'url' => $HackerspaceData['URL']['wikiRecentChangesFeed'],
+ ]
+ ],
/*
We can add sensors information (e.g. temperature, humidity, amount of Club-Mate left, …).
See http://spaceapi.net/documentation#documentation-ref-13-root-sensors.
If we add webcam feeds:
- 'cam' => [
- 'URL1',
- 'URL2',
- ]
+ 'cam' => [
+ 'URL1',
+ 'URL2',
+ ]
If we stream something:
- 'stream' => [
- 'm4' => '',
- 'mjpeg' => '',
- 'ustream' => '',
- 'ext_OURFORMAT' => '',
- 'ext_OURFORMAT2' => '', //should be prefixed with ext_
- ]
+ 'stream' => [
+ 'm4' => '',
+ 'mjpeg' => '',
+ 'ustream' => '',
+ 'ext_OURFORMAT' => '',
+ 'ext_OURFORMAT2' => '', //should be prefixed with ext_
+ ]
If we want to share events:
- 'events' => [
- [
- 'name' => '', //Name or other identity of the subject (e.g. J. Random Hacker, fridge, 3D printer, …)
- 'type' => '', //check-in, check-out, finish-print, …
- 'timestamp' => time(), //unixtime
- 'extra' => '', //more info
- ],
- //...
- ]
+ 'events' => [
+ [
+ 'name' => '', //Name or other identity of the subject (e.g. J. Random Hacker, fridge, 3D printer, …)
+ 'type' => '', //check-in, check-out, finish-print, …
+ 'timestamp' => time(), //unixtime
+ 'extra' => '', //more info
+ ],
+ //...
+ ]
*/
];
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
header('Cache-Control: max-age=120, must-revalidate');
echo json_encode($document, JSON_PRETTY_PRINT);
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Jun 9, 11:57 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
46361
Default Alt Text
(4 KB)
Attached To
rAPI Wolfplex API
Event Timeline
Log In to Comment