Page Menu
Home
Wolfplex
Search
Configure Global Search
Log In
Files
F408809
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
View Options
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..c2fde38
--- /dev/null
+++ b/index.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Wolfplex API</title>
+ <link rel="Stylesheet" href="http://www.wolfplex.org/css/sandbox.css" type="text/css" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<div id="SandBox"></div>
+<div id="Items">
+<p>[ <a href="/space">Space API</a> | <a href="http://www.wolfplex.org/wiki/API">API Documentation</a> ]</p>
+<p>Welcome to the Wolfplex API.<br />This domain serves JSON documents and handles API requests.</p>
+</div>
+</body>
+</html>
diff --git a/space/index.php b/space/index.php
new file mode 100755
index 0000000..3abf7d5
--- /dev/null
+++ b/space/index.php
@@ -0,0 +1,88 @@
+<?php
+include("../_includes/CommonData.php");
+include("../_includes/HackerspaceOpenStatus.php");
+
+$status = get_hackerspace_open_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'],
+ ]
+ ],
+
+/*
+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',
+ ]
+
+If we stream something:
+ '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
+ ],
+ //...
+ ]
+ */
+];
+
+echo json_encode($document);
+
+?>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jun 13, 8:34 PM (5 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
46214
Default Alt Text
(3 KB)
Attached To
rAPI Wolfplex API
Event Timeline
Log In to Comment