Skip to content

PHP Client for the user collection of Kooltracker

License

Notifications You must be signed in to change notification settings

websetstudio/kooltracker-client-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();