CloudObjects / Directory / Lukas Rosenstock / ImprovEMailWebhookHandler
Sign in

ImprovEMailWebhookHandler

a phpmae:HTTPInvokableClass & phpmae:Class in Lukas Rosenstock
Public PHP Methods
  • __invoke($args)

    No documentation available.

Source Code
<?php

use Psr\Container\ContainerInterface;

/**
 * Implementation for coid://lukasrosenstock.net/ImprovEMailWebhookHandler
 */
class ImprovEMailWebhookHandler {

    private $airtable;

    public function __construct(ContainerInterface $containerInterface) {
        $this->airtable = $containerInterface->get('airtable');
    }

    public function __invoke($args) {
        unset($args['raw']);
        unset($args['inlines']);
        $this->airtable->post('appX9gDlC3ZshFvOw/Webhooks', [
            'json' => [
                'fields' => [
                    'Timestamp' => date('c'),
                    'Content' => json_encode($args)
                ]                
            ]
        ]);
    }

}
Meta
URI / COID
coid://lukasrosenstock.net/ImprovEMailWebhookHandler content_copy
Revision
7-4cf36094f01652874de6b21e3dc45a56 content_copy
Short ID
llr:ImprovEMailWebhookHandler content_copy
Reference URL
https://coid.link/lukasrosenstock.net/ImprovEMailWebhookHandler content_copy
Last updated
2021-05-10 08:03 (UTC)
Created at
2021-04-10 19:53 (UTC)