Expand description
Query SpaceAPI endpoints and observe membership changes.
Retrieves and monitors members presence at the hackerspace using a compatible SpaceAPI
§Configuration
[module."notbot::spaceapi"]
presence_interval = 30
empty_response = "Nikdo není doma..."
# keywords = [ "at" ]
[module."notbot::spaceapi".presence_map]
"https://hackerspace.pl/spaceapi" = [
"#members:hackerspace.pl",
"#notbot-test-private-room:is-a.cat",
"#bottest:is-a.cat"
]
[module."notbot::spaceapi".room_map]
"default" = "https://hackerspace.pl/spaceapi"
"#members" = "https://hackerspace.pl/spaceapi"§Usage
Keywords:
at-at_processor- return the list of names listed as present bySpaceAPIendpoint set for current room.hm,heatmap-heatmap- render a heatmap of activity based on the data returned by spaceapi endpoints.
Passive presence updates: presence_observer
Notice(notbot) -> #members:hackerspace.pl: arrived: foo, also there: bar, baz
Notice(notbot) -> #members:hackerspace.pl: left: foo, still there: bar, baz
Notice(notbot) -> #members:hackerspace.pl: left: bar, still there: bazModules§
- heatmap_
api - Module for making interactions with the heatmap API, including rendering data it returns, easier.
- space_
api - Structure for data retrieved from
SpaceAPIendpoints.
Structs§
- Module
Config SpaceAPImodule configuration
Functions§
- at_
processor - Query configured
SpaceAPIfor presence state. - heatmap
- Present a heatmap of people activity at the Hackerspace
- names_
dehighlighted - Insert
\u{200B}- unicode Zero Width Space - in between the first and remaining characters of present people names, to avoid unnecessary mentions in the chat Room of people present. - presence_
observer - Worker observing
SpaceAPIendpoints for changes and providing updates to configured rooms.