2011-08-04 34 views
1

こんにちは私はFreshbooksを初めて使っています。Freshbooks APIからPHP経由でデータを取得する方法

フィールドに電子メールまたはファーストネームとラストネームのいずれかを入力したい場合は、自分のアカウントをすべてプルアップして貼り付けたい場合、その顧客がいる場合は自分のFreshbookアカウントでPHPコードを検索します彼らが想定していた入力領域に移動します。顧客名のように名字姓の名字姓に姓。

私は使用しようとしました。 http://code.google.com/p/freshbooks-php-library/

これだけでしたが、私はcouldnt t figure it out and I donどのようにXMLの作品を知っている誰も私を助けることができますか?

答えて

3

APIを見ると、コードは次のようになると思われます。これは完全にテストされていないことに注意してください。特定のユーザ名でユーザをゲットするために上場メソッドを使用して、特定の電子メール

//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 [email protected] 
$client->listing($rows,$resultInfo,1,25,array('email'=>'[email protected]')); 

//dump result data 
print_r($rows); 
print_r($resultInfo); 

をユーザにゲットするために上場メソッドを使用して、クライアントオブジェクト

//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 username test 
$client->listing($rows,$resultInfo,1,25,array('username'=>'test')); 

//dump result data 
print_r($rows); 
print_r($resultInfo); 

ご協力いただきありがとうございます。

関連する問題