<?php /** * This file contains examples for using the EmailOneApi PHP-SDK. * * * * */ // require the setup which has registered the autoloader require_once dirname(__FILE__) . '/setup.php'; // CREATE THE ENDPOINT $endpoint = new EmailOneApi_Endpoint_ListSubscribers(); /*===================================================================================*/ // GET ALL ITEMS $response = $endpoint->getSubscribers('LIST-UNIQUE-ID', $pageNumber = 1, $perPage = 10); // DISPLAY RESPONSE echo '<pre>'; print_r($response->body); echo '</pre>'; /*===================================================================================*/ // GET ONE ITEM $response = $endpoint->getSubscriber('LIST-UNIQUE-ID', 'SUBSCRIBER-UNIQUE-ID'); // DISPLAY RESPONSE echo '<hr /><pre>'; print_r($response->body); echo '</pre>'; /*===================================================================================*/ // SEARCH BY EMAIL $response = $endpoint->emailSearch('LIST-UNIQUE-ID', '*****@*****.**'); // DISPLAY RESPONSE