2017 © Pedro Peláez
 

library imbo-http-hooks

Perform HTTP requests when Imbo events occur

image

rexxars/imbo-http-hooks

Perform HTTP requests when Imbo events occur

  • Monday, November 3, 2014
  • by rexxars
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

imbo-http-hooks

Fire HTTP requests when Imbo events occur, (*1)

Usage

  • Require rexxars/imbo-http-hooks in your Imbo composer.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:, (*2)

    '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., (*3)

License

MIT-licensed. See LICENSE., (*4)

The Versions

03/11 2014

dev-master

9999999-dev

Perform HTTP requests when Imbo events occur

  Sources   Download

MIT

The Requires

 

The Development Requires

03/11 2014

1.0.0

1.0.0.0

Perform HTTP requests when Imbo events occur

  Sources   Download

MIT

The Requires

 

The Development Requires