Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new funtions for interest categories #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/mailchimp.cfc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* ColdFusion MailChimp API 3.0 wrapper
* v1.0.0
* v1.0.1
* https://github.com/kevindb/cf-mailchimp
*
* ColdFusion wrapper for the MailChimp 3.0 API
Expand Down Expand Up @@ -59,6 +59,28 @@ component displayname="MailChimp" {
return get("lists/" & arguments.listId);
}

// Retrieves a list of interest categories (group titles) for a specified list
public function getListInterestCategories(
required string listId
) {
return get("lists/" & arguments.listId & "/interest-categories");
}

// Retrieves a details for an interest category for a specified list
public function getListInterestCategoryDetails(
required string listId
required string interestCategoryId
) {
return get("lists/" & arguments.listId & "/interest-categories/" & arguments.interestCategoryId);
}

// Retrieves interest for an interest category for a specified list
public function getListInterestCategoryInterests(
required string listId
required string interestCategoryId
) {
return get("lists/" & arguments.listId & "/interest-categories/" & arguments.interestCategoryId & '/interests');
}

// MailChimp Member calls
// http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/
Expand Down