Posts Tagged ‘ruby’
Xero API + Ruby Revisited
Oh my, thanks very much to Tim Haines for pointing out HTTParty, this little gem makes writing an API for the Xero code really, really easy:
here’s all the methods for getting info out of Xero:
require ‘HTTParty’
require ‘pp’
class Xero
include HTTParty
format :XML
def initialize(url,api_key)
Xero.base_uri(url)
Xero.default_params({:apiKey=>api_key})
[...]
Connecting to the Xero API: Part 1 [Ruby, GET, Contacts]
Hey hey hey, so I finally get an excuse to post some ruby code, yay!
As part of my foray into the Xero API I wanted to get a feel for how easy it would be to connect from non .net languages and as my Ruby was getting a bit rusty I thought I’d pull out [...]