GithubHelp home page GithubHelp logo

mailchimp-gem's Introduction

mailchimp

Mailchimp is a simple API wrapper public Mailchimp APIs.

This is heavily based on https://github.com/amro/uakari/ and https://github.com/amro/gibbon/, and adds support for the private beta release of Mandrill.

While this works for some simple use cases, it comes with warranty of any kind and may not work for your needs yet!

We welcome bug reports and pull requests, and will remove the .alpha label from this gem once we are confident that it should work out of the box for most usage scenarios.

##Installation

    # This supercedes uakari and gibbon
    $ gem install mailchimp --pre

##Requirements

A MailChimp account, MailChimp API key, and any extra setup/keys for other services/APIs that you want to use.

##Basic Usage

See README-api.markdown for details about the API class, which supersedes the Gibbon Gem

    api      = Mailchimp::API.new("your_api_key")

See README-sts.markdown for details about the STS class, which supersedes the Uakari Gem

    sts      = Mailchimp::STS.new("your_api_key")

See README-mandrill for details about the Mandrill class

    mandrill = Mailchimp::Mandrill.new("your_api_key")

##Examples

Take a look in the examples/ folder for examples using each of the APIs. The only actions these perform are either read only or only send emails to you or the address you specify, so it's ok to use your real Mailchimp API keys for them. run them like:

    ruby examples/api_example.rb
    ruby examples/sts_example.rb
    ruby examples/mandrill_example.rb

Other Stuff

API calls default to a 30 second timeout. You can optionally set your own timeout (in seconds) like so:

api = Mailchimp::API.new("apikey", timeout: 60)
api.timeout = 5
api.listBatchSubscribe(list_id: "123", batch: [1..7000], timeout: 300) #per-request will override default

##Development

Write tests before you change anything, run tests before you commit anything:

    $ rake test

We welcome concise pull requests that match the style of this gem and have appropriate tests. To get a console running where you can play, run:

    irb
    $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
    $LOAD_PATH.unshift(File.dirname(__FILE__))
    require 'mailchimp'

##Contributors

See CONTRIBUTORS.markdown for the people that have contributed in some way to this Gem

mailchimp-gem's People

Contributors

bencates avatar ckdake avatar fholgado avatar jeremyvdw avatar wallace avatar winfred avatar

Watchers

 avatar  avatar  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.