antriver / flarum-http-hooks
此包最新版本(0.0.3)没有提供许可证信息。
当你的 Flarum 论坛发生某些事件时,调用一些外部 API。
0.0.3
2018-03-20 00:36 UTC
Requires
- flarum/core: ^0.1.0
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-09-28 11:10:02 UTC
README
这是一个 Flarum 扩展,当特定事件发生时,它会向指定的 URL 发送 POST 请求。
支持的事件
目前仅支持以下事件。欢迎提交拉取请求添加更多。
- PostWasPosted
安装
composer require antriver/flarum-http-hooks
配置
没有用户界面来指定 URL。相反,你必须向你的数据库添加一个包含 JSON 字符串的条目。
示例配置
{"PostWasPosted":["http://www.example.com/someplace", "https://www.example.org/otherplace"]}
当 Flarum 的 PostWasPosted 事件触发时,这2个URL将接收POST请求。
要将此添加到设置表
INSERT INTO `settings` (`key`, `value`) VALUES ('flarum-http-hooks.urls', '{\"PostWasPosted\":[\"http://www.example.com/someplace\", \"https://www.example.org/otherplace\"]}');