Actionscript 3 Library for FreshBooks API
I started using Freshbooks to do client invoicing and time tracking and have been very happy. When I saw they had an API to allow you to interact with their system I was very excited. Not because I need that, but because its an option. I started kicking around the API documentation and realized that they had library implementations for the FreshBooks API in ruby and perl and php, but none for actionscript. My first thought was how nice it would be to build and AIR application to do my data intake.
So I started a writing the FreshBooks API as an AS3 library. Its totally and miserably incomplete. In fact the only thing it can do right now is actually get your list of clients. Totally worthless. But what I have done is set up the framework for the additional libraries and the authentication stuff. Which not really a small achievement. I dont need this code, I was just playing around. So i wanted to get this post up in case some one out there was searching for such and thing and wanted to contribute to the code, or take over what I started.
What I have is posted in my public svn repository here:
http://svn.simb.net/public/freshbooks/api/trunk/
A quick code snippet to show you what you can do with this might look like this.
var fa:FreshBooks = new FreshBooks('https://YourUrl.freshbooks.com/api/xml-in','your-freshbooks-api-key');
var fc:ClientService = fa.getClientService();
fc.addEventListener(FreshBooksEvent.CLIENT_LIST, getClients);
fc.list();
private function getClients(event:FreshBooksEvent):void{
clients = event.data as ArrayCollection;
}
The data property of the event class is an arraycollection of Client objects. So strong typing and happy days continue.
Let me know if this is useful for anyone. When i get done with the project I am working on I will likely continue building out the library. If you want to help, just let me know ![]()
14 Jan 2008 Simeon

Hey, an ActionScript adapter would be awesome! If you need help, support, kudos, beer (seriously), FreshBooks is here for you. Seriously, thank you so much for doing this!
(You can always reach me at sunir GUESS freshbooks.com)
I just found out about FreshBooks, and now I’m looking at ways to integrate with desktop apps… Let me know if you finish this Library as I would love to use it.
Hey, You’re svn repo is asking for a username/pw. DO you have something I can use to gain access to it. I just want to build a little AIR app that allows me to enter my time for a project.
Hey Tom,
I just checked and my public repository still seems to be working ok. No password required. You only need a password to check files in, but you can checkout and update with no issues.
That being said I have not made any progress with this library as the project I was working on got back burnered. Someone contacted me a few weeks ago and let me know they were setting up a project on SourceForge.net to continue the work. You might want to check that out here
http://sourceforge.net/projects/fbas3api/