![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
= freeagent_api
Simple ActiveResource Ruby wrapper for the Freeagent Central API (http://www.freeagentcentral.com/developers/freeagent-api).
This supports all GET, POST, PUT and DELETE ActiveResource calls for the following API resources:
At the moment, the following API resources are NOT supported (although is being worked on):
Feel free to clone, fork and add tests.
== Installation
To install as a Gem, just run:
$ sudo gem install freeagent_api -s http://gemcutter.org
Please note: version 0.2 is significantly different from 0.1 so if you are upgrading from the early development version please re-familiarise yourself with the documentation.
== Usage
=== Authentication
Freeagent.authenticate({ :domain => 'yourdomain.freeagentcentral.com', :username => 'your@login.com', :password => 'your_password'})
=== Company
Timelines
@invoice_timeline = Company.invoice_timeline @tax_timeline = Company.tax_timeline
=== Contacts
Find contacts
@contacts = Contact.find :all # returns all contacts @contact = Contact.find id # returns specific contact
Create contact
@contact = Contact.new params @contact.save
Update contact
@contact.first_name = 'Joe' @contact.save
Delete contact
Contact.delete id
@contact.destroy
=== Projects
Find projects
@projects = Project.find :all # returns all projects @project = Project.find id # returns specific project
Create project
@project = Project.new params @project.save
Update project
@project.name = 'Web design project' @project.save
Delete project
Project.delete id
@project.destroy
Nested resources
@invoices = @project.invoices @timeslips = @project.timeslips
=== Tasks
Find tasks
@tasks = Task.find :all # returns all tasks @task = Task.find id # returns specific task
Create task
@task = Task.new params @task.save
Update task
@task.name = 'Create wireframes' @task.save
Delete task
Task.delete id
@task.destroy
=== Invoices
Find Invoices
@invoices = Invoice.find :all # returns all invoices @invoice = Invoice.find id # returns specific invoice
Create invoice
@invoice = Invoice.new params @invoice.save
Update invoice
@invoice.status = 'Sent' @invoice.save
Delete invoice
Invoice.delete id
@invoice.destroy
Changing status
@invoice.mark_as_draft @invoice.mark_as_sent @invoice.mark_as_cancelled
=== Invoice items
Find invoice items
@invoice_items = InvoiceItem.find :all # returns all invoice items @invoice_item = InvoiceItem.find id # returns specific invoice item
Create invoice item
@invoice_item = InvoiceItem.new params @invoice_item.save
Update invoice item
@invoice_item.name = 'Create wireframes' @invoice_item.save
Delete invoice item
InvoiceItem.delete id
@invoice_item.destroy
=== Timeslips
Find timeslips
@timeslips = Timeslip.find :all, :params => {:from => '2009-10-01', :to => '2009-10-30'} # returns all timeslips (:from and :to dates required) @timeslip = Timeslip.find id # returns specific timeslip
Create timeslip
@timeslip = Timeslip.new params @timeslip.save
Update timeslip
@timeslip.hours = '3.5' @timeslip.save
Delete timeslip
Timeslip.delete id
@timeslip.destroy
=== Users
Find users
@users = User.find :all # returns all users @user = User.find id # returns specific user @user = User.find_by_email email
Create user
@user = User.new params @user.save
Update user
@user.first_name = 'Joe Bloggs' @user.save
Delete user
User.delete id
@user.destroy
== Author & Contributors
== Copyright
Copyright (c) 2009-2010 Aaron Russell. See LICENSE for details.
FAQs
Unknown package
We found that freeagent_api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.