shellbot.updaters.space module

class shellbot.updaters.space.SpaceUpdater(engine=None, **kwargs)[source]

Bases: shellbot.updaters.base.Updater

Replicates messages to a secondary space

format(event)[source]

Prepares an outbound line

Parameters:event (Event or Message or Join or Leave) – an inbound event
Returns:outbound line
Return type:str

This function adapts inbound events to the appropriate format. It turns an object with multiple attributes to a single string that can be pushed to a Cisco Spark room.

on_init(space=None, speaker=None, **kwargs)[source]

Replicates messages to a secondary space

Parameters:
  • space (Space) – the target space to use (optional)
  • speaker (Speaker) – the speaker instance to use (optional)

Parameters are provided mainly for test injection.

put(event)[source]

Processes one event

Parameters:event (Event or Message or Join or Leave) – an inbound event

With this class a string representation of the received event is forwarded to the speaker queue of a chat space.