coarnotify.patterns =================== .. py:module:: coarnotify.patterns .. autoapi-nested-parse:: All the COAR Notify pattern objects are defined in this module. Some of the pattern objects have supporting objects in their individual submodules Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/coarnotify/patterns/accept/index /autoapi/coarnotify/patterns/announce_endorsement/index /autoapi/coarnotify/patterns/announce_relationship/index /autoapi/coarnotify/patterns/announce_review/index /autoapi/coarnotify/patterns/announce_service_result/index /autoapi/coarnotify/patterns/reject/index /autoapi/coarnotify/patterns/request_endorsement/index /autoapi/coarnotify/patterns/request_review/index /autoapi/coarnotify/patterns/tentatively_accept/index /autoapi/coarnotify/patterns/tentatively_reject/index /autoapi/coarnotify/patterns/undo_offer/index /autoapi/coarnotify/patterns/unprocessable_notification/index Classes ------- .. autoapisummary:: coarnotify.patterns.Accept coarnotify.patterns.AnnounceEndorsement coarnotify.patterns.AnnounceRelationship coarnotify.patterns.AnnounceReview coarnotify.patterns.AnnounceServiceResult coarnotify.patterns.Reject coarnotify.patterns.RequestEndorsement coarnotify.patterns.RequestReview coarnotify.patterns.TentativelyAccept coarnotify.patterns.TentativelyReject coarnotify.patterns.UndoOffer coarnotify.patterns.UnprocessableNotification Package Contents ---------------- .. py:class:: Accept(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NestedPatternObjectMixin`, :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent an Accept notification .. py:method:: validate() -> bool Validate the Accept pattern. In addition to the base validation, this: * Makes ``inReplyTo`` required * Requires the ``inReplyTo`` value to be the same as the ``object.id`` value :return: ``True`` if valid, otherwise raises a :py:class:`coarnotify.exceptions.ValidationError` .. py:attribute:: TYPE The Accept type .. py:class:: AnnounceEndorsement(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent an Announce Endorsement pattern .. py:method:: validate() -> bool Extends the base validation to make `context` required :return: ``True`` if valid, otherwise raises :py:class:`coarnotify.exceptions.ValidationError` .. py:attribute:: TYPE Announce Endorsement type, consisting of Activity Streams Announce and Notify Endorsement Action .. py:property:: context :type: Union[AnnounceEndorsementContext, None] Get a context specific to Announce Endorsement :return: The Announce Endorsement context object .. py:class:: AnnounceRelationship(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent an Announce Relationship notification .. py:method:: validate() -> bool Extends the base validation to make `context` required :return: ``True`` if valid, otherwise raises :py:class:`coarnotify.exceptions.ValidationError` .. py:attribute:: TYPE Announce Relationship types, including an ActivityStreams announce and a COAR Notify Relationship Action .. py:property:: object :type: Union[AnnounceRelationshipObject, None] Custom getter to retrieve the object property as an AnnounceRelationshipObject .. py:class:: AnnounceReview(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent Announce Review pattern .. py:method:: validate() -> bool Extends the base validation to make `context` required :return: ``True`` if valid, otherwise raises :py:class:`coarnotify.exceptions.ValidationError` .. py:attribute:: TYPE Announce Review type, including Acitivity Streams Announce and Notify Review Action .. py:property:: context :type: Union[AnnounceReviewContext, None] Custom getter to retrieve AnnounceReview Context :return: AnnounceReviewContext .. py:property:: object :type: Union[AnnounceReviewObject, None] Custom getter to retrieve Announce Review object :return: Announce Review Object .. py:class:: AnnounceServiceResult(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent the Announce Service Result Pattern .. py:method:: validate() -> bool Extends the base validation to make `context` required :return: ``True`` if valid, otherwise raises :py:class:`coarnotify.exceptions.ValidationError` .. py:attribute:: TYPE Announce Service Result type, the ActivityStreams Announce type .. py:property:: context :type: Union[AnnounceServiceResultContext, None] Custom getter to retrieve the context property as an AnnounceServiceResultContext :return: AnnounceSericeResultCOntext .. py:property:: object :type: Union[AnnounceServiceResultObject, None] Custom getter to retrieve the object property as an AnnounceServiceResultObject :return: AnnounceServiceResultObject .. py:class:: Reject(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NestedPatternObjectMixin`, :py:obj:`coarnotify.core.notify.NotifyPattern`, :py:obj:`coarnotify.core.notify.SummaryMixin` Class to represent a Reject notification .. py:method:: validate() -> bool In addition to the base validation apply the following constraints: * The ``inReplyTo`` property is required * The ``inReplyTo`` value must match the ``object.id`` value :return: ``True`` if the validation passes, otherwise raise a ``ValidationError`` .. py:attribute:: TYPE Reject type, the ActivityStreams Reject type .. py:class:: RequestEndorsement(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent a Request Endorsement notification .. py:attribute:: TYPE Request Endorsement types, including an ActivityStreams offer and a COAR Notify Endorsement Action .. py:property:: object :type: Union[RequestEndorsementObject, None] Custom getter to retrieve the object property as a RequestEndorsementObject :return: .. py:class:: RequestReview(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent a Request Review notification .. py:attribute:: TYPE Request Review types, including an ActivityStreams offer and a COAR Notify Review Action .. py:property:: object :type: Union[RequestReviewObject, None] Custom getter to retrieve the object property as a RequestReviewObject :return: .. py:class:: TentativelyAccept(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NestedPatternObjectMixin`, :py:obj:`coarnotify.core.notify.NotifyPattern`, :py:obj:`coarnotify.core.notify.SummaryMixin` Class to represent a Tentative Accept notification .. py:method:: validate() -> bool In addition to the base validation apply the following constraints: * The ``inReplyTo`` property is required * The ``inReplyTo`` value must match the ``object.id`` value :return: .. py:attribute:: TYPE Tentative Accept type, the ActivityStreams Tentative Accept type .. py:class:: TentativelyReject(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NestedPatternObjectMixin`, :py:obj:`coarnotify.core.notify.NotifyPattern`, :py:obj:`coarnotify.core.notify.SummaryMixin` Class to represent a Tentative Reject notification .. py:method:: validate() -> bool In addition to the base validation apply the following constraints: * The ``inReplyTo`` property is required * The ``inReplyTo`` value must match the ``object.id`` value :return: .. py:attribute:: TYPE Tentative Reject type, the ActivityStreams Tentative Reject type .. py:class:: UndoOffer(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NestedPatternObjectMixin`, :py:obj:`coarnotify.core.notify.NotifyPattern`, :py:obj:`coarnotify.core.notify.SummaryMixin` Class to represent the Undo Offer notification .. py:method:: validate() -> bool In addition to the base validation apply the following constraints: * The ``inReplyTo`` property is required * The ``inReplyTo`` value must match the ``object.id`` value :return: .. py:attribute:: TYPE Undo Offer type, the ActivityStreams Undo type .. py:class:: UnprocessableNotification(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern`, :py:obj:`coarnotify.core.notify.SummaryMixin` Class to represent the Unprocessable Notification notification .. py:method:: validate() -> bool In addition to the base validation apply the following constraints: * The ``inReplyTo`` property is required * The ``summary`` property is required :return: .. py:attribute:: TYPE Unprocessable Notification types, including an ActivityStreams Flag and a COAR Notify Unprocessable Notification