wotpy.wot.interaction¶
Classes that represent all interaction patterns.
Classes
Action(thing, name[, init_dict]) |
Actions offer functions of the Thing. |
Event(thing, name[, init_dict]) |
The Event Interaction Pattern describes event sources that asynchronously push messages. |
InteractionPattern(thing, name[, init_dict]) |
A functionality exposed by Thing that is defined by the TD Interaction Model. |
Property(thing, name[, init_dict]) |
Properties expose internal state of a Thing that can be directly accessed (get) and optionally manipulated (set). |
-
class
wotpy.wot.interaction.Action(thing, name, init_dict=None, **kwargs)¶ Bases:
wotpy.wot.interaction.InteractionPatternActions offer functions of the Thing. These functions may manipulate the internal state of a Thing in a way that is not possible through setting Properties.
-
init_class¶ Returns the init dict class for this type of interaction.
-
interaction_type¶ Interaction type.
-
-
class
wotpy.wot.interaction.Event(thing, name, init_dict=None, **kwargs)¶ Bases:
wotpy.wot.interaction.InteractionPatternThe Event Interaction Pattern describes event sources that asynchronously push messages. Here not state, but state transitions (events) are communicated (e.g., clicked).
-
init_class¶ Returns the init dict class for this type of interaction.
-
interaction_type¶ Interaction type.
-
-
class
wotpy.wot.interaction.InteractionPattern(thing, name, init_dict=None, **kwargs)¶ Bases:
objectA functionality exposed by Thing that is defined by the TD Interaction Model.
-
add_form(form)¶ Add a new Form.
-
clean_forms()¶ Removes all the Forms from this Interaction.
-
forms¶ Sequence of forms linked to this interaction.
-
init_class¶ Returns the init dict class for this type of interaction.
-
interaction_fragment¶ The InteractionFragment dictionary of this interaction.
-
name¶ Interaction name. No two Interactions with the same name may exist in a Thing.
-
remove_form(form)¶ Remove an existing Form.
-
thing¶ Thing that contains this Interaction.
-
url_name¶ URL-safe version of the name.
-
-
class
wotpy.wot.interaction.Property(thing, name, init_dict=None, **kwargs)¶ Bases:
wotpy.wot.interaction.InteractionPatternProperties expose internal state of a Thing that can be directly accessed (get) and optionally manipulated (set).
-
init_class¶ Returns the init dict class for this type of interaction.
-
interaction_type¶ Interaction type.
-