Coder Social home page Coder Social logo

kickbooster / active_campaign Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mhenrixon/active_campaign

0.0 1.0 0.0 581 KB

A simple ruby wrapper for the ActiveCampaign API

Home Page: http://www.activecampaign.com/api/

License: MIT License

Ruby 99.56% Shell 0.44%

active_campaign's Introduction

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: "[email protected]", 
  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: "[email protected]", 
  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

active_campaign's People

Contributors

anilrh avatar dakariakin avatar drakula2k avatar ekyfauzi avatar jeffreybiles avatar jmlacroix avatar kartikupadhyay90 avatar kenzhengguan avatar mcmire avatar mhenrixon avatar rylwin avatar seang7 avatar tdtadeu avatar timchaston avatar toreym avatar yihyang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.