Giter VIP home page Giter VIP logo

cf-mailchimp's Introduction

CF MailChimp

ColdFusion wrapper for the MailChimp 3.0 API

Work in Progress

This wrapper is a work in progress. I have prioritized building out the features needed for my projects. If there is a feature that you would like added, please open an issue or submit a pull request.

List of available methods

  • getLists - Retrieves all lists in the account
  • getList - Retrieves information about the specified list
  • getListMembers - Retrieves a list of all members of the specified list
  • getListMember - Retrieves details on a single member of the specified list
  • putListMembers - Uses a batch operation to add or update multiple members of the specified list
  • putListMember - Adds or updates a single member to the specified list
  • getMemberIdFromEmail - Generates the member ID, the MD5 hash of the email address
  • getGroups - Retrieves a list of all interest groups of the specified list
  • getGroup - Retrieves details on a single interest group of the specified list
  • getInterests - Retrieves a list of all interests in the specified group
  • getInterest - Retrieves details on a single interest in the specified group

Requirements

I have only tested on Adobe ColdFusion 11. I am confident that the wrapper will work in Lucee/Railo 4. It may work in ACF 10 and will NOT work in ACF 9-.

JSONUtil Dependency

CF MailChimp uses the JSONUtil library for JSON serialization/deserialization instead of ColdFusion's built-in serializer. MailChimp's API will reject data being sent as a boolean or numeric value when it is expecting a string. CF's serializer frequently and silently converts variable types and cannot be controlled.

If you put JSONUtil.cfc in the same folder as mailchimp.cfc, it will be found automatically.
If you want to keep JSONUtil.cfc in a different folder, then add the argument jsonUtil to your init, and pass it the normal ColdFusion dot-delimited path to the component.

If JSONUtil.cfc cannot be found, CF MailChimp will fall back to using ColdFusion's built-in serializer.

Community

Want to contribute to CF MailChimp? Awesome! See CONTRIBUTING for more information.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct to ensure that this project is a welcoming place for everyone to contribute to. By participating in this project you agree to abide by its terms.

Usage

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"
		}
	}
);

Resources

Contributors

This project is based on previous work by others. See CONTRIBUTORS for details.

License

This repository is licensed under the GNU Lesser General Public License v2.1. See LICENSE for details.

cf-mailchimp's People

Contributors

gunnarlieb avatar kevindb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.