<h1>Testing GetAppSetting</h1> <pre> <?php $out = Infusionsoft_DataService::getAppSetting('Product', 'trackcpu'); echo didItWorkNotEmpty($out); ?> </pre> <h1>Testing addCustomField</h1> <pre> No Test Written Yet </pre> <h1>Testing updateCustomField</h1> <pre> No Test Written Yet </pre> <h1>Testing getAppointmentICal</h1> <pre> No Test Written Yet </pre> <h1>Testing getAllCustomFields</h1> <pre> <?php echo print_r(Infusionsoft_DataService::getCustomFields(new Infusionsoft_Contact()), true); ?> </pre>
<?php include '../infusionsoft.php'; include 'object_editor_all_tables.php'; include '../tests/testUtils.php'; if (!empty($_GET['object'])) { if ($_SERVER['HTTP_HOST'] == 'sdk.novaksolutions.com') { echo "Sorry, we've disabled this on our server for security..."; die; } $class_name = "Infusionsoft_" . $_GET['object']; $object = null; $reflection = new ReflectionObject(new $class_name()); if ($reflection->hasProperty('customFieldFormId')) { echo 'Adding all custom fields available to object' . '<br/>'; $custom_fields = Infusionsoft_DataService::getCustomFields(new $class_name()); $class_name::addCustomFields(array_keys($custom_fields)); } $object = new $class_name(); if (!file_exists("../exports")) { mkdir("../exports/"); } $file_name = "../exports/" . $_GET['object'] . '_export_' . date('Ymd-h.i.s') . '.csv'; echo 'Creating csv file: ' . $file_name . '<br/>'; $csv_file = fopen($file_name, 'w'); fputcsv($csv_file, $object->getFields(), ",", "\""); $page = 0; do { echo 'Fetching page ' . $page . '<br/>'; flush(); $object_fields = $object->getFields();