This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Home
jordanbrock edited this page Sep 12, 2010
·
3 revisions
A wrapper class to access the Campaign Monitor API. Written using the wonderful Flickr interface by Scott Raymond as a guide on how to access remote web services
http://jordanbrock.lighthouseapp.com/projects/13212
Author: Jordan Brock <[email protected]>
Copyright: Copyright © 2008 Jordan Brock <[email protected]>
License: MIT <www.opensource.org/licenses/mit-license.php>
USAGE:
require 'campaign_monitor' cm = CampaignMonitor.new(API_KEY) # creates a CampaignMonitor object Can set CAMPAIGN_MONITOR_API_KEY in environment.rb cm.clients # Returns an array of clients associated with the user account cm.campaigns(client_id) cm.lists(client_id) cm.add_subscriber(list_id, email, name) CLIENT client = Client.new(client_id) client.lists client.campaigns LIST list = List.new(list_id) list.add_subscriber(email, name) list.remove_subscriber(email) list.active_subscribers(date) list.unsubscribed(date) list.bounced(date) CAMPAIGN campaign = Campaign.new(campaign_id) campaign.clicks campaign.opens campaign.bounces campaign.unsubscribes campaign.number_recipients campaign.number_clicks campaign.number_opens campaign.number_bounces campaign.number_unsubscribes SUBSCRIBER subscriber = Subscriber.new(email) subscriber.add(list_id) subscriber.unsubscribe(list_id) Data Types SubscriberBounce SubscriberClick SubscriberOpen SubscriberUnsubscribe Result