查看 API,我相信代码可能如下所示。请注意,这是完全未经测试的。
从客户端对象开始
//new Client object
$client = new FreshBooks_Client();
使用列表方法获取具有特定电子邮件的用户
//listing function definition void listing ( &$rows, &$resultInfo, [ $page = 1], [ $perPage = 25], [ $filters = array()])
//get projects, 25 per page, page 1, where project belong to client email x@x.x
$client->listing($rows,$resultInfo,1,25,array('email'=>'x@x.x'));
//dump result data
print_r($rows);
print_r($resultInfo);
使用列表方法获取具有特定用户名的用户
//listing function definition void listing ( &$rows, &$resultInfo, [ $page = 1], [ $perPage = 25], [ $filters = array()])
//get projects, 25 per page, page 1, where project belong to client username test
$client->listing($rows,$resultInfo,1,25,array('username'=>'test'));
//dump result data
print_r($rows);
print_r($resultInfo);
希望它可以帮助您入门。