Simple Ruby interface to the Freeagent Central API (www.freeagentcentral.com/developers/freeagent-api).
This is an early development version of a Ruby wrapper for the Freeagent API. Currently this only supports GET requests (POST will follow shortly) and only the following API methods are supported (more will follow):
There is no test suite yet. If you feel brave, then feel free to clone, fork and play around.
To install as a Gem, just run:
$ sudo gem install freeagent_api -s http://gemcutter.org
Lighthouse.domain = 'yourdomain.freeagentcentral.com' Lighthouse.username = 'firstname.lastname@example.org' Lighthouse.password = 'your_password'
@contacts = Contact.find_all # returns all contacts @contact = Contact.find(contact_id) # returns specific contact
@invoices = Invoice.find_all # returns all invoices @invoices = Invoice.find_all(project_id) # returns all invoices for project @invoice = Invoice.find(invoice_id) # returns specific invoice
@items = InvoiceItem.find_all(invoice_id) # returns all items for invoice
@projects = Project.find_all # returns all projects @project = Project.find(project_id) # returns specific project
@task = Task.find(project_id, task_id) # returns specific task for project
@timeslips = Timeslip.find_all # returns all timeslips @timeslips = Timeslip.find_all(project_id) # returns all timeslips for project @timeslip = Timeslip.find(timeslip_id) # returns specific timeslip
Aaron Russell - (www.aaronrussell.co.uk)
Copyright © 2009 Aaron Russell. See LICENSE for details.