Freddie (the MailChimp mascot) is a .NET API wrapper for MailChimp that keeps things simple. Written in C#.
C# Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Freddie endorse

Freddie (the MailChimp mascot) is a .NET API for MailChimp that keeps things simple.

How to use Freddie?

First (because chimps can be found in trees) you must create a tree. This can be done one of two ways:

var tree = new Tree("");
var response = tree.Do(x => x.Help.GetAccountDetails());

Or, you can add your api key in your configuration and call the static Create method of Tree:

var tree = Tree.Create();
var response = tree.Do(x => x.Help.GetAccountDetails());

And in your config file:

    <add key="Freddie.ApiKey" value="" />

Currently, there is partial support for all api methods. The goal is to add them as they're need in other projects. (Other than the obvious ones of course.


The following samples show how to do some basic functions with Freddie.

Update a list member

This simple example shows how to update a first and last name for a user. There are many other fields you'll want to update, they'll go here as well.

var member = new {
    id = "your_list_id", // List information can be fetched with Lists => tree.Do(x => x.List.Lists());
    email_address = "",
    merge_vars = new { fname = "Chris", lname = "Missal" }
var details = tree.Do(x => x.List.ListUpdateMember(member));

if (details.Success)
    // update was successful