如何通过 PHP 从 Freshbooks API 获取数据

发布于 2024-11-27 23:20:38 字数 377 浏览 2 评论 0原文

你好,我是 Freshbooks 的新手,我想要一些非常简单的东西。

我希望我的客户在字段中输入电子邮件或名字和姓氏,如果我有该客户,我希望我的 php 代码能够搜索到我的 Freshbook 帐户(如果我这样做),我希望我的表单能够提取他的所有帐户并粘贴到输入区域中他们应该是。就像客户的名字进入名字区域姓氏进入姓氏区域一样。

我尝试使用; http://code.google.com/p/freshbooks-php-library/

这个,但我无法弄清楚,而且我不知道 XML 如何工作,所以有人可以帮助我吗?

Hi I am new to Freshbooks and I want something very simple.

I want my customer to enter either email or firstname and lastname into fields and I want my php code to search into my Freshbook account if I have that customer if I do I want my form to pull up all his account and paste into input areas where they supposed be. Like Customer`s first name into first name area lastname into last name area.

I tried to use;
http://code.google.com/p/freshbooks-php-library/

This but I couldnt figure it out and I dont know how to XML works so is there anybody can help me ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疏忽 2024-12-04 23:20:38

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

//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);

希望它帮助您入门。

Looking at the API, I believe the code might look something like below. Note that this is completely untested.

Start with a client object

//new Client object
$client = new FreshBooks_Client();

Using the listing method to get get user with specific email

//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);

Using the listing method to get get user with specific username

//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);

Hope it helps you get started.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文