2018-03-13 20:25:39 +00:00
<!DOCTYPE html>
2018-03-19 20:41:05 +00:00
< html lang = "en" >
2018-03-13 20:25:39 +00:00
< head >
2019-11-03 11:22:00 +00:00
< title > Fuz presence button< / title >
2019-11-03 18:55:01 +00:00
< meta
name="description"
content="Public API for Fuz hackerspace presence button"
/>
< link
id="favicon"
rel="icon"
href="https://fuz.frama.site/medias/5c02ae843c25e.jpg"
type="image/x-icon"
/>
< meta charset = "utf-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2018-03-19 21:14:04 +00:00
2018-03-19 21:03:02 +00:00
<!-- import the webpage's stylesheet -->
2019-11-03 18:55:01 +00:00
< link rel = "stylesheet" href = "/style.css" / >
2018-03-13 20:25:39 +00:00
< / head >
< body >
< header >
< h1 >
2019-11-03 11:22:00 +00:00
Fuz presence button public API
2018-03-13 20:25:39 +00:00
< / h1 >
< / header >
< main >
2019-11-03 18:55:01 +00:00
< p >
See documentation for this project on
< a href = "https://wiki.fuz.re/doku.php?id=projets:fuz:presence_button"
>Fuz wiki< /a
>
< / p >
< p > Available endpoints:< / p >
2018-03-13 20:25:39 +00:00
< section class = "dreams" >
2019-11-03 11:22:00 +00:00
< ul id = "dreams" >
2019-11-10 23:36:07 +00:00
< li >
< a href = "/img" > image API< /a
2020-10-04 19:15:18 +00:00
>< img src = "/img" height = "15px" width = "15px" / > , you can define a custom closingTimeout parameter to customize the delay after which the space is shown closed (milliseconds, defaults to 5 mins)
2019-11-10 23:36:07 +00:00
< / li >
2019-11-03 11:22:00 +00:00
< li > < a href = "/api" > ajax API< / a > < / li >
< / ul >
2018-03-13 20:25:39 +00:00
< / section >
2019-11-10 23:36:07 +00:00
< h2 > API minimalistic documentation< / h2 >
2019-11-03 18:44:00 +00:00
< p >
2019-11-03 18:55:01 +00:00
< code > {"fuzIsOpen":true,"lastSeen":"2019-11-03T16:25:24.385Z"}< /code
>< br / >
The JSON means that the last notification sent by the presence button
was at 2019-11-03T16:25:24.385Z and it was saying that the Fuz was open
at the time. If it's been a while since last notification (lastSeen), we
can conclude the Fuz is now closed.
2019-11-03 18:44:00 +00:00
< / p >
2018-03-13 20:25:39 +00:00
< / main >
2020-10-04 19:15:18 +00:00
< footer > Made with < a href = "https://glitch.com" > Glitch< / a > !< / footer >
2018-03-14 22:04:45 +00:00
2018-03-19 20:41:05 +00:00
<!-- include the Glitch button to show what the webpage is about and
to make it easier for folks to view source and remix -->
2018-03-14 22:04:45 +00:00
< div class = "glitchButton" style = "position:fixed;top:20px;right:20px;" > < / div >
2018-03-19 20:41:05 +00:00
< script src = "https://button.glitch.me/button.js" > < / script >
2018-03-13 20:25:39 +00:00
< / body >
< / html >