Active::Campaign::Ruby
ActiveCampaignRuby is wrapper for the ActiveCampaign API using HttParty. It provides all the active-campaign api actions i.e. contact, list.
Links:
Installation
Add this line to your application's Gemfile:
gem 'active_campaign_ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install active_campaign_ruby
Usage
# To setup the client
client = ActiveCampaign::Client.new(
api_endpoint: 'YOUR-ENDPOINT', # e.g. 'https://yourendpoint.api-us1.com/admin/api.php'
api_key: 'YOUR-API-KEY') # e.g. 'b8f60a1nm600595d5cc37ede55693451812855f'
# To fetch all list
client.list_list ids: 'all'
# To Add/Update/Edit Contact
response = client.contact_sync(email: '[email protected]')
Contributing
- Fork it
- Create your feature branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -am 'Add some feature'
) - Rebase against master we want 1 commit per feature
- Push to the branch (
git push origin feature-branch
) - Create new Pull Request
License
The gem is available as open source under the terms of the MIT License.