By: Spicer Matthews Email: spicer@cloudmanic.com Website: http://www.cloudmanic.com Built: 9/30/2010 This is a php library designed to be used with the Codeigniter framework. This library is based off of the work found here http://blog.michaelhelmick.com/2010/07/30/freshbooks-api-using-oauth/ by Mike Helmick. The codebase as changed to work within the Codeignitor http://codeigniter.com library format. Also a controller class was added to demo the use of this library. To install: - copy the files to their respective homes; config, controllers, and libraries. - Modify config.php with your relevant information. - Run the login method of the Freshbooks controller. - To set a different sub domain from your consumer key use the $this->freshbooks_oauth->set_namespace('xxxxxxx'); See the constructor of freshbooks.php Get Data Calls: Currently we do not support all the different calls to FreshBooks but we do have a handful to work from. In Freshbooks_oauth.php if you scroll to the comment section "Helper functions to get different datasets" you will be able to add or modify function calls to meet your data needs. - $this->freshbooks_oauth->get_categories($page = 1, $count = 100, $loop = TRUE) - $this->freshbooks_oauth->get_expenses($page = 1, $count = 100, $loop = TRUE) - $this->freshbooks_oauth->get_payments($page = 1, $count = 100, $loop = TRUE) - $this->freshbooks_oauth->get_customers($page = 1, $count = 100, $loop = TRUE) * All the get_xxxxx() calls do not need to have any parameters passed into them if you want to get everything in the FreshBooks system. FreshBooks has a limit of 100 results at a time. The get_xxxxxx() are set to make multiple requests to get all the data. If you pass in a $page, $count, and set $loop to FALSE it will not loop and return the page you are after with the result count you are after. Not looping is a much better design for a system that is going to make API calls everyday.