rexxars / imbo-http-hooks
Perform HTTP requests when Imbo events occur
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/rexxars/imbo-http-hooks
Requires
- guzzle/guzzle: ~3.8.1
Requires (Dev)
- phpunit/phpunit: ~4.3
This package is auto-updated.
Last update: 2025-09-29 01:35:09 UTC
README
Fire HTTP requests when Imbo events occur
Usage
- Require
rexxars/imbo-http-hooks
in your Imbocomposer.json
- Run
composer install
to install and set up autoloading - In your Imbo configuration file, under
eventListeners
, initialize the listener. Example:
<?php return [ 'eventListeners' => [ 'httpHooks' => [ 'listener' => 'Rexxars\Imbo\HttpHookListener', 'params' => [ // Event name => URLs 'images.post' => [ 'http://some.url/new-image.php', 'http://some.url/analyze-image.php' ], 'metadata.post' => [ 'http://some.url/metadata-updated.php', ] ] ] ] ];
The URLs you provide to the listener will then receive a HTTP POST request every time the provided event is triggered. The POST body will contain information in the following format:
'event' => 'images.post',
'url' => 'http://some.imbo.install/users/someuser/images',
'imageIdentifier' => 'some image identifier',
'publicKey' => 'someuser',
With that information and a Imbo client, you can easily fetch the image, metadata or do other actions based on the information received.
License
MIT-licensed. See LICENSE.