Moneytrackin is a cool online accounting application that lets you track expenses and income, unlike other accounting applications it lets you add tags to each transactions. I love it! Tagging transactions makes it easier to track exactly where my money is going; not only can I see how much money I’ve spent on junk food but also at which store, and all without having to explicitly create an account for that store.
Unfortunately Moneytracking has an annoying limitation which prevents you from tracking tags across accounts, so if you’re buying junk food with cash and credit tagging loses it appeal. Luckily, they provide an API which will allow us to easily get around the tagging limitation programmatically.
I can imagine some pretty cool analytics and infographics coming out of 6 months of data so I wrote Moneytrackin.rb, a Ruby interface to the MoneyTrackin API. It exposes easy-to-use methods to interact with your Moneytrackin account. While it only implements the methods exposed by their API but I intend to add more functionality like tag searches across all accounts soon, imagine piping an amounte-weighted stream of tags to wordle!
With two gems, HTTParty and Mash, I was easily able to create the client interface. I included the HTTParty module within connection class and it gave it a "get" method that retrieves data over HTTP. Usage is simple:
response = self.class.get(self.class.base_uri + '/listProjects/')
Then I passed the response to Mash which converts the XML response into a hash that acts more like a an object., it also also recursively descends down the response converting hashes into Mashes making it easy to get the transactions and the tags associated with them.




