Receive data from devices in your space and publish them as part of your SpaceAPI JSON :3
Find a file
Bendodroid 4b41acfa7b
Major Refactoring
- Move components to separate packages
- Fix HTTP header for 401 response
- Add documentation
2023-11-09 22:30:03 +01:00
config Major Refactoring 2023-11-09 22:30:03 +01:00
handlers Major Refactoring 2023-11-09 22:30:03 +01:00
types Remove custom open/close icons 2023-11-04 21:16:27 +01:00
util Major Refactoring 2023-11-09 22:30:03 +01:00
.gitignore Initial commit 2023-11-04 21:07:27 +01:00
ccchh-template.json Fix broken IRC link in template 2023-11-09 22:10:36 +01:00
go.mod Initial commit 2023-11-04 21:07:27 +01:00
LICENSE Add BSD-3-Clause LICENSE 2023-11-04 21:07:40 +01:00
main.go Major Refactoring 2023-11-09 22:30:03 +01:00
README.md Change initial SpaceAPI response source 2023-11-04 23:31:24 +01:00

SpaceAPI Daemon

spaceapid serves a SpaceAPI-compatible JSON on port 8080:

curl -X GET http://localhost:8080

The state of the boolean state->open property can be modified via /state/open:

curl -X PUT -u user:password -d true http://localhost:8080/state/open

Building

See the go.mod file for minimum required Go version. There are currently no dependencies apart from the Go standard library.

go build .

Running

Substitute the environment variables with appropriate custom values.

env DOORIS_USERNAME=user DOORIS_PASSWORD=password SPACE_API_JSON_TEMPLATE_PATH=ccchh-template.json go run .