DripDrop.Templates (DripDrop v0.1.0)

Copy Markdown View Source

Public template helpers.

Summary

Functions

Renders a template with variables for the given channel.

Renders the template configured on a step.

Validates Liquid and channel-specific template requirements.

Functions

render(template, vars, channel)

@spec render(term(), map(), atom() | binary()) :: {:ok, map()} | {:error, term()}

Renders a template with variables for the given channel.

render_step(step, enrollment, hook_results \\ %{})

@spec render_step(map(), term(), map()) :: {:ok, map()} | {:error, term()}

Renders the template configured on a step.

validate(template, channel)

@spec validate(binary() | map(), atom() | binary()) ::
  :ok | {:error, [{integer(), integer(), binary()}]}

Validates Liquid and channel-specific template requirements.