The Mad Mimi Ruby Gem

A Ruby wrapper for the Mad Mimi API. Deliver emails and manage your Mad Mimi audience.

Installation

gem install mad_mimi

Documentation

http://rdoc.info/gems/mad_mimi

Usage Examples

require "rubygems"
require "mad_mimi"

# Sets the Mad Mimi configuration options. Best used by passing a block.
MadMimi.configure do |config|
  config.username = "YourMadMimiEmailAddress"
  config.api_key  = "YourMadMimiApiKey"
end

# Sending transactional email
MadMimi.mailer.mail({ :promotion_name => "Welcome", :recipients => "Ozéias Sant'Ana <[email protected]>" })

# Performs an audience search and returns the up to the first 100 results.
MadMimi.audience.search

# Get Audience Members
MadMimi.audience.members

# Get all Audience Lists
MadMimi.audience.lists

# Add Audience List Membership
MadMimi.audience.add_to_list('Clients', {:first_name => 'Ozéias', :last_name => 'Santana', :email => '[email protected]'})

# Remove Audience List Membership
MadMimi.audience.remove_from_list('Clients', '[email protected]')

# Suppress an Audience Member
MadMimi.audience.suppress('[email protected]')

Contributing

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using alpha, beta, and prerelease versions

  • by reporting bugs

  • by suggesting new features

  • by writing or editing documentation

  • by writing specifications

  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)

  • by refactoring code

  • by closing issues

  • by reviewing patches

Submitting an Issue

We use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn’t already been submitted. You can indicate support for an existing issuse by voting it up. When submitting a bug report, please include a Gist that includes a stack trace and any details that may be necessary to reproduce the bug, including your gem version, Ruby version, and operating system. Ideally, a bug report should include a pull request with failing specs.

Copyright © 2011 Ozéias Sant’ana. See LICENSE.txt for further details.