kevindb / cf-mailchimp Goto Github PK
View Code? Open in Web Editor NEWColdFusion wrapper for the MailChimp 3.0 API
License: GNU Lesser General Public License v2.1
ColdFusion wrapper for the MailChimp 3.0 API
License: GNU Lesser General Public License v2.1
Just thought I'd leave some sample wrapper code for those who are getting around to upgrading to 3.0. Below is some sample code for putListMember. Cheers!
`
mc = new MailChimp(
apiKey="YOURAPIKEY", // see http://kb.mailchimp.com/accounts/management/about-api-keys
serviceURL="https://us1.api.mailchimp.com/3.0/",
debug="true"); // note debug setting
lists = mc.getLists();
newMember = mc.putListMember(
listId="YOURLISTID", // see http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id
data={
"email_address":"[email protected]",
"status":"subscribed",
"merge_fields" = {"FNAME":"Hey", "Now":"Finley","COMPANY":"Acme"}
}
);
`
Every time I try to call a method I get "API Key Missing" even though it is set and entered into the "password" field. Was the API updated?
I am using Lucee 4.5 on Ubuntu 12.04.
We need the ability to add a subscriber directly to a group/interest in our mailing list. So for example our master list has 3 groups in it. We have figured out how to get the group/interest ID and we tried to modify the code like so.
`
mc = new cfc.mailchimp(
apiKey = "MYAPIKEYHERE", // see http://kb.mailchimp.com/accounts/management/about-api-keys
serviceURL = "https://us1.api.mailchimp.com/3.0/",
debug = false // note debug setting
);
lists = mc.getLists();
newMember = mc.putListMember(
listId = "MainListID", // see http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id
data = {
"email_address" = "#FORM.EMAIL#",
"status" = "subscribed",
"merge_fields" = {
"FNAME" = "#FORM.FNAME#",
"LNAME" = "#FORM.LNAME#"
},
"interests" = {"GroupID" = true}
}
);
`
When we attempt this we get this back.
Schema describes boolean, string found instead
Any idea how this could be accomplished?
ColdFusion wrapper for the MailChimp 2.0 API
while it's 3.0
What's about putting it on Forgebox, I can do a PR for box.sjon file if you like?
Adobe ColdFusion 10
default parameter EXCLUDE_FIELDS=_links was not working as it was being passed in capital letters. turning it into small letters exclude_fields=_links worked.
mailchimp.cfc
line: 325
original
response = listAppend(response, key & "=" & urlEncodedFormat(arguments.params[key]), "&");
changed
response = listAppend(response, lcase(key) & "=" & urlEncodedFormat(arguments.params[key]), "&");
Note: I am not yet fully aware of the mailchimp API as if it may need some parameters in mixed (lower/upper case) letters. In that case, this fix may lead to other issues as mailchimp API appears to be case sensitive.
I could not get the http calls running on Lucee, instead of supplying username and password I had to do
httpService = new http(url=local.url, method="get");
httpService.addParam(type="header",name="Authorization", value="apikey #getApiKey()#");
Can you check if this works as well on ACF
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.