anticipated-io/anticipated-io-php

Provides a PHP SDK for accessing the anticipated.io API event service

1.0.0 2022-06-19 21:38 UTC

This package is auto-updated.

Last update: 2023-01-20 04:51:11 UTC


README

A fast way to add the anticipated.io service into your PHP projects.

Installation

The recommended way to install the anticipated.io SDK is through Composer.

composer require anticipated-io/anticipated-io-php

Usage

    $key = '890asfe08qt43hqtwr980agdsf9y8dfsay234hnb4308'; // API key from https://app.anticipated.io/apiKeys
    $s = new AnticipatedEvents(['key'=>$key]);
    $dateTime = new \DateTime('now', new \DateTimeZone('UTC'));
    $dateTime->modify('+5 min');
    $results = $s->create(
        $dateTime,
        'https://myservice.com/events',
        'POST',
        ''
    );

Tests

Tests executed via PHPUnit. You will need to use composer to install the dev

./vendor/bin/phpunit