API Modules

class action_triggers.api.serializers.ConfigSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer for the Config model.

class Meta[source]

Bases: object

fields = ('id', 'active', 'payload', 'config_signals', 'content_types', 'webhooks', 'message_broker_queues')
model

alias of Config

create(validate_data: dict) Config[source]

Create a new Config instance and related objects.

Parameters:

validate_data – The validated data.

Returns:

The created Config instance.

static get_content_types_from_data(data: List[dict]) List[ContentType][source]

Get content types from the data

Parameters:

data – List of content types data where the app_label and model are provided.

Returns:

List of content types.

update(instance: Config, validate_data: dict) Config[source]

Update the Config instance updating any related objects.

Parameters:
  • instance – The Config instance to update.

  • validate_data – The validated data.

Returns:

The updated Config instance.

class action_triggers.api.serializers.ConfigSignalSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer for the ConfigSignal model.

class Meta[source]

Bases: object

fields = ('signal',)
model

alias of ConfigSignal

class action_triggers.api.serializers.ContentTypeSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer for the ContentType model.

class Meta[source]

Bases: object

fields = ['app_label', 'model']
model

alias of ContentType

class action_triggers.api.serializers.MessageBrokerQueueSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer for the MessageBrokerQueue model.

class Meta[source]

Bases: object

fields = ('name', 'conn_details', 'parameters', 'timeout_secs')
model

alias of MessageBrokerQueue

class action_triggers.api.serializers.WebhookSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer for the Webhook model.

class Meta[source]

Bases: object

fields = ['url', 'http_method', 'headers', 'timeout_secs']
model

alias of Webhook

API URLs for the action_triggers app.

class action_triggers.api.views.ConfigViewSet(**kwargs)[source]

Bases: ModelViewSet

A viewset for viewing and editing Config instances, along with related instances.

basename = None
description = None
detail = None
name = None
queryset
serializer_class

alias of ConfigSerializer

suffix = None