lib/promoter/campaign.rb in promoter-0.1.4 vs lib/promoter/campaign.rb in promoter-0.1.5
- old
+ new
@@ -33,7 +33,17 @@
def self.send_surveys(campaign_id, all_contacts=false)
response = Request.post("#{API_URL}/#{campaign_id}/send-surveys/",
{ all_contacts: all_contacts, response_format: :plain })
response.match /Success\, surveys sent\./
end
+
+ # Campaign Params
+ # Parameter Optional? Description
+ # name no The name of the campaign
+ # contact_list no The id of the contact list to associate to this campaign. The contact list will contain a list of contacts you will survey.
+ # email no The id of the email template you will use to survey your contacts in the contact list.
+ def self.create(attributes)
+ response = Request.post(API_URL + "/", attributes)
+ new(response)
+ end
end
end
\ No newline at end of file