MailchimpSimple-0.1.0.0: A Haskell library to handle mailing lists in MailchimpSimple using its JSON API.

Safe HaskellNone
LanguageHaskell2010

MailchimpSimple

Contents

Synopsis

Handling Mailing lists in Mailchimp

addSubscriber Source

Arguments

:: String

API key

-> String

List ID

-> String

Email address to be added

-> String

Email type, choose from "html", "text"

-> IO (Either String SubscriptionResponse)

SubscriptionResponse response

Add a new subscriber

batchSubscribe Source

Arguments

:: String

API key

-> String

List ID

-> [String]

List of email addresses to be added

-> IO BatchSubscriptionResponse

BatchSubscriptionResponse response

Add a batch of subscribers

listMailingLists Source

Arguments

:: String

API key

-> IO [MailListResponse]

Array of MailListResponse response

List mailing lists in a particular account with the given API key

listSubscribers Source

Arguments

:: String

API key

-> String

List ID

-> IO [ListSubscribersResponse]

Array of ListSubscribersResponse response

List subscribers in a mailing list with the given list ID

Sending & Creating campaigns

getTemplates Source

Arguments

:: String

API key

-> IO [TemplateResponse]

Array of TemplateResponse response

Get the templates saved in hte Mailchimp account

createCampaign Source

Arguments

:: String

API key

-> String

List ID

-> String

Sender's name

-> String

Sender's email

-> String

Campaign type, choose from "regular", "plaintext", "absplit", "rss", "auto"

-> String

Subject of the campaign

-> String

Receipient's name

-> Int

Template ID

-> String

Content of the campaign. Example: HTML "h1Title/h1"

-> IO (Maybe String)

Campaign ID

Create a new campaign and save it in the Campaigns list

sendEmail Source

Arguments

:: String

API key

-> String

Campaign ID

-> IO (Either String SendMailResponse)

SendMailResponse JSON response

Send a saved email campaign