mfajfr/datacollection-api

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

API for communication with DataCollection

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/mfajfr/datacollection-api

v1.3 2019-11-06 13:58 UTC

This package is auto-updated.

Last update: 2025-11-08 06:06:39 UTC


README

Installation

    composer require mfajfr/datacollection-api

Using

Connection

define('URL', 'https://datacollection.xample');
define('API_TOKEN', '1234567890123456789012345678901234567890');

Connection::setConfiguration(new Configuration(URL, API_TOKEN));

Working with Subscriber

$subscriber = Subscriber::example(); // Create example subscriber (fake data)
$subscriber->store(); // Storing subscriber

$subscriber = Subscriber::findByListAndAccountId($subscriber->list, $subscriber->account_id)['subscriber']; // Finding subscriber

$subscriber->email = 'new' . $subscriber->email; // Set new property

$subscriber->updateByListAndAccountId(); // Updating subscriber