gentor/userengage-php

UserEngage.io Rest API PHP SDK

dev-master 2018-08-27 15:16 UTC

This package is auto-updated.

Last update: 2024-12-09 03:48:13 UTC


README

PHP 5.6 SDK for UserEngage Rest API

Installation

Installation using composer:

composer require gentor/userengage-php

Usage

$client = new UserengageClient('REST_API_KEY');
$users = new UserengageUsers($client);
  • Create User
$user = $users->create([
    'first_name' => 'API',
    'last_name' => 'User',
    'email' => 'api.user@test.com'
]);
  • Update User
$user = $users->update($id, [
    'first_name' => 'API',
    'last_name' => 'Update',
]);
  • Delete User
$users->delete($id);
  • Find User
// By ID
$user = $users->find($id);

// By Key
$user = $users->findByKey($key);

// By Date
$users = $users->findByDate($minTimestamp, $maxTimestamp, $type);
  • List User Details
$results = $users->details();

// Pagination
$users = $client->nextPage($results);
$users = $client->previousPage($results);

Documentation

UserEngage API