Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 137 lines (98 sloc) 4.986 kb
901b406 Joshua Holbrook [doc] Used the api popup link and tried to clean up the examples
jfhbrook authored
1 # Appendix: Mailchimp Integration in Nodejitsu
023403b Joshua Holbrook [fix] anchor tags in appendices now consistent, after headers for ronn, ...
jfhbrook authored
2 <a name="apx:mailchimp"></a>
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
3
4 Nodejitsu features integration with [MailChimp](http://mailchimp.com). What is
5 MailChimp? In their [own words](http://mailchimp.com/about/):
6
7 MailChimp makes it easy to design exceptional email campaigns, share them on
8 social networks, integrate with web services you already use, manage
9 subscribers and track your results. You'll love mixing and matching
10 MailChimp's templates, features and integrations to suit your needs—think of
11 it as your own personal newsletter publishing platform.
12
13 But what about integration? MailChimp integration with Nodejitsu means that you
14 can interact with your MailChimp lists using the same Nodejitsu API that you use
15 to interact with your apps!
16
17 ## Getting Started
18
19 In order to set up the MailChimp integration, you have to
20 [sign up for MailChimp](http://mailchimp.com/signup) at
21 [their web site](http://mailchimp.com):
22
6a2e57b Joshua Holbrook Added proper image urls to mailchimp chapter
jfhbrook authored
23 ![](https://github.com/jesusabdullah/handbook/raw/master/fig/signup_page.png)
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
24
25 Once you sign up for MailChimp, they can help you get your bearings so you can
26 get to managing e-mail campaigns quick:
27
6a2e57b Joshua Holbrook Added proper image urls to mailchimp chapter
jfhbrook authored
28 ![](https://github.com/jesusabdullah/handbook/raw/master/fig/dashboard_help.png)
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
29
901b406 Joshua Holbrook [doc] Used the api popup link and tried to clean up the examples
jfhbrook authored
30 But, in order to integrate with Nodejitsu, what you need is an API key. The
31 easiest way to get an API key *right now* is to visit
32 <https://admin.mailchimp.com/account/api-key-popup>:
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
33
901b406 Joshua Holbrook [doc] Used the api popup link and tried to clean up the examples
jfhbrook authored
34 ![](https://github.com/jesusabdullah/handbook/raw/master/fig/api_key_popup.png)
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
35
36 All you have to do to link your MailChimp account with your Nodejitsu account
37 is to copy-and-paste this API key into Nodejitsu's web application interface:
38
873927f Joshua Holbrook Some images had double-bangs for some reason.
jfhbrook authored
39 ![](https://github.com/jesusabdullah/handbook/raw/master/fig/nodejitsu_dashboard_api_key.png)
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
40
41 Now you're good to go! Nodejitsu reports that I have one mailing list, and that
901b406 Joshua Holbrook [doc] Used the api popup link and tried to clean up the examples
jfhbrook authored
42 the two subscribers are Josh's mother and himself.
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
43
873927f Joshua Holbrook Some images had double-bangs for some reason.
jfhbrook authored
44 ![](https://github.com/jesusabdullah/handbook/raw/master/fig/nodejitsu_dashboard.png)
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
45
46 ## Interacting with your lists via the Nodejitsu JSON API: A Broad Overview
47
48 Like the rest of Nodejitsu's features, addon functionality can be accessed using
49 Nodejitsu's JSON API. For example, here's what happens when I
901b406 Joshua Holbrook [doc] Used the api popup link and tried to clean up the examples
jfhbrook authored
50 `GET /addons/:user-id`:
51
52 $ curl --user 'jesusabdullah:abc123' http://api.nodejitsu.com/addons/jesusabdullah/
53
54
55 { "_id": "jesusabdullah",
56 "username": "jesusabdullah",
57 "password-salt": "************",
58 "password": "********************************",
59 "email": "josh.holbrook@gmail.com",
60 "addons-mailchimp-apikey": "********************************-us2",
61 "_rev": "3-2df3731e8cc48d8e11511096dad140e8",
62 "status": "active",
63 "inviteCode": "***********",
64 "resource": "User" }
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
65
66 In order to interact with the MailChimp add-on in particular, use the
67 `/addons/:user-id/signups` resource:
68
901b406 Joshua Holbrook [doc] Used the api popup link and tried to clean up the examples
jfhbrook authored
69 $ curl --user 'jesusabdullah:abc123' http://api.nodejitsu.com/addons/jesusabdullah/signups
70
71
72 { "lists":
73 { "total": 1,
74 "data":
75 [ { "id": "f3b7d6450c",
76 "web_id": 646837,
77 "name": "Example Mailing List",
78 "date_created": "2011-07-26 01:06:42",
79 "email_type_option": false,
80 "use_awesomebar": true,
81 "default_from_name": "Joshua Holbrook",
82 "default_from_email": "josh.holbrook@gmail.com",
83 "default_subject": "Relevant AND Non-Spammy!",
84 "default_language": "en",
85 "list_rating": 0,
86 "stats":
87 { "member_count": 2,
88 "unsubscribe_count": 0,
89 "cleaned_count": 0,
90 "member_count_since_send": 3,
91 "unsubscribe_count_since_send": 0,
92 "cleaned_count_since_send": 0,
93 "campaign_count": 0,
94 "grouping_count": 0,
95 "group_count": 0,
96 "merge_var_count": 0,
97 "avg_sub_rate": null,
98 "avg_unsub_rate": null,
99 "target_sub_rate": null,
100 "open_rate": null,
101 "click_rate": null },
102 "modules": [] } ] } }
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
103
104 You can use the list ID to access the particular list information with
105 `GET /addons/:user-id/signups/:list-id/`:
106
901b406 Joshua Holbrook [doc] Used the api popup link and tried to clean up the examples
jfhbrook authored
107 curl --user 'jesusabdullah:abc123' http://api.nodejitsu.com/addons/jesusabdullah/signups/f3b7d6450c
108
109
110 { "total": 2,
111 "data":
112 [ { "email": "holbrook@*********.net",
113 "timestamp": "2011-07-26 01:08:11" },
114 { "email": "josh@nodejitsu.com",
115 "timestamp": "2011-07-26 01:09:11" } ] }
116
117 This confirms that Josh and his Mom are is in the example list.
bf96274 Joshua Holbrook Added chapter on MailChimp...for now.
jfhbrook authored
118
119 ## More API Commands:
120
121 * **Retrieve your API key:**
122
123 GET /addons/:user-id/signups/apikey/
124
125 * **Set your API key:**
126
127 PUT /addons/:user-id/signups/apikey/
128
129 * **Subscribe to a list:**
130
131 POST /addons/:user-id/signups/:list-id/subscribe/
132
133 * **Unsubscribe from a list:**
134
135 POST /addons/:user-id/signups/:list-id/unsubscribe/
2a33515 Joshua Holbrook Broke up terminal snippets so they fit on the pdf propers
jfhbrook authored
136
Something went wrong with that request. Please try again.