godfat/rest-more — pull request #1 by ayamomiji (2011-11-29 09:46:32+00:00)
Title: MadMimi client

Implemented:

* Mailer api (https://madmimi.com/developer/mailer/methods)
* Some audience lists api (create/destory list, add/remove member) (https://madmimi.com/developer/lists)
* Wrapper class for audience list

Usage:

```ruby
client = RestCore::MadMimi.new(username: MADMIMI_USERNAME,
api_key: MADMIMI_API_KEY,
promotion_name: 'promotion_name')

# mail to single recipient
client.mailer('ayaya@example.com', :subject => 'Subject', :raw_html => '...')

# mail to list
client.mailer_to_list('list_name', :subject => 'Subject', :raw_html => '...')

# get all lists
client.audience_lists

# find or create list
list = client.create_audience_list('list_name')
list.mailer(:subject => 'Subject', :raw_html => '...')
list.rename('new_name')
list.destroy

# add/remove member
list.add_member('ayaya@example.org')
list.remove_member('ayaya@example.org')
```