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