License | BSD3 |
---|---|
Maintainer | Dananji Liyanage <dan9131@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Utils.Types
Contents
Description
JSON data structures to work with Mailchimp JSON API Version 3.0
- data Subscription = Subscription {}
- data EmailId
- data Batch = Batch {
- operations :: [Operation]
- data Operation = Operation {}
- data Params = Params {}
- data Campaign = Campaign {}
- data Settings = Settings {
- s_subject :: String
- s_title :: String
- s_from_name :: String
- s_reply_to :: String
- data Receipient = ListID String
- data ListSubscribersResponse = ListSubscribersResponse {}
- data MailListResponse = MailListResponse {}
- data TemplateResponse = TemplateResponse {}
- data SendMailResponse = SendMailResponse {}
- data SubscriptionResponse = SubscriptionResponse {}
- data BatchSubscriptionResponse = BatchSubscriptionResponse {}
JSON Requests
data Subscription Source
JSON structure containing a single subscription.
This structure includes the email_address, email_type,
and status
to be shown in
the member's profile.
email_type
accepts the two values; html / text
Constructors
Subscription | |
Constructor to build the EmailId.
Constructors
Email String | from email address of the member |
EmailUniqueId String | from unique ID provided by Mailchimp |
ListEmailId String | from emailID of the member in the particular list |
JSON structure for Batch oprations.
Constructors
Batch | |
Fields
|
JSON structure to contain the Batch operation information.
For GET requests, o_param
should be given the list of values.
For POST requests, o_body
should be given the String representation of the
encoded JSON data.
List of parameters to the URL in HTTP request
JSON structure to construct a Campaign
This takes a campaign_type
, which accepts these possible values;
regular, plaintext, absplit, rss,
and variate
.
Constructors
Campaign | |
Fields
|
Settings for the Campaign creation
This includes the basic properties of the Campaign, like subject_line, title, from_name, and reply_to address.
Constructors
Settings | |
Fields
|
JSON Responses
data ListSubscribersResponse Source
Data structure to hold the HTTP response of the request to list the subscribers in a mailing-list.
Constructors
ListSubscribersResponse | |
data MailListResponse Source
Data structure to hold the HTTP response of the request to list the mailing-lists in the account.
data TemplateResponse Source
Data structure to hold the Template information.
This contains the template name and ID.
data SendMailResponse Source
Constructors
SendMailResponse | |
data SubscriptionResponse Source
Data structure to hold the HTTP response of the subscription request.
Constructors
SubscriptionResponse | |
data BatchSubscriptionResponse Source
Data structure to hold the response of the Batch request