Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.08 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.08 KB

Build Status

PHP Client for KoolTracker User API

PHP Client to interact with the KoolTracker API for user addition.

Requirements

Installation

composer require websetstudio/kooltracker-client-php

Usage

// Include the autoload.php
require 'vendor/autoload.php';

use WebsetStudio\KoolTrackerClient\Client;
use WebsetStudio\KoolTrackerClient\Model\User;
use WebsetStudio\KoolTrackerClient\Utils\Generator;

$user = new User();
$user->setOptInDate(new DateTime($optInDate));
$user->setOptInUrl($optInUrl);
$user->setUid($userUid);

$client = new Client('https://agency.tracking.domain/coreg_(abc)/', new Generator());
/** @var \WebsetStudio\KoolTrackerClient\Model\Response $answer */
$answer = $client->send($user);

// Process the answer as you wish
// bool   $answer->isSuccessful();
// string $answer->getMessage();