antriver / flarum-http-hooks
Call some external APIs when things happen in your Flarum forum.
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:flarum-extension
Requires
- flarum/core: ^0.1.0
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-10-28 11:22:12 UTC
README
A Flarum extension that makes POST requests to URLs you specify when certain events happen.
Supported Events
Only the following events are currently supported. Feel free to make a pull request to add more.
- PostWasPosted
Installation
composer require antriver/flarum-http-hooks
Configuration
There is no UI for specifying the URLs. Instead you must add an entry to your database containing a JSON string.
Example configuration:
{"PostWasPosted":["http://www.example.com/someplace", "https://www.example.org/otherplace"]}
Makes those 2 URLs receive a POST request when Flarum's PostWasPosted event fires.
To add this to you settings table:
INSERT INTO `settings` (`key`, `value`) VALUES ('flarum-http-hooks.urls', '{\"PostWasPosted\":[\"http://www.example.com/someplace\", \"https://www.example.org/otherplace\"]}');