0.12
No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
A simple ruby wrapper for the ActiveCampaign API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 0.10
~> 12.0
~> 3.5
~> 0.48
~> 0.13
~> 3.0
~> 3.0

Runtime

>= 1.0, < 3.0
>= 1.0, < 2
 Project Readme

Build StatusCode ClimateTest Coverage FOSSA Status

Active::Campaign::Ruby

A simple wrapper for the ActiveCampaign API. Since their API seems to be basically just form posts to their server don't complain here about the way it works. The only thing we really changed was how results are wrapped and returned and you can read more about that here.

Installation

Add this line to your application's Gemfile:

gem 'active_campaign'

And then execute:

bundle

Or install it yourself as:

gem install active_campaign

Usage

# To setup the client
client = ::ActiveCampaign::Client.new(
        api_url: 'YOUR-ENDPOINT', # e.g. 'https://youraccount.api-us1.com/api/3'
        api_token: 'YOUR-API-KEY') # e.g. 'a4e60a1ba200595d5cc37ede5732545184165e'

# or configure globally for all clients
::ActiveCampaign.configure do |config|
  config.api_url = 'YOUR-ENDPOINT' # e.g. 'https://youraccount.api-us1.com/api/3'
  config.api_token = 'YOUR-API-KEY' # e.g. 'a4e60a1ba200595d5cc37ede5732545184165e'
end
# To create a contact
ActiveCampaign.create_contact(
  email: "mik@el.com", 
  first_name: "Mika",
  last_name: "El",
  phone: "bogusnumber",
)
# To sync a contact (create if doesn't exist or update if matching email)
ActiveCampaign.sync_contact(
  email: "mik@el.com", 
  first_name: "Mika",
  last_name: "El",
  phone: "bogusnumber",
)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Rebase against master we want 1 commit per feature please
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

License

FOSSA Status