nti.webhooks.subscriptions¶
Subscription implementations.
-
interface
nti.webhooks.subscriptions.IApplicableSubscriptionFactory[source]¶ A private contract between the Subscription and its SubscriptionManager.
This is only called on subscriptions that are already determined to be active; if the subscription is also applicable, then it should be returned. Otherwise, it should return None.
This is called when we intend to attempt delivery, so it’s a good time to take cleanup action if the subscription isn’t applicable for reasons that aren’t directly related to the data and the event, for example, if the principal cannot be found.
-
__call__(data, event)¶ See class documentation.
-
-
class
nti.webhooks.subscriptions.AbstractSubscription(**kwargs)[source]¶ Bases:
nti.schema.schema.SchemaConfiguredSubclasses need to extend a
Containerimplementation.
-
class
nti.webhooks.subscriptions.GlobalSubscriptionComponents(name='', bases=())[source]¶ Bases:
zope.component.globalregistry.BaseGlobalComponentsExists to be pickled by name.
-
class
nti.webhooks.subscriptions.GlobalWebhookSubscriptionManager(name)[source]¶ Bases:
nti.webhooks.subscriptions.AbstractWebhookSubscriptionManager,nti.webhooks.subscriptions._CheckObjectOnSetSampleContainer,nti.webhooks._util.DCTimesMixin
-
class
nti.webhooks.subscriptions.PersistentSubscription(**kwargs)[source]¶ Bases:
nti.webhooks.subscriptions._CheckObjectOnSetBTreeContainer,nti.webhooks.subscriptions.AbstractSubscription,nti.webhooks._util.PersistentDCTimesMixinPersistent implementation of
IWebhookSubscription
-
class
nti.webhooks.subscriptions.PersistentWebhookSubscriptionManager[source]¶ Bases:
nti.webhooks.subscriptions.AbstractWebhookSubscriptionManager,nti.webhooks._util.PersistentDCTimesMixin,nti.webhooks.subscriptions._CheckObjectOnSetBTreeContainer
-
class
nti.webhooks.subscriptions.Subscription(**kwargs)[source]¶ Bases:
nti.webhooks.subscriptions._CheckObjectOnSetSampleContainer,nti.webhooks.subscriptions.AbstractSubscription,nti.webhooks._util.DCTimesMixin