coarnotify.patterns.announce_relationship¶
Pattern to represent an Announce Relationship notification https://coar-notify.net/specification/1.0.0/announce-relationship/
Classes¶
Class to represent an Announce Relationship notification |
|
Custom object class for Announce Relationship to apply the custom validation |
Module Contents¶
- class coarnotify.patterns.announce_relationship.AnnounceRelationship(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
Class to represent an Announce Relationship notification
- validate() bool ¶
Extends the base validation to make context required
- Returns:
True
if valid, otherwise raisescoarnotify.exceptions.ValidationError
- TYPE¶
Announce Relationship types, including an ActivityStreams announce and a COAR Notify Relationship Action
- property object: AnnounceRelationshipObject | None¶
Custom getter to retrieve the object property as an AnnounceRelationshipObject
- class coarnotify.patterns.announce_relationship.AnnounceRelationshipObject(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyObject
Custom object class for Announce Relationship to apply the custom validation
- validate() bool ¶
Extend the base validation to include the following constraints:
The object triple is required and each part must validate
- Returns: