The OfficeAutopilot Ruby Gem

A Ruby wrapper for the OfficeAutopilot API

Installation

gem install office_autopilot

Usage Examples

require "rubygems"
require "office_autopilot"

client = OfficeAutopilot::Client.new(:api_id => 'xxx', :api_key => 'yyy')

# Search Contacts
puts client.contacts_search(:field => 'E-Mail', :op => 'e', :value => '[email protected]')
   # results truncated for brevity but ALL fields (including custom fields) are returned
   => [{"id"=>"7",
         "Contact Information"=>{"First Name"=>"testing", "Last Name"=>"testing", "E-Mail"=>"[email protected]"},
        "Lead Information"=>{"Contact Owner"=>"XXX", "First Referrer"=>"", "Last Referrer"=>""},
        "Sequences and Tags"=>{"Sequences"=>"*/*", "Contact Tags"=>""},
        "Purchase History"=>{}
      }]

# Add Contact
puts client.contacts_add({ 'Contact Information' => {'First Name' => 'Turtle', 'Last Name' => 'Jones', 'E-Mail' => '[email protected]'} })
   # results truncated for brevity
   => {"id"=>"24", "Contact Information"=>{"First Name"=>"Turtle", "Last Name"=>"Jones", "E-Mail"=>"[email protected]"}}

Documentation

OfficeAutopilot API Docs

Todo

  • support ALL API calls

Submitting a Pull Request

  1. Fork the project.
  2. Create a topic branch.
  3. Implement your feature or bug fix.
  4. Add documentation for your feature or bug fix.
  5. Add specs for your feature or bug fix.
  6. Run bundle exec rake spec. If your changes are not 100% covered, go back to step 5.
  7. Commit and push your changes.
  8. Submit a pull request. Please do not include changes to the gemspec or version file. (If you want to create your own version for some reason, please do so in a separate commit.)

Copyright (c) 2011 Prashant Nadarajan. See LICENSE for details.