Created
September 27, 2015 18:28
-
-
Save henzard/5b155aca70bfcd836f33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ini_set('display_errors', true); | |
ini_set('error_reporting', E_ALL); | |
define('OUTMARKET_APIURL', 'https://api.omkt.co/icp'); | |
// Load the OutMarket library | |
require_once('OutMarketApi.php'); | |
// Give the API your information | |
OutMarketApi::getInstance()->setConfig(array( | |
'appId' => 'b6b7757e-fcdc-4891-88fd-9175c9174bd6', | |
'apiPassword' => 'Test@011', //'[email protected]', | |
'apiUsername' => '[email protected]', //'Diamond1!', | |
'companyId' => 1708365, | |
'profileId' => 52663 | |
)); | |
// Store the singleton | |
$oOutMarket = OutMarketApi::getInstance(); | |
// Try to make the call(s) | |
try { | |
echo '<pre>'; | |
// Grab all contacts | |
//var_dump($oOutMarket->getContacts()); | |
// Grab a contact | |
print_r($oOutMarket->getContact(1)); | |
// Create a contact | |
//var_dump($oOutMarket->addContact('[email protected]', null, null, 'Joe', 'Shmoe', null, '123 Somewhere Ln', 'Apt 12', 'Somewhere', 'NW', '12345', '123-456-7890', '123-456-7890', null)); | |
// Get messages | |
echo '</pre>'; | |
echo '<pre>'; | |
print_r($oOutMarket->getLists()); | |
echo '</pre>'; | |
} catch (Exception $oException) { // Catch any exceptions | |
// Dump errors | |
var_dump($oOutMarket->getErrors()); | |
// Grab the last raw request data | |
var_dump($oOutMarket->getLastRequest()); | |
// Grab the last raw response data | |
var_dump($oOutMarket->getLastResponse()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment