Page Menu
Home
Wolfplex
Search
Configure Global Search
Log In
Files
F408439
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Subscribers
None
View Options
diff --git a/README.md b/README.md
index 53f35c8..fbcca45 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,36 @@
Wolfplex API
==========
Space API
---------
-[/space](http://api.wolfplex.org/space)
+[/space](http://api.wolfplex.be/space)
Returns a JSON document compliant with the [Space API](http://spaceapi.net/documentation),
to publish information about the space, and indicate if the space is open or closed.
Pads API
--------
-[/pads](http://api.wolfplex.org/pads)
+[/pads](http://api.wolfplex.be/pads)
Returns a list of the pads on the Wolfplex Etherpad installation
Parameter:
* format=json|raw|txt (default: json) — Output format
Design API
----------
-[/design/kibaone/accents](http://api.wolfplex.org/design/kibaone/accents)
+[/design/kibaone/accents](http://api.wolfplex.be/design/kibaone/accents)
Returns a JSON document with a listing of Kiba One accents.
Format: An array of object, each one having 3 properties:
* name: the accent name
* accent: the background color
* headingColor: the heading color
Homepage
--------
-http://api.wolfplex.org/
+http://api.wolfplex.be/
diff --git a/_includes/CommonData.php b/_includes/CommonData.php
index 8f8499d..b338e9d 100755
--- a/_includes/CommonData.php
+++ b/_includes/CommonData.php
@@ -1,58 +1,58 @@
<?php
/**
* This file provides arrays containing datas about Wolflex and Wolfplex Hackerspace
* Any static field in an API should use these values instead to hardcode them.
*/
//Data related to Wolfplex
$WolfplexData = [
'name' => 'Wolfplex',
'oid' => '1.3.6.1.4.1.37822',
];
//Data related to the hackerspace
$HackerspaceData = [
'name' => 'Wolfplex Hackerspace',
'logo' => [
- 'default' => 'http://www.wolfplex.org/img/logo496.png',
+ 'default' => 'http://www.wolfplex.be/img/logo496.png',
],
'mail' => [
- 'contact' => 'hackerspace@wolfplex.org',
- 'stages' => 'participate@wolfplex.org',
+ 'contact' => 'hackerspace@wolfplex.be',
+ 'stages' => 'participate@wolfplex.be',
],
'places' => [
'siegeSocial' => [
'address' => 'Rue de la Science 14 - 6000 Charleroi - Belgium',
'coords' => [50.4114737, 4.4464617],
],
'space' => [
'address' => '/dev/null',
'coords' => [50.40603, 4.46884], //Station de métro Pensée as temporary coords
//'address' => 'Chaussée de Gilly 18 - 6220 Fleurus - Belgium',
//'coords' => [50.455819, 4.527694], //Lionel place
],
],
'URL' => [
- 'default' => 'http://www.wolfplex.org/',
- 'api' => 'http://api.wolfplex.org',
+ 'default' => 'http://www.wolfplex.be/',
+ 'api' => 'http://api.wolfplex.be',
'bitbucket' => 'http://www.bitbucket.org/wolfplex/',
'github' => 'https://github.com/wolfplex',
- 'intranet' => 'http://www.wolfplex.org/members/',
+ 'intranet' => 'http://www.wolfplex.be/members/',
'IRC' => 'irc://irc.freenode.net/wolfplex/',
'IRCWebChat' => 'http://irc.lc/wolfplex',
'ML' => 'http://discuss.hackerspaces.be/listinfo.cgi/wolfplex-hackerspaces.be',
- 'print' => 'www.wolfplex.org',
- 'projects' => 'http://www.wolfplex.org/wiki/Cat%C3%A9gorie:Project',
+ 'print' => 'www.wolfplex.be',
+ 'projects' => 'http://www.wolfplex.be/wiki/Cat%C3%A9gorie:Project',
'twitter' => 'http://www.twitter.com/wolfplex',
- 'wiki' => 'http://www.wolfplex.org',
- 'wikiRecentChangesFeed' => 'http://www.wolfplex.org/w/index.php?title=Sp%C3%A9cial:Modifications_r%C3%A9centes&feed=atom',
+ 'wiki' => 'http://www.wolfplex.be',
+ 'wikiRecentChangesFeed' => 'http://www.wolfplex.be/w/index.php?title=Sp%C3%A9cial:Modifications_r%C3%A9centes&feed=atom',
],
'accounts' => [
'twitter' => "@Wolfplex",
'foursquare' => "4df75cd61fc7393b579fcc8e",
],
'lists' => [
'default' => 'wolfplex@discuss.hackerspaces.be',
],
];
diff --git a/design/header/elements/css.php b/design/header/elements/css.php
index 3956f39..3eb18db 100644
--- a/design/header/elements/css.php
+++ b/design/header/elements/css.php
@@ -1,59 +1,59 @@
<?php
/**
* Wolfplex API - Design API - Header provider - CSS
*/
///
/// Gets the accent to use
///
require('../kibaone/accents/KibaOneAccents.php');
$accent = 'bluegray';
if (isset($_REQUEST['accent'])) {
$accent = $_REQUEST['accent'];
}
if (isset($argc) && $argc > 1 && $argv[1] !== '') {
$accent = $argv[1];
}
try {
$accentColor = KibaOneAccents::getAccentColor($accent);
} catch (InvalidArgumentException $ex) {
die("Unknown accent: $accent");
}
///
/// CSS output
///
?>:root {
var-accent-color: <?= $accentColor ?>;
var-logo-color: #4b4b50;
}
/* -------------------------------------------------------------
Header
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#wolfplex-header {
height: 105px;
width: 100%;
background-color: black;
color: var(logo-color);
border-top: 4px solid var(accent-color);
background-position: right;
- background-image: url(//assets.wolfplex.org/kibaone/img/TunnelMetroFantome-169x105.jpg);
+ background-image: url(//assets.wolfplex.be/kibaone/img/TunnelMetroFantome-169x105.jpg);
background-repeat: no-repeat;
}
#wolfplex-logo {
margin-left: 81px;
margin-top: 13px;
}
diff --git a/design/header/elements/html.php b/design/header/elements/html.php
index fa90cb3..d99d52a 100644
--- a/design/header/elements/html.php
+++ b/design/header/elements/html.php
@@ -1,5 +1,5 @@
<header id="wolfplex-header">
<div id="wolfplex-logo">
- <a href="<?= $homeHref ?>"><img src="//assets.wolfplex.org/kibaone/img/TextLogo.png" alt="Wolfplex. For hackers and alternative people."></a>
+ <a href="<?= $homeHref ?>"><img src="//assets.wolfplex.be/kibaone/img/TextLogo.png" alt="Wolfplex. For hackers and alternative people."></a>
</div>
</header>
diff --git a/index.html b/index.html
index c2fde38..630e6d6 100644
--- a/index.html
+++ b/index.html
@@ -1,15 +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" />
+ <link rel="Stylesheet" href="http://www.wolfplex.be/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>[ <a href="/space">Space API</a> | <a href="http://www.wolfplex.be/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/pads/index.php b/pads/index.php
index 0231dbb..2f1567c 100644
--- a/pads/index.php
+++ b/pads/index.php
@@ -1,38 +1,38 @@
<?php
/**
* Gets the pads
*
* @return Array the pads list
*/
function get_pads () {
//TODO: move API key in config
- $url = "http://pad.wolfplex.org/api/1.2.1/listAllPads?apikey=U67yKTUDzz19fEHyrAuNN4zUnKxbOJZu";
+ $url = "http://pad.wolfplex.be/api/1.2.1/listAllPads?apikey=U67yKTUDzz19fEHyrAuNN4zUnKxbOJZu";
$api_reply = json_decode(file_get_contents($url));
if ($api_reply->code == 0) {
return $api_reply->data->padIDs;
}
throw new Exception("API fatal error: $api_reply->message");
}
$format = array_key_exists('format', $_GET) ? $_GET['format'] : '';
switch ($format) {
case "":
case "json":
echo json_encode(get_pads());
break;
case "raw":
echo implode("\n", get_pads());
break;
case "txt":
header("Content-Type: text/plain");
foreach (get_pads() as $pad) {
echo "* $pad\n";
}
break;
default:
die("Unknown format: $format");
}
?>
\ No newline at end of file
diff --git a/space/index.php b/space/index.php
index 99c7ff5..4b6d2ba 100755
--- 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.org/w/api.php',
+ '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'],
]
],
/*
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
],
//...
]
*/
];
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, 12:15 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
46346
Default Alt Text
(10 KB)
Attached To
rAPI Wolfplex API
Event Timeline
Log In to Comment