CiviCRM Client

Installation

$ gem install civicrm

Getting started

# Required config
CiviCrm.api_base = "https://www.example.org/path/to/civi/codebase/"
CiviCrm.site_key = "YOUR_SITE_KEY"
CiviCrm.api_key = "..."

CiviCrm Objects

# Get list of contacts
CiviCrm::Contact.all

# Create contact
CiviCrm::Contact.create(contact_type: "Organization", organization_name: "test")

# Find and delete
CiviCrm::Contact.find(1).delete

Testing

$ bundle exec rspec spec

Acknowledgements

Created by Iskander Haziev. Maintained by EFF.