torchlighttechnology/delayed-event-api

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

TTG task server delayed event API

v2.0.0 2018-01-04 14:42 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:36:44 UTC


README

A PHP library to interact with TTG's delayed events service

Install with composer

composer require torchlighttechnology/delayed-event-api:"~2.0"

Usage in your project

use torchlighttechnology\DelayedEventAPI;

$api = new DelayedEventAPI('DELAYEDEVENTS_URL');

Events

Create a new event

$response = $api->create_event(
	$callback_uri,	// URL string
	$parameters,	// json string e.x. {"email":"test@test.com"}
	$fire_date	// date string in YYYY-MM-DD HH:MM:SS format
);

Remove event

$response = $api->remove_event(
	$parameters	// json string e.x. {"email":"test@test.com"}
);