interactive-solutions/zf-email-template-api

处理电子邮件模板的REST API

1.1.0 2017-12-06 15:28 UTC

This package is auto-updated.

Last update: 2024-09-05 03:31:40 UTC


README

本项目为 Roave\EmailTemplates 提供REST API,以便您将其集成到当前使用的任何后台管理系统中。

安装

安装通过composer支持

composer require interactive-solutions/zf-email-template-api

配置

此包依赖于 Zf-Common\Zfc-Rbac 来处理API访问权限的授权,因此要配置此项目,您需要更新ZfcRbac配置,以包含在此处找到的权限

namespace InteractiveSolutions\EmailTemplateApi;

final class TemplatePermissions
{
    const LIST   = 'interactive-solutions:email-template:list';
    const VIEW   = 'interactive-solutions:email-template:view';
    const UPDATE = 'interactive-solutions:email-template:update';
}

端点

集合:/interactive-solutions/email-templates

资源:/interactive-solutions/email-templates/:uuid

API请求体

{
    "id": "<string id>",
    "uuid": "6886a31a-8b7f-4e43-b90a-a9897ba2e845",
    "locale": "en-US",
    "description": null,
    "updateParameters": false,
    "subject": "Subject has not yet been set",
    "htmlBody": "This is the default message for the template with id: widerlov:evaluation:assigned,locale: en-US",
    "textBody": "This is the default message for the template with id: widerlov:evaluation:assigned,locale: en-US",
    "createdAt": "2016-07-30T15:00:13+0200",
    "updatedAt": "2016-07-30T15:00:13+0200",
    "parametersUpdatedAt": null
}