wotpy.wot.exposed.thing_set
Class that represents a group or set of ExposedThing instances that exist in the same context.
Classes
Represents a group of ExposedThing objects. |
- class wotpy.wot.exposed.thing_set.ExposedThingSet
Bases:
objectRepresents 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.
- property 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_title(thing_title)
Finds an existing ExposedThing by Thing title. The ID argument may be the original Thing title or the URL-safe name (which is also unique and based on the title).
- remove(thing_title)
Removes an existing ExposedThing by title. The thing_id argument may be the original Thing title or the URL-safe name.