gnumarcelo / campaigning Goto Github PK
View Code? Open in Web Editor NEWA Ruby Gem to access the Campaing Monitor API (http://www.campaignmonitor.com/api/v2/) using SOAP protocol.
License: MIT License
A Ruby Gem to access the Campaing Monitor API (http://www.campaignmonitor.com/api/v2/) using SOAP protocol.
License: MIT License
I'm having trouble sending segmented campaigns. The segments are working correctly on the CM side so I must be using the gem incorrectly. Can someone spot my problem?
Each of the campaigns created (1 per segment) is sent to everyone on the list, i.e. is not limited to the subscribers within the segment.
client = Campaigning::Client.find_by_name(::CAMPAIGN_MONITOR_CLIENT_NAME, :apiKey => ::CAMPAIGN_MONITOR_API_KEY)
list = client.find_list_by_name('subscribers')
# Create a separate campaign for each segment of the list
client.segments.select { |segment| segment.listID == list.listID }.each do |segment| # Can't see a better way of finding the segments of a list ...
campaign = Campaigning::Campaign.create!(
:clientID => client.clientID,
:campaignName => "Test email to #{segment.name} at #{Time.now.to_i}",
:campaignSubject => "Test email to #{segment.name} at #{Time.now.to_i}",
:fromName => ..., :fromEmail => ..., :replyTo => ..., :htmlUrl => ..., :textUrl => ...,
:apiKey => ::CAMPAIGN_MONITOR_API_KEY,
:subscriberListIDs => [list.listID],
:listSegments => [segment]
)
end
I appreciate any assistance.
You're linking to the current version of the API documentation, which is: http://www.campaignmonitor.com/api/
Just thought it could be quite misleading when this gem uses an old version of the API (v2). The documentation link for v2 is: http://www.campaignmonitor.com/api/v2/
To whom it may concern,
On trying to create a new Campaign from within my application I get the error:
311 - Invalid HTML Content
RAILS_ROOT: /Users/stefjongkind/Development/RailsApps/anahata
Application Trace | Framework Trace | Full Trace
vendor/plugins/campaigning/lib/campaigning/module_mixin.rb:23:in handle_response' vendor/plugins/campaigning/lib/campaigning/campaign.rb:63:in
create!'
I can create lists alright, but creating a campaign seems to fail.
I have the following code in my controller:
def new_campaign
@client = Campaigning::Client.find_by_name("Anahata Retreat")
if request.post?
unless params[:campaign][:campaignSubject].blank? or params[:campaign][:title].blank?
list = Campaigning::List.create!(
:clientID => @client.clientID,
:title => params[:campaign][:title],
# :unsubscribePage => "http://www.mycompany.com/campaign/ubsubscribe.html", #If not suplied or equals blank (""), default value will be used
:confirmOptIn => false,
:confirmationSuccessPage => "" #Default value will be used
)
campaign = Campaigning::Campaign.create!(
:clientID => @client.clientID,
:campaignName => "Campaign created for Anahata Retrea",
:campaignSubject => params[:campaign][:campaignSubject].to_s,
:fromName => "Anahata Retreat",
:fromEmail => "[email protected]",
:replyTo => "[email protected]",
:htmlUrl => "http://www.anahata-retreat.org.nz",
:textUrl => "http://www.anahata-retreat.org.nz" ,
:subscriberListIDs => [list.listID],
:listSegments => @client.segments
)
end
end
end
The list gets created, but the Campaign gives the error. Can anyone please, shine a light on this? Many Thanks,
Stef Jongkind
Hi Campaign monitor Team,
Thanks for building this kind of API external library.
Now i am using your campaign API. Now i have used single subscriber method for a list.
A list can have multiple subscribers.My server and campaign monitor server will communicate more than an hour.it dependents upon the no of subscribers. How to do you reduce subscriber request.
I have refer in campaign motioner API. They keep available API method for Importing many subscribers(http://www.campaignmonitor.com/api/subscribers/#importing_subscribers)
How do use in this gem. can you give me example.
I am really looking for wared your commands and suggestions on this.
Thanks,
Pal
Does campaigning have any known conflicts with other gems or plugins? When I try to run the campaigning gem on my production server, I get the error:
no such file to load -- campaigning
And when I try to run it as a plugin, I get:
uninitialized constant ContentsController::Campaigning
Here's what I'm running -
Installed gems:
actionmailer (2.3.5, 2.3.4)
actionpack (2.3.5, 2.3.4)
activemerchant (1.5.1)
activerecord (2.3.5, 2.3.4)
activeresource (2.3.5, 2.3.4)
activesupport (2.3.5, 2.3.4)
builder (2.1.2)
crack (0.1.7, 0.1.6)
gemcutter (0.5.0)
git (1.2.5, 1.2.2)
gnumarcelo-campaigning (0.14.0)
httparty (0.5.2)
httpclient (2.1.5.2)
jeweler (1.4.0, 1.2.1)
json_pure (1.2.4)
log4r (1.1.8)
mechanize (1.0.0)
mini_magick (1.2.5)
mysql (2.8.1)
nokogiri (1.3.0)
rack (1.0.1)
rails (2.3.5, 2.3.4)
rake (0.8.7)
rmagick (2.13.1)
rubyforge (2.0.4)
soap4r (1.5.8)
Plugins:
2dc_jqgrid
jrails
paperclip
squirrel
campaigning
newrelic_rpm
restful_authentication
will_paginate
Thanks for your time and help!
Jon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.