Created
January 20, 2011 22:00
-
-
Save HHRy/788774 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GemAgent API Interface | |
# Ryan Stenhouse, 20 January 2011 | |
# Longhand representation of connecting to the FreeAgent API | |
# | |
ga = GemAgent::NetHttpConnection.new 'you.freeagentcentral.com', GemAgent::HttpBasicAuthentication.new('username','password') | |
ga.verify # => { :user_id => 1, :permission_level => 8, :company_type => UK_LIMITED } | |
# Sexy sugary version of the above. | |
# | |
GemAgent::Api.connect 'you.freeagentcentral.com', 'username', 'password' do |api| | |
api.verify # => { :user_id => 1, :permission_level => 8, :company_type => UK_LIMITED } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment