我写成
<?php
require_once 'HarvestAPI.php';
/* Register Auto Loader */
spl_autoload_register(array('HarvestAPI', 'autoload'));
$api = new HarvestAPI();
$api->setUser( "nida.amin@gmail.com" );
$api->setPassword( "aaabbb12345" );
$api->setAccount( "heavenscompany" );
$api->setRetryMode( HarvestAPI::RETRY );
$api->setSSL(true);
$result = $api->getClients();
foreach( $result->data as $client ) {
if( $result->isSuccess() ) {
echo $client->get( "name" );
echo $client->details;
}
}
?>
我对 Harvest API 很陌生。请帮助我如何在 PHP 中的 Harvest API 中获取客户的其他联系方式,如电子邮件、手机号码、办公室等?