Skip to content
Browse files

adding more campaign methods

  • Loading branch information...
1 parent 630abea commit 7c87f835ce101f2721f95d98b606b99f0dda327d @mandarinsoda committed
Showing with 34 additions and 20 deletions.
  1. +1 −0 .gitignore
  2. +5 −0 .loadpath
  3. +28 −20 lib/mandarin_soda/chimp_campaign.rb
View
1 .gitignore
@@ -0,0 +1 @@
+*.tmpproj
View
5 .loadpath
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<loadpath>
+ <pathentry path="" type="src"/>
+ <pathentry path="org.rubypeople.rdt.launching.RUBY_CONTAINER" type="con"/>
+</loadpath>
View
48 lib/mandarin_soda/chimp_campaign.rb
@@ -62,35 +62,36 @@ def create_campaign
end
- def update_campaign
+ def update_campaign(campaign_id, name, options)
end
- def resume
+ def resume(campaign_id)
+ chimp_resume_campaign(campaign_id)
end
- def pause
-
+ def pause(campaign_id)
+ chimp_pause_campaign(campaign_id)
end
def unschedule
end
- def content(id)
+ def content(campaign_id)
end
- def schedule(id, time, group_b_time)
-
+ def schedule(campaign_id, time, group_b_time)
+ chimp_campaign_schedule(campaign_id, time, group_b_time)
end
- def send_now(id)
- chimp_send_campaign(id)
+ def send_now(campaign_id)
+ chimp_send_campaign(campaign_id)
end
- def send_test(id)
- chimp_send_campaign(id)
+ def send_test(campaign_id)
+ chimp_send_campaign(campaign_id)
end
private
@@ -112,6 +113,10 @@ def chimp_resume_campaign(campaign_id)
CHIMP_API.call("campaignResume", auth, campaign_id)
end
+ def chimp_resume_campaign(campaign_id)
+ CHIMP_API.call("campaignResume", auth, campaign_id)
+ end
+
def chimp_send_campaign(campaign_id)
CHIMP_API.call("campaignSendNow", auth, campaign_id)
end
@@ -120,23 +125,26 @@ def chimp_send_campaign_test(campaign_id)
CHIMP_API.call("campaignSendTest", auth, campaign_id)
end
- def chimp_campaign_stats(id)
- CHIMP_API.call("campaignStats", auth, id)
+ def chimp_campaign_stats(campaign_id)
+ CHIMP_API.call("campaignStats", auth, campaign_id)
end
- def chimp_campaign_hard_bounces(id, start=0, limit=100)
- CHIMP_API.call("campaignHardBounces", auth, id)
+ def chimp_campaign_hard_bounces(campaign_id, start=0, limit=100)
+ CHIMP_API.call("campaignHardBounces", auth, campaign_id)
end
- def chimp_campaign_soft_bounces(id, start=0, limit=100)
- CHIMP_API.call("campaignSoftBounces", auth, id)
+ def chimp_campaign_soft_bounces(campaign_id, start=0, limit=100)
+ CHIMP_API.call("campaignSoftBounces", auth, campaign_id)
end
- def chimp_campaign_unsubscribed( id, start=0, limit=100)
- CHIMP_API.call("campaignUnsubscribes", auth, id)
+ def chimp_campaign_unsubscribed(campaign_id, start=0, limit=100)
+ CHIMP_API.call("campaignUnsubscribes", auth, campaign_id)
end
-
+ def chimp_campaign_schedule(campaign_id, time, time_b)
+ CHIMP_API.call("campaignSchedule", auth, campaign_id, time, time_b)
+ end
+
end
end
end

0 comments on commit 7c87f83

Please sign in to comment.
Something went wrong with that request. Please try again.