Skip to content
Simple Ruby wrapper for the Freeagent Central API.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
freeagent_api.gemspec

README.rdoc

freeagent_api

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):

  • Contacts

  • Invoices

  • Invoice items

  • Projects

  • Tasks

  • Timeslips

There is no test suite yet. If you feel brave, then feel free to clone, fork and play around.

Installation

To install as a Gem, just run:

$ sudo gem install freeagent_api -s http://gemcutter.org

Usage

Authentication

Freeagent.domain = 'yourdomain.freeagentcentral.com'
Freeagent.username = 'your@login.com'
Freeagent.password = 'your_password'

Contacts

@contacts = Contact.find_all                # returns all contacts
@contact = Contact.find(contact_id)         # returns specific contact

Invoice

@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

Invoice items

@items  = InvoiceItem.find_all(invoice_id)  # returns all items for invoice

Projects

@projects = Project.find_all                # returns all projects
@project = Project.find(project_id)         # returns specific project

Tasks

@task = Task.find(project_id, task_id)      # returns specific task for project

Timeslips

@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

Author

Copyright

Copyright © 2009 Aaron Russell. See LICENSE for details.

Something went wrong with that request. Please try again.