wotpy.wot.exposed.thing_set¶
Class that represents a group or set of ExposedThing instances that exist in the same context.
Classes
ExposedThingSet () |
Represents a group of ExposedThing objects. |
-
class
wotpy.wot.exposed.thing_set.
ExposedThingSet
¶ Bases:
object
Represents a group of ExposedThing objects. A group cannot contain two ExposedThing with the same Thing ID.
-
add
(exposed_thing)¶ Add a new ExposedThing to this set.
-
contains
(exposed_thing)¶ Returns True if this group contains the given ExposedThing.
-
exposed_things
¶ A generator that yields all the ExposedThing contained in this group.
-
find_by_interaction
(interaction)¶ Finds the ExposedThing whose Thing contains the given Interaction.
-
find_by_thing_id
(thing_id)¶ Finds an existing ExposedThing by Thing ID. The ID argument may be the original Thing ID or the URL-safe name (which is also unique and based on the ID).
-
remove
(thing_id)¶ Removes an existing ExposedThing by ID. The thing_id argument may be the original Thing ID or the URL-safe name.
-