API Client Ruby Gem

21 Jul 2015

I have published a basic API wrapper to RubyGems.org. The gem does not abstract all API calls to ruby methods but simply gives the GET, POST, PUT and DELETE methods. The gem handles the authentication with the OnePageCRM API.

You can install this gem by running:

gem install onepagecrm

You can try out the gem in an interactive ruby session like this:

irb:> require 'onepagecrm'
irb:> api_client = OnePageCRM.new('user@example.com', 'password')
irb:> api_client.get('contacts.json')
irb:> api_client.post('contacts.json', {'last_name': 'Bravo', 'first_name': 'Johnny'} )

You can view the code on Github. We would love to hear your feedback on how you are using this gem.

author image

Peter Armstrong

Peter is a software engineer at OnePageCRM. http://peterarmstrong.ie