You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Xiretza 28459cc661
status-s.php: fix extra newline
7 months ago
..
README.md server: update README 7 months ago
config.inc.php.example Move apikeys to config file 1 year ago
ping-get.php server: clean up scripts, require POST for non-idempotent requests 7 months ago
ping.php server: clean up scripts, require POST for non-idempotent requests 7 months ago
pinged.txt Spaceping server part 7 years ago
status-s.php status-s.php: fix extra newline 7 months ago
status.php server: move spaceapi to its own subdomain 7 months ago
status.txt server: clean up scripts, require POST for non-idempotent requests 7 months ago
update.php server: clean up scripts, require POST for non-idempotent requests 7 months ago

README.md

SpaceAPI endpoints

The API is currently available under https://spaceapi.it-syndikat.org/api/. The following endpoints exist:

  • GET status.php: the current space status in SpaceAPI format, registered in the SpaceAPI directory
  • GET status-s.php: returns true if space is open, false if closed. Called by discourse theme and serendipity.
  • POST update.php: updates the current open status, called by the wood box with two fat buttons ("2fb").
  • POST ping.php: requests a "spaceping". Called by the matrix bot.
  • POST ping-get.php: returns true if a ping request is pending, then resets the request. Called by 2fb.

All endpoints except for status[-s].php require an API key to be passed via the apikey= GET parameter. These API keys are defined in config.inc.php, see config.inc.php.example for an example.