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

Safe HaskellNone
LanguageHaskell2010

MailchimpSimple.Types

Contents

Synopsis

Request JSON data types

data Subscription Source

JSON data structure for a single subscription

Constructors

Subscription 

Fields

s_apikey :: String

API key of the Mailchimp account

s_id :: String

List ID of the mailing list, by calling

s_email :: EmailId

Example: jon@example.com

s_email_type :: String

Give html/text

s_dou_opt :: Bool
 
s_up_ex :: Bool
 
s_rep_int :: Bool
 
s_send :: Bool
 

data EmailId Source

Enum type JSON data structure for Email related variables

data MailList Source

Constructors

MailList 

Fields

l_apikey :: String

API key of the Mailchimp account

l_filters :: Filters
 
l_start :: Int
 
l_limit :: Int
 
l_sort_field :: String
 
l_sort_dir :: String
 

data Subscribers Source

Constructors

Subscribers 

Fields

su_apikey :: String

API key of the Mailchimp account

su_id :: String

List ID of the mailing list

su_status :: String
 

data BatchSubscription Source

JSON data structure for batch subscriptions

Constructors

BatchSubscription 

Fields

b_apikey :: String

API key of the Mailchimp account

b_id :: String

List ID of the mailing list

b_batch :: [Batch]

Array of tuples of email address and email type

b_dou_opt :: Bool
 
b_up_ex :: Bool
 
b_rep_int :: Bool
 

data Batch Source

Constructors

Batch 

data SendMail Source

Constructors

SendMail 

Fields

m_apikey :: String

API key of the Mailchimp account

m_cid :: String

Campaign ID of the campaign to be sent

Response JSON data types

data SubscriptionResponse Source

Response JSON from 'lists/subscribe.json' call

Constructors

SubscriptionResponse 

Fields

email :: String
 
euid :: String
 
leid :: String
 

data MailListResponse Source

Response JSON from 'lists/list.json' call, which lists the mailing lists in the given account with relevant API key

Constructors

MailListResponse 

Fields

l_name :: Maybe String

List name

l_id :: Maybe String

List ID

data ListSubscribersResponse Source

Response JSON from 'lists/members.json' call, which contains the details each subscriber in the given mailing list

Constructors

ListSubscribersResponse 

Fields

s_name :: Maybe String

Subscriber's name

s_euid :: Maybe String

Subscriber's euid

s_list_name :: Maybe String
 
s_emailType :: Maybe String
 

data BatchSubscriptionResponse Source

Response JSON from the 'lists/batch-subscribe.json' call, which contains the information of the subscriptions of each newly added member