antriver/flarum-http-hooks

There is no license information available for the latest version (0.0.3) of this package.

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

0.0.3 2018-03-20 00:36 UTC

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\"]}');