Version Description
- Fixed aweber list issue
Download this release
Release Info
Developer | MyThemeShop |
Plugin | WP Subscribe |
Version | 1.2.5 |
Comparing to | |
See all releases |
Code changes from version 1.2.4 to 1.2.5
- Mailchimp/Campaigns.php +0 -378
- Mailchimp/Conversations.php +0 -80
- Mailchimp/Ecomm.php +0 -86
- Mailchimp/Exceptions.php +0 -471
- Mailchimp/Folders.php +0 -62
- Mailchimp/Gallery.php +0 -106
- Mailchimp/Goal.php +0 -49
- Mailchimp/Helper.php +0 -237
- Mailchimp/Lists.php +0 -904
- Mailchimp/Mobile.php +0 -8
- Mailchimp/Neapolitan.php +0 -10
- Mailchimp/Reports.php +0 -459
- Mailchimp/Templates.php +0 -114
- Mailchimp/Users.php +0 -105
- Mailchimp/Vip.php +0 -111
- css/wp-subscribe-admin.css +0 -12
- css/wp-subscribe.css +0 -24
- js/wp-subscribe-admin.js +0 -43
- readme.txt +5 -2
- wp-subscribe.php +3 -2
Mailchimp/Campaigns.php
DELETED
@@ -1,378 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Campaigns {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Get the content (both html and text) for a campaign either as it would appear in the campaign archive or as the raw, original content
|
10 |
-
* @param string $cid
|
11 |
-
* @param associative_array $options
|
12 |
-
* - view string optional one of "archive" (default), "preview" (like our popup-preview) or "raw"
|
13 |
-
* - email associative_array optional if provided, view is "archive" or "preview", the campaign's list still exists, and the requested record is subscribed to the list. the returned content will be populated with member data populated. a struct with one of the following keys - failing to provide anything will produce an error relating to the email address. If multiple keys are provided, the first one from the following list that we find will be used, the rest will be ignored.
|
14 |
-
* - email string an email address
|
15 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
16 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
17 |
-
* @return associative_array containing all content for the campaign
|
18 |
-
* - html string The HTML content used for the campaign with merge tags intact
|
19 |
-
* - text string The Text content used for the campaign with merge tags intact
|
20 |
-
*/
|
21 |
-
public function content($cid, $options=array()) {
|
22 |
-
$_params = array("cid" => $cid, "options" => $options);
|
23 |
-
return $this->master->call('campaigns/content', $_params);
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Create a new draft campaign to send. You <strong>can not</strong> have more than 32,000 campaigns in your account.
|
28 |
-
* @param string $type
|
29 |
-
* @param associative_array $options
|
30 |
-
* - list_id string the list to send this campaign to- get lists using lists/list()
|
31 |
-
* - subject string the subject line for your campaign message
|
32 |
-
* - from_email string the From: email address for your campaign message
|
33 |
-
* - from_name string the From: name for your campaign message (not an email address)
|
34 |
-
* - to_name string the To: name recipients will see (not email address)
|
35 |
-
* - template_id int optional - use this user-created template to generate the HTML content of the campaign (takes precendence over other template options)
|
36 |
-
* - gallery_template_id int optional - use a template from the public gallery to generate the HTML content of the campaign (takes precendence over base template options)
|
37 |
-
* - base_template_id int optional - use this a base/start-from-scratch template to generate the HTML content of the campaign
|
38 |
-
* - folder_id int optional - automatically file the new campaign in the folder_id passed. Get using folders/list() - note that Campaigns and Autoresponders have separate folder setups
|
39 |
-
* - tracking associative_array optional - set which recipient actions will be tracked. Click tracking can not be disabled for Free accounts.
|
40 |
-
* - opens bool whether to track opens, defaults to true
|
41 |
-
* - html_clicks bool whether to track clicks in HTML content, defaults to true
|
42 |
-
* - text_clicks bool whether to track clicks in Text content, defaults to false
|
43 |
-
* - title string optional - an internal name to use for this campaign. By default, the campaign subject will be used.
|
44 |
-
* - authenticate boolean optional - set to true to enable SenderID, DomainKeys, and DKIM authentication, defaults to false.
|
45 |
-
* - analytics associative_array optional - one or more of these keys set to the tag to use - that can be any custom text (up to 50 bytes)
|
46 |
-
* - google string for Google Analytics tracking
|
47 |
-
* - clicktale string for ClickTale tracking
|
48 |
-
* - gooal string for Goal tracking (the extra 'o' in the param name is not a typo)
|
49 |
-
* - auto_footer boolean optional Whether or not we should auto-generate the footer for your content. Mostly useful for content from URLs or Imports
|
50 |
-
* - inline_css boolean optional Whether or not css should be automatically inlined when this campaign is sent, defaults to false.
|
51 |
-
* - generate_text boolean optional Whether of not to auto-generate your Text content from the HTML content. Note that this will be ignored if the Text part of the content passed is not empty, defaults to false.
|
52 |
-
* - auto_tweet boolean optional If set, this campaign will be auto-tweeted when it is sent - defaults to false. Note that if a Twitter account isn't linked, this will be silently ignored.
|
53 |
-
* - auto_fb_post array optional If set, this campaign will be auto-posted to the page_ids contained in the array. If a Facebook account isn't linked or the account does not have permission to post to the page_ids requested, those failures will be silently ignored.
|
54 |
-
* - fb_comments boolean optional If true, the Facebook comments (and thus the <a href="http://kb.mailchimp.com/article/i-dont-want-an-archiave-of-my-campaign-can-i-turn-it-off/" target="_blank">archive bar</a> will be displayed. If false, Facebook comments will not be enabled (does not imply no archive bar, see previous link). Defaults to "true".
|
55 |
-
* - timewarp boolean optional If set, this campaign must be scheduled 24 hours in advance of sending - default to false. Only valid for "regular" campaigns and "absplit" campaigns that split on schedule_time.
|
56 |
-
* - ecomm360 boolean optional If set, our <a href="http://www.mailchimp.com/blog/ecommerce-tracking-plugin/" target="_blank">Ecommerce360 tracking</a> will be enabled for links in the campaign
|
57 |
-
* - crm_tracking array optional If set, an array of structs to enable CRM tracking for:
|
58 |
-
* - salesforce associative_array optional Enable SalesForce push back
|
59 |
-
* - campaign bool optional - if true, create a Campaign object and update it with aggregate stats
|
60 |
-
* - notes bool optional - if true, attempt to update Contact notes based on email address
|
61 |
-
* - highrise associative_array optional Enable Highrise push back
|
62 |
-
* - campaign bool optional - if true, create a Kase object and update it with aggregate stats
|
63 |
-
* - notes bool optional - if true, attempt to update Contact notes based on email address
|
64 |
-
* - capsule associative_array optional Enable Capsule push back (only notes are supported)
|
65 |
-
* - notes bool optional - if true, attempt to update Contact notes based on email address
|
66 |
-
* @param associative_array $content
|
67 |
-
* - html string for raw/pasted HTML content
|
68 |
-
* - sections associative_array when using a template instead of raw HTML, each key should be the unique mc:edit area name from the template.
|
69 |
-
* - text string for the plain-text version
|
70 |
-
* - url string to have us pull in content from a URL. Note, this will override any other content options - for lists with Email Format options, you'll need to turn on generate_text as well
|
71 |
-
* - archive string to send a Base64 encoded archive file for us to import all media from. Note, this will override any other content options - for lists with Email Format options, you'll need to turn on generate_text as well
|
72 |
-
* - archive_type string optional - only necessary for the "archive" option. Supported formats are: zip, tar.gz, tar.bz2, tar, tgz, tbz . If not included, we will default to zip
|
73 |
-
* @param associative_array $segment_opts
|
74 |
-
* @param associative_array $type_opts
|
75 |
-
* - rss associative_array For RSS Campaigns this, struct should contain:
|
76 |
-
* - url string the URL to pull RSS content from - it will be verified and must exist
|
77 |
-
* - schedule string optional one of "daily", "weekly", "monthly" - defaults to "daily"
|
78 |
-
* - schedule_hour string optional an hour between 0 and 24 - default to 4 (4am <em>local time</em>) - applies to all schedule types
|
79 |
-
* - schedule_weekday string optional for "weekly" only, a number specifying the day of the week to send: 0 (Sunday) - 6 (Saturday) - defaults to 1 (Monday)
|
80 |
-
* - schedule_monthday string optional for "monthly" only, a number specifying the day of the month to send (1 - 28) or "last" for the last day of a given month. Defaults to the 1st day of the month
|
81 |
-
* - days associative_array optional used for "daily" schedules only, an array of the <a href="http://en.wikipedia.org/wiki/ISO-8601#Week_dates" target="_blank">ISO-8601 weekday numbers</a> to send on
|
82 |
-
* - 1 bool optional Monday, defaults to true
|
83 |
-
* - 2 bool optional Tuesday, defaults to true
|
84 |
-
* - 3 bool optional Wednesday, defaults to true
|
85 |
-
* - 4 bool optional Thursday, defaults to true
|
86 |
-
* - 5 bool optional Friday, defaults to true
|
87 |
-
* - 6 bool optional Saturday, defaults to true
|
88 |
-
* - 7 bool optional Sunday, defaults to true
|
89 |
-
* - absplit associative_array For A/B Split campaigns, this struct should contain:
|
90 |
-
* - split_test string The values to segment based on. Currently, one of: "subject", "from_name", "schedule". NOTE, for "schedule", you will need to call campaigns/schedule() separately!
|
91 |
-
* - pick_winner string How the winner will be picked, one of: "opens" (by the open_rate), "clicks" (by the click rate), "manual" (you pick manually)
|
92 |
-
* - wait_units int optional the default time unit to wait before auto-selecting a winner - use "3600" for hours, "86400" for days. Defaults to 86400.
|
93 |
-
* - wait_time int optional the number of units to wait before auto-selecting a winner - defaults to 1, so if not set, a winner will be selected after 1 Day.
|
94 |
-
* - split_size int optional this is a percentage of what size the Campaign's List plus any segmentation options results in. "schedule" type forces 50%, all others default to 10%
|
95 |
-
* - from_name_a string optional sort of, required when split_test is "from_name"
|
96 |
-
* - from_name_b string optional sort of, required when split_test is "from_name"
|
97 |
-
* - from_email_a string optional sort of, required when split_test is "from_name"
|
98 |
-
* - from_email_b string optional sort of, required when split_test is "from_name"
|
99 |
-
* - subject_a string optional sort of, required when split_test is "subject"
|
100 |
-
* - subject_b string optional sort of, required when split_test is "subject"
|
101 |
-
* - auto associative_array For AutoResponder campaigns, this struct should contain:
|
102 |
-
* - offset-units string one of "hourly", "day", "week", "month", "year" - required
|
103 |
-
* - offset-time string optional, sort of - the number of units must be a number greater than 0 for signup based autoresponders, ignored for "hourly"
|
104 |
-
* - offset-dir string either "before" or "after", ignored for "hourly"
|
105 |
-
* - event string optional "signup" (default) to base this members added to a list, "date", "annual", or "birthday" to base this on merge field in the list, "campaignOpen" or "campaignClicka" to base this on any activity for a campaign, "campaignClicko" to base this on clicks on a specific URL in a campaign, "mergeChanged" to base this on a specific merge field being changed to a specific value
|
106 |
-
* - event-datemerge string optional sort of, this is required if the event is "date", "annual", "birthday", or "mergeChanged"
|
107 |
-
* - campaign_id string optional sort of, required for "campaignOpen", "campaignClicka", or "campaignClicko"
|
108 |
-
* - campaign_url string optional sort of, required for "campaignClicko"
|
109 |
-
* - schedule_hour int The hour of the day - 24 hour format in GMT - the autoresponder should be triggered, ignored for "hourly"
|
110 |
-
* - use_import_time boolean whether or not imported subscribers (ie, <em>any</em> non-double optin subscribers) will receive
|
111 |
-
* - days associative_array optional used for "daily" schedules only, an array of the <a href="http://en.wikipedia.org/wiki/ISO-8601#Week_dates" target="_blank">ISO-8601 weekday numbers</a> to send on<
|
112 |
-
* - 1 bool optional Monday, defaults to true
|
113 |
-
* - 2 bool optional Tuesday, defaults to true
|
114 |
-
* - 3 bool optional Wednesday, defaults to true
|
115 |
-
* - 4 bool optional Thursday, defaults to true
|
116 |
-
* - 5 bool optional Friday, defaults to true
|
117 |
-
* - 6 bool optional Saturday, defaults to true
|
118 |
-
* - 7 bool optional Sunday, defaults to true
|
119 |
-
* @return associative_array the new campaign's details - will return same data as single campaign from campaigns/list()
|
120 |
-
*/
|
121 |
-
public function create($type, $options, $content, $segment_opts=null, $type_opts=null) {
|
122 |
-
$_params = array("type" => $type, "options" => $options, "content" => $content, "segment_opts" => $segment_opts, "type_opts" => $type_opts);
|
123 |
-
return $this->master->call('campaigns/create', $_params);
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Delete a campaign. Seriously, "poof, gone!" - be careful! Seriously, no one can undelete these.
|
128 |
-
* @param string $cid
|
129 |
-
* @return associative_array with a single entry:
|
130 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
131 |
-
*/
|
132 |
-
public function delete($cid) {
|
133 |
-
$_params = array("cid" => $cid);
|
134 |
-
return $this->master->call('campaigns/delete', $_params);
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Get the list of campaigns and their details matching the specified filters
|
139 |
-
* @param associative_array $filters
|
140 |
-
* - campaign_id string optional - return the campaign using a know campaign_id. Accepts multiples separated by commas when not using exact matching.
|
141 |
-
* - parent_id string optional - return the child campaigns using a known parent campaign_id. Accepts multiples separated by commas when not using exact matching.
|
142 |
-
* - list_id string optional - the list to send this campaign to - get lists using lists/list(). Accepts multiples separated by commas when not using exact matching.
|
143 |
-
* - folder_id int optional - only show campaigns from this folder id - get folders using folders/list(). Accepts multiples separated by commas when not using exact matching.
|
144 |
-
* - template_id int optional - only show campaigns using this template id - get templates using templates/list(). Accepts multiples separated by commas when not using exact matching.
|
145 |
-
* - status string optional - return campaigns of a specific status - one of "sent", "save", "paused", "schedule", "sending". Accepts multiples separated by commas when not using exact matching.
|
146 |
-
* - type string optional - return campaigns of a specific type - one of "regular", "plaintext", "absplit", "rss", "auto". Accepts multiples separated by commas when not using exact matching.
|
147 |
-
* - from_name string optional - only show campaigns that have this "From Name"
|
148 |
-
* - from_email string optional - only show campaigns that have this "Reply-to Email"
|
149 |
-
* - title string optional - only show campaigns that have this title
|
150 |
-
* - subject string optional - only show campaigns that have this subject
|
151 |
-
* - sendtime_start string optional - only show campaigns that have been sent since this date/time (in GMT) - - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00" - if this is invalid the whole call fails
|
152 |
-
* - sendtime_end string optional - only show campaigns that have been sent before this date/time (in GMT) - - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00" - if this is invalid the whole call fails
|
153 |
-
* - uses_segment boolean - whether to return just campaigns with or without segments
|
154 |
-
* - exact boolean optional - flag for whether to filter on exact values when filtering, or search within content for filter values - defaults to true. Using this disables the use of any filters that accept multiples.
|
155 |
-
* @param int $start
|
156 |
-
* @param int $limit
|
157 |
-
* @param string $sort_field
|
158 |
-
* @param string $sort_dir
|
159 |
-
* @return associative_array containing a count of all matching campaigns, the specific ones for the current page, and any errors from the filters provided
|
160 |
-
* - total int the total number of campaigns matching the filters passed in
|
161 |
-
* - data array structs for each campaign being returned
|
162 |
-
* - id string Campaign Id (used for all other campaign functions)
|
163 |
-
* - web_id int The Campaign id used in our web app, allows you to create a link directly to it
|
164 |
-
* - list_id string The List used for this campaign
|
165 |
-
* - folder_id int The Folder this campaign is in
|
166 |
-
* - template_id int The Template this campaign uses
|
167 |
-
* - content_type string How the campaign's content is put together - one of 'template', 'html', 'url'
|
168 |
-
* - title string Title of the campaign
|
169 |
-
* - type string The type of campaign this is (regular,plaintext,absplit,rss,inspection,auto)
|
170 |
-
* - create_time string Creation time for the campaign
|
171 |
-
* - send_time string Send time for the campaign - also the scheduled time for scheduled campaigns.
|
172 |
-
* - emails_sent int Number of emails email was sent to
|
173 |
-
* - status string Status of the given campaign (save,paused,schedule,sending,sent)
|
174 |
-
* - from_name string From name of the given campaign
|
175 |
-
* - from_email string Reply-to email of the given campaign
|
176 |
-
* - subject string Subject of the given campaign
|
177 |
-
* - to_name string Custom "To:" email string using merge variables
|
178 |
-
* - archive_url string Archive link for the given campaign
|
179 |
-
* - inline_css boolean Whether or not the campaign content's css was auto-inlined
|
180 |
-
* - analytics string Either "google" if enabled or "N" if disabled
|
181 |
-
* - analytics_tag string The name/tag the campaign's links were tagged with if analytics were enabled.
|
182 |
-
* - authenticate boolean Whether or not the campaign was authenticated
|
183 |
-
* - ecomm360 boolean Whether or not ecomm360 tracking was appended to links
|
184 |
-
* - auto_tweet boolean Whether or not the campaign was auto tweeted after sending
|
185 |
-
* - auto_fb_post string A comma delimited list of Facebook Profile/Page Ids the campaign was posted to after sending. If not used, blank.
|
186 |
-
* - auto_footer boolean Whether or not the auto_footer was manually turned on
|
187 |
-
* - timewarp boolean Whether or not the campaign used Timewarp
|
188 |
-
* - timewarp_schedule string The time, in GMT, that the Timewarp campaign is being sent. For A/B Split campaigns, this is blank and is instead in their schedule_a and schedule_b in the type_opts array
|
189 |
-
* - parent_id string the unique id of the parent campaign (currently only valid for rss children). Will be blank for non-rss child campaigns or parent campaign has been deleted.
|
190 |
-
* - is_child boolean true if this is an RSS child campaign. Will return true even if the parent campaign has been deleted.
|
191 |
-
* - tests_sent string tests sent
|
192 |
-
* - tests_remain int test sends remaining
|
193 |
-
* - tracking associative_array the various tracking options used
|
194 |
-
* - html_clicks boolean whether or not tracking for html clicks was enabled.
|
195 |
-
* - text_clicks boolean whether or not tracking for text clicks was enabled.
|
196 |
-
* - opens boolean whether or not opens tracking was enabled.
|
197 |
-
* - segment_text string a string marked-up with HTML explaining the segment used for the campaign in plain English
|
198 |
-
* - segment_opts array the segment used for the campaign - can be passed to campaigns/segment-test or campaigns/create()
|
199 |
-
* - saved_segment associative_array if a saved segment was used (match+conditions returned above):
|
200 |
-
* - id int the saved segment id
|
201 |
-
* - type string the saved segment type
|
202 |
-
* - name string the saved segment name
|
203 |
-
* - type_opts associative_array the type-specific options for the campaign - can be passed to campaigns/create()
|
204 |
-
* - comments_total int total number of comments left on this campaign
|
205 |
-
* - comments_unread int total number of unread comments for this campaign based on the login the apikey belongs to
|
206 |
-
* - summary associative_array if available, the basic aggregate stats returned by reports/summary
|
207 |
-
* - errors array structs of any errors found while loading lists - usually just from providing invalid list ids
|
208 |
-
* - filter string the filter that caused the failure
|
209 |
-
* - value string the filter value that caused the failure
|
210 |
-
* - code int the error code
|
211 |
-
* - error string the error message
|
212 |
-
*/
|
213 |
-
public function getList($filters=array(), $start=0, $limit=25, $sort_field='create_time', $sort_dir='DESC') {
|
214 |
-
$_params = array("filters" => $filters, "start" => $start, "limit" => $limit, "sort_field" => $sort_field, "sort_dir" => $sort_dir);
|
215 |
-
return $this->master->call('campaigns/list', $_params);
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Pause an AutoResponder or RSS campaign from sending
|
220 |
-
* @param string $cid
|
221 |
-
* @return associative_array with a single entry:
|
222 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
223 |
-
*/
|
224 |
-
public function pause($cid) {
|
225 |
-
$_params = array("cid" => $cid);
|
226 |
-
return $this->master->call('campaigns/pause', $_params);
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Returns information on whether a campaign is ready to send and possible issues we may have detected with it - very similar to the confirmation step in the app.
|
231 |
-
* @param string $cid
|
232 |
-
* @return associative_array containing:
|
233 |
-
* - is_ready bool whether or not you're going to be able to send this campaign
|
234 |
-
* - items array an array of structs explaining basically what the app's confirmation step would
|
235 |
-
* - type string the item type - generally success, warning, or error
|
236 |
-
* - heading string the item's heading in the app
|
237 |
-
* - details string the item's details from the app, sans any html tags/links
|
238 |
-
*/
|
239 |
-
public function ready($cid) {
|
240 |
-
$_params = array("cid" => $cid);
|
241 |
-
return $this->master->call('campaigns/ready', $_params);
|
242 |
-
}
|
243 |
-
|
244 |
-
/**
|
245 |
-
* Replicate a campaign.
|
246 |
-
* @param string $cid
|
247 |
-
* @return associative_array the matching campaign's details - will return same data as single campaign from campaigns/list()
|
248 |
-
*/
|
249 |
-
public function replicate($cid) {
|
250 |
-
$_params = array("cid" => $cid);
|
251 |
-
return $this->master->call('campaigns/replicate', $_params);
|
252 |
-
}
|
253 |
-
|
254 |
-
/**
|
255 |
-
* Resume sending an AutoResponder or RSS campaign
|
256 |
-
* @param string $cid
|
257 |
-
* @return associative_array with a single entry:
|
258 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
259 |
-
*/
|
260 |
-
public function resume($cid) {
|
261 |
-
$_params = array("cid" => $cid);
|
262 |
-
return $this->master->call('campaigns/resume', $_params);
|
263 |
-
}
|
264 |
-
|
265 |
-
/**
|
266 |
-
* Schedule a campaign to be sent in the future
|
267 |
-
* @param string $cid
|
268 |
-
* @param string $schedule_time
|
269 |
-
* @param string $schedule_time_b
|
270 |
-
* @return associative_array with a single entry:
|
271 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
272 |
-
*/
|
273 |
-
public function schedule($cid, $schedule_time, $schedule_time_b=null) {
|
274 |
-
$_params = array("cid" => $cid, "schedule_time" => $schedule_time, "schedule_time_b" => $schedule_time_b);
|
275 |
-
return $this->master->call('campaigns/schedule', $_params);
|
276 |
-
}
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Schedule a campaign to be sent in batches sometime in the future. Only valid for "regular" campaigns
|
280 |
-
* @param string $cid
|
281 |
-
* @param string $schedule_time
|
282 |
-
* @param int $num_batches
|
283 |
-
* @param int $stagger_mins
|
284 |
-
* @return associative_array with a single entry:
|
285 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
286 |
-
*/
|
287 |
-
public function scheduleBatch($cid, $schedule_time, $num_batches=2, $stagger_mins=5) {
|
288 |
-
$_params = array("cid" => $cid, "schedule_time" => $schedule_time, "num_batches" => $num_batches, "stagger_mins" => $stagger_mins);
|
289 |
-
return $this->master->call('campaigns/schedule-batch', $_params);
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Allows one to test their segmentation rules before creating a campaign using them.
|
294 |
-
* @param string $list_id
|
295 |
-
* @param associative_array $options
|
296 |
-
* - saved_segment_id string a saved segment id from lists/segments() - this will take precendence, otherwise the match+conditions are required.
|
297 |
-
* - match string controls whether to use AND or OR when applying your options - expects "<strong>any</strong>" (for OR) or "<strong>all</strong>" (for AND)
|
298 |
-
* - conditions array of up to 5 structs for different criteria to apply while segmenting. Each criteria row must contain 3 keys - "<strong>field</strong>", "<strong>op</strong>", and "<strong>value</strong>" - and possibly a fourth, "<strong>extra</strong>", based on these definitions:
|
299 |
-
* @return associative_array with a single entry:
|
300 |
-
* - total int The total number of subscribers matching your segmentation options
|
301 |
-
*/
|
302 |
-
public function segmentTest($list_id, $options) {
|
303 |
-
$_params = array("list_id" => $list_id, "options" => $options);
|
304 |
-
return $this->master->call('campaigns/segment-test', $_params);
|
305 |
-
}
|
306 |
-
|
307 |
-
/**
|
308 |
-
* Send a given campaign immediately. For RSS campaigns, this will "start" them.
|
309 |
-
* @param string $cid
|
310 |
-
* @return associative_array with a single entry:
|
311 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
312 |
-
*/
|
313 |
-
public function send($cid) {
|
314 |
-
$_params = array("cid" => $cid);
|
315 |
-
return $this->master->call('campaigns/send', $_params);
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Send a test of this campaign to the provided email addresses
|
320 |
-
* @param string $cid
|
321 |
-
* @param array $test_emails
|
322 |
-
* @param string $send_type
|
323 |
-
* @return associative_array with a single entry:
|
324 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
325 |
-
*/
|
326 |
-
public function sendTest($cid, $test_emails=array(), $send_type='html') {
|
327 |
-
$_params = array("cid" => $cid, "test_emails" => $test_emails, "send_type" => $send_type);
|
328 |
-
return $this->master->call('campaigns/send-test', $_params);
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Get the HTML template content sections for a campaign. Note that this <strong>will</strong> return very jagged, non-standard results based on the template
|
333 |
-
a campaign is using. You only want to use this if you want to allow editing template sections in your application.
|
334 |
-
* @param string $cid
|
335 |
-
* @return associative_array content containing all content section for the campaign - section name are dependent upon the template used and thus can't be documented
|
336 |
-
*/
|
337 |
-
public function templateContent($cid) {
|
338 |
-
$_params = array("cid" => $cid);
|
339 |
-
return $this->master->call('campaigns/template-content', $_params);
|
340 |
-
}
|
341 |
-
|
342 |
-
/**
|
343 |
-
* Unschedule a campaign that is scheduled to be sent in the future
|
344 |
-
* @param string $cid
|
345 |
-
* @return associative_array with a single entry:
|
346 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
347 |
-
*/
|
348 |
-
public function unschedule($cid) {
|
349 |
-
$_params = array("cid" => $cid);
|
350 |
-
return $this->master->call('campaigns/unschedule', $_params);
|
351 |
-
}
|
352 |
-
|
353 |
-
/**
|
354 |
-
* Update just about any setting besides type for a campaign that has <em>not</em> been sent. See campaigns/create() for details.
|
355 |
-
Caveats:<br/><ul class='bullets'>
|
356 |
-
<li>If you set a new list_id, all segmentation options will be deleted and must be re-added.</li>
|
357 |
-
<li>If you set template_id, you need to follow that up by setting it's 'content'</li>
|
358 |
-
<li>If you set segment_opts, you should have tested your options against campaigns/segment-test().</li>
|
359 |
-
<li>To clear/unset segment_opts, pass an empty string or array as the value. Various wrappers may require one or the other.</li>
|
360 |
-
</ul>
|
361 |
-
* @param string $cid
|
362 |
-
* @param string $name
|
363 |
-
* @param array $value
|
364 |
-
* @return associative_array updated campaign details and any errors
|
365 |
-
* - data associative_array the update campaign details - will return same data as single campaign from campaigns/list()
|
366 |
-
* - errors array for "options" only - structs containing:
|
367 |
-
* - code int the error code
|
368 |
-
* - message string the full error message
|
369 |
-
* - name string the parameter name that failed
|
370 |
-
*/
|
371 |
-
public function update($cid, $name, $value) {
|
372 |
-
$_params = array("cid" => $cid, "name" => $name, "value" => $value);
|
373 |
-
return $this->master->call('campaigns/update', $_params);
|
374 |
-
}
|
375 |
-
|
376 |
-
}
|
377 |
-
|
378 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Conversations.php
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Conversations {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Retrieve conversation metadata, includes message data for the most recent message in the conversation
|
10 |
-
* @param string $list_id
|
11 |
-
* @param string $leid
|
12 |
-
* @param string $campaign_id
|
13 |
-
* @param int $start
|
14 |
-
* @param int $limit
|
15 |
-
* @return associative_array Conversation data and metadata
|
16 |
-
* - count int Total number of conversations, irrespective of pagination.
|
17 |
-
* - data array An array of structs representing individual conversations
|
18 |
-
* - unique_id string A string identifying this particular conversation
|
19 |
-
* - message_count int The total number of messages in this conversation
|
20 |
-
* - campaign_id string The unique identifier of the campaign this conversation is associated with
|
21 |
-
* - list_id string The unique identifier of the list this conversation is associated with
|
22 |
-
* - unread_messages int The number of messages in this conversation which have not yet been read.
|
23 |
-
* - from_label string A label representing the sender of this message.
|
24 |
-
* - from_email string The email address of the sender of this message.
|
25 |
-
* - subject string The subject of the message.
|
26 |
-
* - timestamp string Date the message was either sent or received.
|
27 |
-
* - last_message associative_array The most recent message in the conversation
|
28 |
-
* - from_label string A label representing the sender of this message.
|
29 |
-
* - from_email string The email address of the sender of this message.
|
30 |
-
* - subject string The subject of the message.
|
31 |
-
* - message string The plain-text content of the message.
|
32 |
-
* - read boolean Whether or not this message has been marked as read.
|
33 |
-
* - timestamp string Date the message was either sent or received.
|
34 |
-
*/
|
35 |
-
public function getList($list_id=null, $leid=null, $campaign_id=null, $start=0, $limit=25) {
|
36 |
-
$_params = array("list_id" => $list_id, "leid" => $leid, "campaign_id" => $campaign_id, "start" => $start, "limit" => $limit);
|
37 |
-
return $this->master->call('conversations/list', $_params);
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Retrieve conversation messages
|
42 |
-
* @param string $conversation_id
|
43 |
-
* @param boolean $mark_as_read
|
44 |
-
* @param int $start
|
45 |
-
* @param int $limit
|
46 |
-
* @return associative_array Message data and metadata
|
47 |
-
* - count int The number of messages in this conversation, irrespective of paging.
|
48 |
-
* - data array An array of structs representing each message in a conversation
|
49 |
-
* - from_label string A label representing the sender of this message.
|
50 |
-
* - from_email string The email address of the sender of this message.
|
51 |
-
* - subject string The subject of the message.
|
52 |
-
* - message string The plain-text content of the message.
|
53 |
-
* - read boolean Whether or not this message has been marked as read.
|
54 |
-
* - timestamp string Date the message was either sent or received.
|
55 |
-
*/
|
56 |
-
public function messages($conversation_id, $mark_as_read=false, $start=0, $limit=25) {
|
57 |
-
$_params = array("conversation_id" => $conversation_id, "mark_as_read" => $mark_as_read, "start" => $start, "limit" => $limit);
|
58 |
-
return $this->master->call('conversations/messages', $_params);
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Retrieve conversation messages
|
63 |
-
* @param string $conversation_id
|
64 |
-
* @param string $message
|
65 |
-
* @return associative_array Message data from the created message
|
66 |
-
* - from_label string A label representing the sender of this message.
|
67 |
-
* - from_email string The email address of the sender of this message.
|
68 |
-
* - subject string The subject of the message.
|
69 |
-
* - message string The plain-text content of the message.
|
70 |
-
* - read boolean Whether or not this message has been marked as read.
|
71 |
-
* - timestamp string Date the message was either sent or received.
|
72 |
-
*/
|
73 |
-
public function reply($conversation_id, $message) {
|
74 |
-
$_params = array("conversation_id" => $conversation_id, "message" => $message);
|
75 |
-
return $this->master->call('conversations/reply', $_params);
|
76 |
-
}
|
77 |
-
|
78 |
-
}
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Ecomm.php
DELETED
@@ -1,86 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Ecomm {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Import Ecommerce Order Information to be used for Segmentation. This will generally be used by ecommerce package plugins
|
10 |
-
<a href="http://connect.mailchimp.com/category/ecommerce" target="_blank">provided by us or by 3rd part system developers</a>.
|
11 |
-
* @param associative_array $order
|
12 |
-
* - id string the Order Id
|
13 |
-
* - campaign_id string optional the Campaign Id to track this order against (see the "mc_cid" query string variable a campaign passes)
|
14 |
-
* - email_id string optional (kind of) the Email Id of the subscriber we should attach this order to (see the "mc_eid" query string variable a campaign passes) - required if campaign_id is passed, otherwise either this or <strong>email</strong> is required. If both are provided, email_id takes precedence
|
15 |
-
* - email string optional (kind of) the Email Address we should attach this order to - either this or <strong>email_id</strong> is required. If both are provided, email_id takes precedence
|
16 |
-
* - total double The Order Total (ie, the full amount the customer ends up paying)
|
17 |
-
* - order_date string optional the date of the order - if this is not provided, we will default the date to now. Should be in the format of 2012-12-30
|
18 |
-
* - shipping double optional the total paid for Shipping Fees
|
19 |
-
* - tax double optional the total tax paid
|
20 |
-
* - store_id string a unique id for the store sending the order in (32 bytes max)
|
21 |
-
* - store_name string optional a "nice" name for the store - typically the base web address (ie, "store.mailchimp.com"). We will automatically update this if it changes (based on store_id)
|
22 |
-
* - items array structs for each individual line item including:
|
23 |
-
* - line_num int optional the line number of the item on the order. We will generate these if they are not passed
|
24 |
-
* - product_id int the store's internal Id for the product. Lines that do no contain this will be skipped
|
25 |
-
* - sku string optional the store's internal SKU for the product. (max 30 bytes)
|
26 |
-
* - product_name string the product name for the product_id associated with this item. We will auto update these as they change (based on product_id)
|
27 |
-
* - category_id int (required) the store's internal Id for the (main) category associated with this product. Our testing has found this to be a "best guess" scenario
|
28 |
-
* - category_name string (required) the category name for the category_id this product is in. Our testing has found this to be a "best guess" scenario. Our plugins walk the category heirarchy up and send "Root - SubCat1 - SubCat4", etc.
|
29 |
-
* - qty double optional the quantity of the item ordered - defaults to 1
|
30 |
-
* - cost double optional the cost of a single item (ie, not the extended cost of the line) - defaults to 0
|
31 |
-
* @return associative_array with a single entry:
|
32 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
33 |
-
*/
|
34 |
-
public function orderAdd($order) {
|
35 |
-
$_params = array("order" => $order);
|
36 |
-
return $this->master->call('ecomm/order-add', $_params);
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Delete Ecommerce Order Information used for segmentation. This will generally be used by ecommerce package plugins
|
41 |
-
<a href="/plugins/ecomm360.phtml">that we provide</a> or by 3rd part system developers.
|
42 |
-
* @param string $store_id
|
43 |
-
* @param string $order_id
|
44 |
-
* @return associative_array with a single entry:
|
45 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
46 |
-
*/
|
47 |
-
public function orderDel($store_id, $order_id) {
|
48 |
-
$_params = array("store_id" => $store_id, "order_id" => $order_id);
|
49 |
-
return $this->master->call('ecomm/order-del', $_params);
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Retrieve the Ecommerce Orders for an account
|
54 |
-
* @param string $cid
|
55 |
-
* @param int $start
|
56 |
-
* @param int $limit
|
57 |
-
* @param string $since
|
58 |
-
* @return associative_array the total matching orders and the specific orders for the requested page
|
59 |
-
* - total int the total matching orders
|
60 |
-
* - data array structs for each order being returned
|
61 |
-
* - store_id string the store id generated by the plugin used to uniquely identify a store
|
62 |
-
* - store_name string the store name collected by the plugin - often the domain name
|
63 |
-
* - order_id string the internal order id the store tracked this order by
|
64 |
-
* - email string the email address that received this campaign and is associated with this order
|
65 |
-
* - order_total double the order total
|
66 |
-
* - tax_total double the total tax for the order (if collected)
|
67 |
-
* - ship_total double the shipping total for the order (if collected)
|
68 |
-
* - order_date string the date the order was tracked - from the store if possible, otherwise the GMT time we received it
|
69 |
-
* - items array structs for each line item on this order.:
|
70 |
-
* - line_num int the line number
|
71 |
-
* - product_id int the product id
|
72 |
-
* - product_name string the product name
|
73 |
-
* - product_sku string the sku for the product
|
74 |
-
* - product_category_id int the category id for the product
|
75 |
-
* - product_category_name string the category name for the product
|
76 |
-
* - qty int the quantity ordered
|
77 |
-
* - cost double the cost of the item
|
78 |
-
*/
|
79 |
-
public function orders($cid=null, $start=0, $limit=100, $since=null) {
|
80 |
-
$_params = array("cid" => $cid, "start" => $start, "limit" => $limit, "since" => $since);
|
81 |
-
return $this->master->call('ecomm/orders', $_params);
|
82 |
-
}
|
83 |
-
|
84 |
-
}
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Exceptions.php
DELETED
@@ -1,471 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Error extends Exception {}
|
4 |
-
class Mailchimp_HttpError extends Mailchimp_Error {}
|
5 |
-
|
6 |
-
/**
|
7 |
-
* The parameters passed to the API call are invalid or not provided when required
|
8 |
-
*/
|
9 |
-
class Mailchimp_ValidationError extends Mailchimp_Error {}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* None
|
13 |
-
*/
|
14 |
-
class Mailchimp_ServerError_MethodUnknown extends Mailchimp_Error {}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* None
|
18 |
-
*/
|
19 |
-
class Mailchimp_ServerError_InvalidParameters extends Mailchimp_Error {}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* None
|
23 |
-
*/
|
24 |
-
class Mailchimp_Unknown_Exception extends Mailchimp_Error {}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* None
|
28 |
-
*/
|
29 |
-
class Mailchimp_Request_TimedOut extends Mailchimp_Error {}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* None
|
33 |
-
*/
|
34 |
-
class Mailchimp_Zend_Uri_Exception extends Mailchimp_Error {}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* None
|
38 |
-
*/
|
39 |
-
class Mailchimp_PDOException extends Mailchimp_Error {}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* None
|
43 |
-
*/
|
44 |
-
class Mailchimp_Avesta_Db_Exception extends Mailchimp_Error {}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* None
|
48 |
-
*/
|
49 |
-
class Mailchimp_XML_RPC2_Exception extends Mailchimp_Error {}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* None
|
53 |
-
*/
|
54 |
-
class Mailchimp_XML_RPC2_FaultException extends Mailchimp_Error {}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* None
|
58 |
-
*/
|
59 |
-
class Mailchimp_Too_Many_Connections extends Mailchimp_Error {}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* None
|
63 |
-
*/
|
64 |
-
class Mailchimp_Parse_Exception extends Mailchimp_Error {}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* None
|
68 |
-
*/
|
69 |
-
class Mailchimp_User_Unknown extends Mailchimp_Error {}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* None
|
73 |
-
*/
|
74 |
-
class Mailchimp_User_Disabled extends Mailchimp_Error {}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* None
|
78 |
-
*/
|
79 |
-
class Mailchimp_User_DoesNotExist extends Mailchimp_Error {}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* None
|
83 |
-
*/
|
84 |
-
class Mailchimp_User_NotApproved extends Mailchimp_Error {}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* None
|
88 |
-
*/
|
89 |
-
class Mailchimp_Invalid_ApiKey extends Mailchimp_Error {}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* None
|
93 |
-
*/
|
94 |
-
class Mailchimp_User_UnderMaintenance extends Mailchimp_Error {}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* None
|
98 |
-
*/
|
99 |
-
class Mailchimp_Invalid_AppKey extends Mailchimp_Error {}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* None
|
103 |
-
*/
|
104 |
-
class Mailchimp_Invalid_IP extends Mailchimp_Error {}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* None
|
108 |
-
*/
|
109 |
-
class Mailchimp_User_DoesExist extends Mailchimp_Error {}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* None
|
113 |
-
*/
|
114 |
-
class Mailchimp_User_InvalidRole extends Mailchimp_Error {}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* None
|
118 |
-
*/
|
119 |
-
class Mailchimp_User_InvalidAction extends Mailchimp_Error {}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* None
|
123 |
-
*/
|
124 |
-
class Mailchimp_User_MissingEmail extends Mailchimp_Error {}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* None
|
128 |
-
*/
|
129 |
-
class Mailchimp_User_CannotSendCampaign extends Mailchimp_Error {}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* None
|
133 |
-
*/
|
134 |
-
class Mailchimp_User_MissingModuleOutbox extends Mailchimp_Error {}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* None
|
138 |
-
*/
|
139 |
-
class Mailchimp_User_ModuleAlreadyPurchased extends Mailchimp_Error {}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* None
|
143 |
-
*/
|
144 |
-
class Mailchimp_User_ModuleNotPurchased extends Mailchimp_Error {}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* None
|
148 |
-
*/
|
149 |
-
class Mailchimp_User_NotEnoughCredit extends Mailchimp_Error {}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* None
|
153 |
-
*/
|
154 |
-
class Mailchimp_MC_InvalidPayment extends Mailchimp_Error {}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* None
|
158 |
-
*/
|
159 |
-
class Mailchimp_List_DoesNotExist extends Mailchimp_Error {}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* None
|
163 |
-
*/
|
164 |
-
class Mailchimp_List_InvalidInterestFieldType extends Mailchimp_Error {}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* None
|
168 |
-
*/
|
169 |
-
class Mailchimp_List_InvalidOption extends Mailchimp_Error {}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* None
|
173 |
-
*/
|
174 |
-
class Mailchimp_List_InvalidUnsubMember extends Mailchimp_Error {}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* None
|
178 |
-
*/
|
179 |
-
class Mailchimp_List_InvalidBounceMember extends Mailchimp_Error {}
|
180 |
-
|
181 |
-
/**
|
182 |
-
* None
|
183 |
-
*/
|
184 |
-
class Mailchimp_List_AlreadySubscribed extends Mailchimp_Error {}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* None
|
188 |
-
*/
|
189 |
-
class Mailchimp_List_NotSubscribed extends Mailchimp_Error {}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* None
|
193 |
-
*/
|
194 |
-
class Mailchimp_List_InvalidImport extends Mailchimp_Error {}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* None
|
198 |
-
*/
|
199 |
-
class Mailchimp_MC_PastedList_Duplicate extends Mailchimp_Error {}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* None
|
203 |
-
*/
|
204 |
-
class Mailchimp_MC_PastedList_InvalidImport extends Mailchimp_Error {}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* None
|
208 |
-
*/
|
209 |
-
class Mailchimp_Email_AlreadySubscribed extends Mailchimp_Error {}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* None
|
213 |
-
*/
|
214 |
-
class Mailchimp_Email_AlreadyUnsubscribed extends Mailchimp_Error {}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* None
|
218 |
-
*/
|
219 |
-
class Mailchimp_Email_NotExists extends Mailchimp_Error {}
|
220 |
-
|
221 |
-
/**
|
222 |
-
* None
|
223 |
-
*/
|
224 |
-
class Mailchimp_Email_NotSubscribed extends Mailchimp_Error {}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* None
|
228 |
-
*/
|
229 |
-
class Mailchimp_List_MergeFieldRequired extends Mailchimp_Error {}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* None
|
233 |
-
*/
|
234 |
-
class Mailchimp_List_CannotRemoveEmailMerge extends Mailchimp_Error {}
|
235 |
-
|
236 |
-
/**
|
237 |
-
* None
|
238 |
-
*/
|
239 |
-
class Mailchimp_List_Merge_InvalidMergeID extends Mailchimp_Error {}
|
240 |
-
|
241 |
-
/**
|
242 |
-
* None
|
243 |
-
*/
|
244 |
-
class Mailchimp_List_TooManyMergeFields extends Mailchimp_Error {}
|
245 |
-
|
246 |
-
/**
|
247 |
-
* None
|
248 |
-
*/
|
249 |
-
class Mailchimp_List_InvalidMergeField extends Mailchimp_Error {}
|
250 |
-
|
251 |
-
/**
|
252 |
-
* None
|
253 |
-
*/
|
254 |
-
class Mailchimp_List_InvalidInterestGroup extends Mailchimp_Error {}
|
255 |
-
|
256 |
-
/**
|
257 |
-
* None
|
258 |
-
*/
|
259 |
-
class Mailchimp_List_TooManyInterestGroups extends Mailchimp_Error {}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* None
|
263 |
-
*/
|
264 |
-
class Mailchimp_Campaign_DoesNotExist extends Mailchimp_Error {}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* None
|
268 |
-
*/
|
269 |
-
class Mailchimp_Campaign_StatsNotAvailable extends Mailchimp_Error {}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* None
|
273 |
-
*/
|
274 |
-
class Mailchimp_Campaign_InvalidAbsplit extends Mailchimp_Error {}
|
275 |
-
|
276 |
-
/**
|
277 |
-
* None
|
278 |
-
*/
|
279 |
-
class Mailchimp_Campaign_InvalidContent extends Mailchimp_Error {}
|
280 |
-
|
281 |
-
/**
|
282 |
-
* None
|
283 |
-
*/
|
284 |
-
class Mailchimp_Campaign_InvalidOption extends Mailchimp_Error {}
|
285 |
-
|
286 |
-
/**
|
287 |
-
* None
|
288 |
-
*/
|
289 |
-
class Mailchimp_Campaign_InvalidStatus extends Mailchimp_Error {}
|
290 |
-
|
291 |
-
/**
|
292 |
-
* None
|
293 |
-
*/
|
294 |
-
class Mailchimp_Campaign_NotSaved extends Mailchimp_Error {}
|
295 |
-
|
296 |
-
/**
|
297 |
-
* None
|
298 |
-
*/
|
299 |
-
class Mailchimp_Campaign_InvalidSegment extends Mailchimp_Error {}
|
300 |
-
|
301 |
-
/**
|
302 |
-
* None
|
303 |
-
*/
|
304 |
-
class Mailchimp_Campaign_InvalidRss extends Mailchimp_Error {}
|
305 |
-
|
306 |
-
/**
|
307 |
-
* None
|
308 |
-
*/
|
309 |
-
class Mailchimp_Campaign_InvalidAuto extends Mailchimp_Error {}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* None
|
313 |
-
*/
|
314 |
-
class Mailchimp_MC_ContentImport_InvalidArchive extends Mailchimp_Error {}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* None
|
318 |
-
*/
|
319 |
-
class Mailchimp_Campaign_BounceMissing extends Mailchimp_Error {}
|
320 |
-
|
321 |
-
/**
|
322 |
-
* None
|
323 |
-
*/
|
324 |
-
class Mailchimp_Campaign_InvalidTemplate extends Mailchimp_Error {}
|
325 |
-
|
326 |
-
/**
|
327 |
-
* None
|
328 |
-
*/
|
329 |
-
class Mailchimp_Invalid_EcommOrder extends Mailchimp_Error {}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* None
|
333 |
-
*/
|
334 |
-
class Mailchimp_Absplit_UnknownError extends Mailchimp_Error {}
|
335 |
-
|
336 |
-
/**
|
337 |
-
* None
|
338 |
-
*/
|
339 |
-
class Mailchimp_Absplit_UnknownSplitTest extends Mailchimp_Error {}
|
340 |
-
|
341 |
-
/**
|
342 |
-
* None
|
343 |
-
*/
|
344 |
-
class Mailchimp_Absplit_UnknownTestType extends Mailchimp_Error {}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* None
|
348 |
-
*/
|
349 |
-
class Mailchimp_Absplit_UnknownWaitUnit extends Mailchimp_Error {}
|
350 |
-
|
351 |
-
/**
|
352 |
-
* None
|
353 |
-
*/
|
354 |
-
class Mailchimp_Absplit_UnknownWinnerType extends Mailchimp_Error {}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* None
|
358 |
-
*/
|
359 |
-
class Mailchimp_Absplit_WinnerNotSelected extends Mailchimp_Error {}
|
360 |
-
|
361 |
-
/**
|
362 |
-
* None
|
363 |
-
*/
|
364 |
-
class Mailchimp_Invalid_Analytics extends Mailchimp_Error {}
|
365 |
-
|
366 |
-
/**
|
367 |
-
* None
|
368 |
-
*/
|
369 |
-
class Mailchimp_Invalid_DateTime extends Mailchimp_Error {}
|
370 |
-
|
371 |
-
/**
|
372 |
-
* None
|
373 |
-
*/
|
374 |
-
class Mailchimp_Invalid_Email extends Mailchimp_Error {}
|
375 |
-
|
376 |
-
/**
|
377 |
-
* None
|
378 |
-
*/
|
379 |
-
class Mailchimp_Invalid_SendType extends Mailchimp_Error {}
|
380 |
-
|
381 |
-
/**
|
382 |
-
* None
|
383 |
-
*/
|
384 |
-
class Mailchimp_Invalid_Template extends Mailchimp_Error {}
|
385 |
-
|
386 |
-
/**
|
387 |
-
* None
|
388 |
-
*/
|
389 |
-
class Mailchimp_Invalid_TrackingOptions extends Mailchimp_Error {}
|
390 |
-
|
391 |
-
/**
|
392 |
-
* None
|
393 |
-
*/
|
394 |
-
class Mailchimp_Invalid_Options extends Mailchimp_Error {}
|
395 |
-
|
396 |
-
/**
|
397 |
-
* None
|
398 |
-
*/
|
399 |
-
class Mailchimp_Invalid_Folder extends Mailchimp_Error {}
|
400 |
-
|
401 |
-
/**
|
402 |
-
* None
|
403 |
-
*/
|
404 |
-
class Mailchimp_Invalid_URL extends Mailchimp_Error {}
|
405 |
-
|
406 |
-
/**
|
407 |
-
* None
|
408 |
-
*/
|
409 |
-
class Mailchimp_Module_Unknown extends Mailchimp_Error {}
|
410 |
-
|
411 |
-
/**
|
412 |
-
* None
|
413 |
-
*/
|
414 |
-
class Mailchimp_MonthlyPlan_Unknown extends Mailchimp_Error {}
|
415 |
-
|
416 |
-
/**
|
417 |
-
* None
|
418 |
-
*/
|
419 |
-
class Mailchimp_Order_TypeUnknown extends Mailchimp_Error {}
|
420 |
-
|
421 |
-
/**
|
422 |
-
* None
|
423 |
-
*/
|
424 |
-
class Mailchimp_Invalid_PagingLimit extends Mailchimp_Error {}
|
425 |
-
|
426 |
-
/**
|
427 |
-
* None
|
428 |
-
*/
|
429 |
-
class Mailchimp_Invalid_PagingStart extends Mailchimp_Error {}
|
430 |
-
|
431 |
-
/**
|
432 |
-
* None
|
433 |
-
*/
|
434 |
-
class Mailchimp_Max_Size_Reached extends Mailchimp_Error {}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* None
|
438 |
-
*/
|
439 |
-
class Mailchimp_MC_SearchException extends Mailchimp_Error {}
|
440 |
-
|
441 |
-
/**
|
442 |
-
* None
|
443 |
-
*/
|
444 |
-
class Mailchimp_Goal_SaveFailed extends Mailchimp_Error {}
|
445 |
-
|
446 |
-
/**
|
447 |
-
* None
|
448 |
-
*/
|
449 |
-
class Mailchimp_Conversation_DoesNotExist extends Mailchimp_Error {}
|
450 |
-
|
451 |
-
/**
|
452 |
-
* None
|
453 |
-
*/
|
454 |
-
class Mailchimp_Conversation_ReplySaveFailed extends Mailchimp_Error {}
|
455 |
-
|
456 |
-
/**
|
457 |
-
* None
|
458 |
-
*/
|
459 |
-
class Mailchimp_File_Not_Found_Exception extends Mailchimp_Error {}
|
460 |
-
|
461 |
-
/**
|
462 |
-
* None
|
463 |
-
*/
|
464 |
-
class Mailchimp_Folder_Not_Found_Exception extends Mailchimp_Error {}
|
465 |
-
|
466 |
-
/**
|
467 |
-
* None
|
468 |
-
*/
|
469 |
-
class Mailchimp_Folder_Exists_Exception extends Mailchimp_Error {}
|
470 |
-
|
471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Folders.php
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Folders {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Add a new folder to file campaigns, autoresponders, or templates in
|
10 |
-
* @param string $name
|
11 |
-
* @param string $type
|
12 |
-
* @return associative_array with a single value:
|
13 |
-
* - folder_id int the folder_id of the newly created folder.
|
14 |
-
*/
|
15 |
-
public function add($name, $type) {
|
16 |
-
$_params = array("name" => $name, "type" => $type);
|
17 |
-
return $this->master->call('folders/add', $_params);
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Delete a campaign, autoresponder, or template folder. Note that this will simply make whatever was in the folder appear unfiled, no other data is removed
|
22 |
-
* @param int $fid
|
23 |
-
* @param string $type
|
24 |
-
* @return associative_array with a single entry:
|
25 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
26 |
-
*/
|
27 |
-
public function del($fid, $type) {
|
28 |
-
$_params = array("fid" => $fid, "type" => $type);
|
29 |
-
return $this->master->call('folders/del', $_params);
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* List all the folders of a certain type
|
34 |
-
* @param string $type
|
35 |
-
* @return array structs for each folder, including:
|
36 |
-
* - folder_id int Folder Id for the given folder, this can be used in the campaigns/list() function to filter on.
|
37 |
-
* - name string Name of the given folder
|
38 |
-
* - date_created string The date/time the folder was created
|
39 |
-
* - type string The type of the folders being returned, just to make sure you know.
|
40 |
-
* - cnt int number of items in the folder.
|
41 |
-
*/
|
42 |
-
public function getList($type) {
|
43 |
-
$_params = array("type" => $type);
|
44 |
-
return $this->master->call('folders/list', $_params);
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Update the name of a folder for campaigns, autoresponders, or templates
|
49 |
-
* @param int $fid
|
50 |
-
* @param string $name
|
51 |
-
* @param string $type
|
52 |
-
* @return associative_array with a single entry:
|
53 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
54 |
-
*/
|
55 |
-
public function update($fid, $name, $type) {
|
56 |
-
$_params = array("fid" => $fid, "name" => $name, "type" => $type);
|
57 |
-
return $this->master->call('folders/update', $_params);
|
58 |
-
}
|
59 |
-
|
60 |
-
}
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Gallery.php
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Gallery {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Return a section of the image gallery
|
10 |
-
* @param associative_array $opts
|
11 |
-
* - type string optional the gallery type to return - images or files - default to images
|
12 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
13 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
14 |
-
* - sort_by string optional field to sort by - one of size, time, name - defaults to time
|
15 |
-
* - sort_dir string optional field to sort by - one of asc, desc - defaults to desc
|
16 |
-
* - search_term string optional a term to search for in names
|
17 |
-
* - folder_id int optional to return files that are in a specific folder. id returned by the list-folders call
|
18 |
-
* @return associative_array the matching gallery items
|
19 |
-
* - total int the total matching items
|
20 |
-
* - data array structs for each item included in the set, including:
|
21 |
-
* - id int the id of the file
|
22 |
-
* - name string the file name
|
23 |
-
* - time string the creation date for the item
|
24 |
-
* - size int the file size in bytes
|
25 |
-
* - full string the url to the actual item in the gallery
|
26 |
-
* - thumb string a url for a thumbnail that can be used to represent the item, generally an image thumbnail or an icon for a file type
|
27 |
-
*/
|
28 |
-
public function getList($opts=array()) {
|
29 |
-
$_params = array("opts" => $opts);
|
30 |
-
return $this->master->call('gallery/list', $_params);
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Return a list of the folders available to the file gallery
|
35 |
-
* @param associative_array $opts
|
36 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
37 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
38 |
-
* - search_term string optional a term to search for in names
|
39 |
-
* @return associative_array the matching gallery folders
|
40 |
-
* - total int the total matching folders
|
41 |
-
* - data array structs for each folder included in the set, including:
|
42 |
-
* - id int the id of the folder
|
43 |
-
* - name string the file name
|
44 |
-
* - file_count int the number of files in the folder
|
45 |
-
*/
|
46 |
-
public function listFolders($opts=array()) {
|
47 |
-
$_params = array("opts" => $opts);
|
48 |
-
return $this->master->call('gallery/list-folders', $_params);
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Adds a folder to the file gallery
|
53 |
-
* @param string $name
|
54 |
-
* @return associative_array the new data for the created folder
|
55 |
-
* - data.id int the id of the new folder
|
56 |
-
*/
|
57 |
-
public function addFolder($name) {
|
58 |
-
$_params = array("name" => $name);
|
59 |
-
return $this->master->call('gallery/add-folder', $_params);
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Remove a folder
|
64 |
-
* @param int $folder_id
|
65 |
-
* @return boolean true/false for success/failure
|
66 |
-
*/
|
67 |
-
public function removeFolder($folder_id) {
|
68 |
-
$_params = array("folder_id" => $folder_id);
|
69 |
-
return $this->master->call('gallery/remove-folder', $_params);
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Add a file to a folder
|
74 |
-
* @param int $file_id
|
75 |
-
* @param int $folder_id
|
76 |
-
* @return boolean true/false for success/failure
|
77 |
-
*/
|
78 |
-
public function addFileToFolder($file_id, $folder_id) {
|
79 |
-
$_params = array("file_id" => $file_id, "folder_id" => $folder_id);
|
80 |
-
return $this->master->call('gallery/add-file-to-folder', $_params);
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Remove a file from a folder
|
85 |
-
* @param int $file_id
|
86 |
-
* @param int $folder_id
|
87 |
-
* @return boolean true/false for success/failure
|
88 |
-
*/
|
89 |
-
public function removeFileFromFolder($file_id, $folder_id) {
|
90 |
-
$_params = array("file_id" => $file_id, "folder_id" => $folder_id);
|
91 |
-
return $this->master->call('gallery/remove-file-from-folder', $_params);
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Remove all files from a folder (Note that the files are not deleted, they are only removed from the folder)
|
96 |
-
* @param int $folder_id
|
97 |
-
* @return boolean true/false for success/failure
|
98 |
-
*/
|
99 |
-
public function removeAllFilesFromFolder($folder_id) {
|
100 |
-
$_params = array("folder_id" => $folder_id);
|
101 |
-
return $this->master->call('gallery/remove-all-files-from-folder', $_params);
|
102 |
-
}
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Goal.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Goal {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Retrieve goal event data for a particular list member. Note: only unique events are returned. If a user triggers
|
10 |
-
a particular event multiple times, you will still only receive one entry for that event.
|
11 |
-
* @param string $list_id
|
12 |
-
* @param associative_array $email
|
13 |
-
* - email string an email address
|
14 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
15 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
16 |
-
* @param int $start
|
17 |
-
* @param int $limit
|
18 |
-
* @return associative_array Event data and metadata
|
19 |
-
* - data array An array of goal data structs for the specified list member in the following format
|
20 |
-
* - event string The URL or name of the event that was triggered
|
21 |
-
* - last_visited_at string A timestamp in the format 'YYYY-MM-DD HH:MM:SS' that represents the last time this event was seen.
|
22 |
-
* - total int The total number of events that match your criteria.
|
23 |
-
*/
|
24 |
-
public function events($list_id, $email, $start=0, $limit=25) {
|
25 |
-
$_params = array("list_id" => $list_id, "email" => $email, "start" => $start, "limit" => $limit);
|
26 |
-
return $this->master->call('goal/events', $_params);
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* This allows programmatically trigger goal event collection without the use of front-end code.
|
31 |
-
* @param string $list_id
|
32 |
-
* @param associative_array $email
|
33 |
-
* - email string an email address
|
34 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
35 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
36 |
-
* @param string $campaign_id
|
37 |
-
* @param string $event
|
38 |
-
* @return associative_array Event data for the submitted event
|
39 |
-
* - event string The URL or name of the event that was triggered
|
40 |
-
* - last_visited_at string A timestamp in the format 'YYYY-MM-DD HH:MM:SS' that represents the last time this event was seen.
|
41 |
-
*/
|
42 |
-
public function recordEvent($list_id, $email, $campaign_id, $event) {
|
43 |
-
$_params = array("list_id" => $list_id, "email" => $email, "campaign_id" => $campaign_id, "event" => $event);
|
44 |
-
return $this->master->call('goal/record-event', $_params);
|
45 |
-
}
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Helper.php
DELETED
@@ -1,237 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Helper {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Retrieve lots of account information including payments made, plan info, some account stats, installed modules,
|
10 |
-
contact info, and more. No private information like Credit Card numbers is available.
|
11 |
-
* @param array $exclude
|
12 |
-
* @return associative_array containing the details for the account tied to this API Key
|
13 |
-
* - username string The company name associated with the account
|
14 |
-
* - user_id string The Account user unique id (for building some links)
|
15 |
-
* - is_trial bool Whether the Account is in Trial mode (can only send campaigns to less than 100 emails)
|
16 |
-
* - is_approved bool Whether the Account has been approved for purchases
|
17 |
-
* - has_activated bool Whether the Account has been activated
|
18 |
-
* - timezone string The timezone for the Account - default is "US/Eastern"
|
19 |
-
* - plan_type string Plan Type - "monthly", "payasyougo", or "free"
|
20 |
-
* - plan_low int <em>only for Monthly plans</em> - the lower tier for list size
|
21 |
-
* - plan_high int <em>only for Monthly plans</em> - the upper tier for list size
|
22 |
-
* - plan_start_date string <em>only for Monthly plans</em> - the start date for a monthly plan
|
23 |
-
* - emails_left int <em>only for Free and Pay-as-you-go plans</em> emails credits left for the account
|
24 |
-
* - pending_monthly bool Whether the account is finishing Pay As You Go credits before switching to a Monthly plan
|
25 |
-
* - first_payment string date of first payment
|
26 |
-
* - last_payment string date of most recent payment
|
27 |
-
* - times_logged_in int total number of times the account has been logged into via the web
|
28 |
-
* - last_login string date/time of last login via the web
|
29 |
-
* - affiliate_link string Monkey Rewards link for our Affiliate program
|
30 |
-
* - industry string the user's selected industry
|
31 |
-
* - contact associative_array Contact details for the account
|
32 |
-
* - fname string First Name
|
33 |
-
* - lname string Last Name
|
34 |
-
* - email string Email Address
|
35 |
-
* - company string Company Name
|
36 |
-
* - address1 string Address Line 1
|
37 |
-
* - address2 string Address Line 2
|
38 |
-
* - city string City
|
39 |
-
* - state string State or Province
|
40 |
-
* - zip string Zip or Postal Code
|
41 |
-
* - country string Country name
|
42 |
-
* - url string Website URL
|
43 |
-
* - phone string Phone number
|
44 |
-
* - fax string Fax number
|
45 |
-
* - modules array a struct for each addon module installed in the account
|
46 |
-
* - id string An internal module id
|
47 |
-
* - name string The module name
|
48 |
-
* - added string The date the module was added
|
49 |
-
* - data associative_array Any extra data associated with this module as key=>value pairs
|
50 |
-
* - orders array a struct for each order for the account
|
51 |
-
* - order_id int The order id
|
52 |
-
* - type string The order type - either "monthly" or "credits"
|
53 |
-
* - amount double The order amount
|
54 |
-
* - date string The order date
|
55 |
-
* - credits_used double The total credits used
|
56 |
-
* - rewards associative_array Rewards details for the account including credits & inspections earned, number of referrals, referral details, and rewards used
|
57 |
-
* - referrals_this_month int the total number of referrals this month
|
58 |
-
* - notify_on string whether or not we notify the user when rewards are earned
|
59 |
-
* - notify_email string the email address address used for rewards notifications
|
60 |
-
* - credits associative_array Email credits earned:
|
61 |
-
* - this_month int credits earned this month
|
62 |
-
* - total_earned int credits earned all time
|
63 |
-
* - remaining int credits remaining
|
64 |
-
* - inspections associative_array Inbox Inspections earned:
|
65 |
-
* - this_month int credits earned this month
|
66 |
-
* - total_earned int credits earned all time
|
67 |
-
* - remaining int credits remaining
|
68 |
-
* - referrals array a struct for each referral, including:
|
69 |
-
* - name string the name of the account
|
70 |
-
* - email string the email address associated with the account
|
71 |
-
* - signup_date string the signup date for the account
|
72 |
-
* - type string the source for the referral
|
73 |
-
* - applied array a struct for each applied rewards, including:
|
74 |
-
* - value int the number of credits user
|
75 |
-
* - date string the date applied
|
76 |
-
* - order_id int the order number credits were applied to
|
77 |
-
* - order_desc string the order description
|
78 |
-
* - integrations array a struct for each connected integrations that can be used with campaigns, including:
|
79 |
-
* - id int an internal id for the integration
|
80 |
-
* - name string the integration name
|
81 |
-
* - list_id string either "_any_" when globally accessible or the list id it's valid for use against
|
82 |
-
* - user_id string if applicable, the user id for the integrated system
|
83 |
-
* - account string if applicable, the user/account name for the integrated system
|
84 |
-
* - profiles array For Facebook, users/page that can be posted to.
|
85 |
-
* - id string the user or page id
|
86 |
-
* - name string the user or page name
|
87 |
-
* - is_page bool whether this is a user or a page
|
88 |
-
*/
|
89 |
-
public function accountDetails($exclude=array()) {
|
90 |
-
$_params = array("exclude" => $exclude);
|
91 |
-
return $this->master->call('helper/account-details', $_params);
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Retrieve minimal data for all Campaigns a member was sent
|
96 |
-
* @param associative_array $email
|
97 |
-
* - email string an email address
|
98 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
99 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
100 |
-
* @param associative_array $options
|
101 |
-
* - list_id string optional A list_id to limit the campaigns to
|
102 |
-
* @return array an array of structs containing campaign data for each matching campaign (ordered by send time ascending), including:
|
103 |
-
* - id string the campaign unique id
|
104 |
-
* - title string the campaign's title
|
105 |
-
* - subject string the campaign's subject
|
106 |
-
* - send_time string the time the campaign was sent
|
107 |
-
* - type string the campaign type
|
108 |
-
*/
|
109 |
-
public function campaignsForEmail($email, $options=null) {
|
110 |
-
$_params = array("email" => $email, "options" => $options);
|
111 |
-
return $this->master->call('helper/campaigns-for-email', $_params);
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Return the current Chimp Chatter messages for an account.
|
116 |
-
* @return array An array of structs containing data for each chatter message
|
117 |
-
* - message string The chatter message
|
118 |
-
* - type string The type of the message - one of lists:new-subscriber, lists:unsubscribes, lists:profile-updates, campaigns:facebook-likes, campaigns:facebook-comments, campaigns:forward-to-friend, lists:imports, or campaigns:inbox-inspections
|
119 |
-
* - url string a url into the web app that the message could link to, if applicable
|
120 |
-
* - list_id string the list_id a message relates to, if applicable. Deleted lists will return -DELETED-
|
121 |
-
* - campaign_id string the list_id a message relates to, if applicable. Deleted campaigns will return -DELETED-
|
122 |
-
* - update_time string The date/time the message was last updated
|
123 |
-
*/
|
124 |
-
public function chimpChatter() {
|
125 |
-
$_params = array();
|
126 |
-
return $this->master->call('helper/chimp-chatter', $_params);
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Have HTML content auto-converted to a text-only format. You can send: plain HTML, an existing Campaign Id, or an existing Template Id. Note that this will <strong>not</strong> save anything to or update any of your lists, campaigns, or templates.
|
131 |
-
It's also not just Lynx and is very fine tuned for our template layouts - your mileage may vary.
|
132 |
-
* @param string $type
|
133 |
-
* @param associative_array $content
|
134 |
-
* - html string optional a single string value,
|
135 |
-
* - cid string a valid Campaign Id
|
136 |
-
* - user_template_id string the id of a user template
|
137 |
-
* - base_template_id string the id of a built in base/basic template
|
138 |
-
* - gallery_template_id string the id of a built in gallery template
|
139 |
-
* - url string a valid & public URL to pull html content from
|
140 |
-
* @return associative_array the content pass in converted to text.
|
141 |
-
* - text string the converted html
|
142 |
-
*/
|
143 |
-
public function generateText($type, $content) {
|
144 |
-
$_params = array("type" => $type, "content" => $content);
|
145 |
-
return $this->master->call('helper/generate-text', $_params);
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Send your HTML content to have the CSS inlined and optionally remove the original styles.
|
150 |
-
* @param string $html
|
151 |
-
* @param bool $strip_css
|
152 |
-
* @return associative_array with a "html" key
|
153 |
-
* - html string Your HTML content with all CSS inlined, just like if we sent it.
|
154 |
-
*/
|
155 |
-
public function inlineCss($html, $strip_css=false) {
|
156 |
-
$_params = array("html" => $html, "strip_css" => $strip_css);
|
157 |
-
return $this->master->call('helper/inline-css', $_params);
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Retrieve minimal List data for all lists a member is subscribed to.
|
162 |
-
* @param associative_array $email
|
163 |
-
* - email string an email address
|
164 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
165 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
166 |
-
* @return array An array of structs with info on the list_id the member is subscribed to.
|
167 |
-
* - id string the list unique id
|
168 |
-
* - web_id int the id referenced in web interface urls
|
169 |
-
* - name string the list name
|
170 |
-
*/
|
171 |
-
public function listsForEmail($email) {
|
172 |
-
$_params = array("email" => $email);
|
173 |
-
return $this->master->call('helper/lists-for-email', $_params);
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* "Ping" the MailChimp API - a simple method you can call that will return a constant value as long as everything is good. Note
|
178 |
-
than unlike most all of our methods, we don't throw an Exception if we are having issues. You will simply receive a different
|
179 |
-
string back that will explain our view on what is going on.
|
180 |
-
* @return associative_array a with a "msg" key
|
181 |
-
* - msg string containing "Everything's Chimpy!" if everything is chimpy, otherwise returns an error message
|
182 |
-
*/
|
183 |
-
public function ping() {
|
184 |
-
$_params = array();
|
185 |
-
return $this->master->call('helper/ping', $_params);
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Search all campaigns for the specified query terms
|
190 |
-
* @param string $query
|
191 |
-
* @param int $offset
|
192 |
-
* @param string $snip_start
|
193 |
-
* @param string $snip_end
|
194 |
-
* @return associative_array containing the total matches and current results
|
195 |
-
* - total int total campaigns matching
|
196 |
-
* - results array matching campaigns and snippets
|
197 |
-
* - snippet string the matching snippet for the campaign
|
198 |
-
* - campaign associative_array the matching campaign's details - will return same data as single campaign from campaigns/list()
|
199 |
-
*/
|
200 |
-
public function searchCampaigns($query, $offset=0, $snip_start=null, $snip_end=null) {
|
201 |
-
$_params = array("query" => $query, "offset" => $offset, "snip_start" => $snip_start, "snip_end" => $snip_end);
|
202 |
-
return $this->master->call('helper/search-campaigns', $_params);
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* Search account wide or on a specific list using the specified query terms
|
207 |
-
* @param string $query
|
208 |
-
* @param string $id
|
209 |
-
* @param int $offset
|
210 |
-
* @return associative_array An array of both exact matches and partial matches over a full search
|
211 |
-
* - exact_matches associative_array containing the exact email address matches and current results
|
212 |
-
* - total int total members matching
|
213 |
-
* - members array each entry will be struct matching the data format for a single member as returned by lists/member-info()
|
214 |
-
* - full_search associative_array containing the total matches and current results
|
215 |
-
* - total int total members matching
|
216 |
-
* - members array each entry will be struct matching the data format for a single member as returned by lists/member-info()
|
217 |
-
*/
|
218 |
-
public function searchMembers($query, $id=null, $offset=0) {
|
219 |
-
$_params = array("query" => $query, "id" => $id, "offset" => $offset);
|
220 |
-
return $this->master->call('helper/search-members', $_params);
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Retrieve all domain verification records for an account
|
225 |
-
* @return array structs for each domain verification has been attempted for
|
226 |
-
* - domain string the verified domain
|
227 |
-
* - status string the status of the verification - either "verified" or "pending"
|
228 |
-
* - email string the email address used for verification - "pre-existing" if we automatically backfilled it at some point
|
229 |
-
*/
|
230 |
-
public function verifiedDomains() {
|
231 |
-
$_params = array();
|
232 |
-
return $this->master->call('helper/verified-domains', $_params);
|
233 |
-
}
|
234 |
-
|
235 |
-
}
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Lists.php
DELETED
@@ -1,904 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Lists {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Get all email addresses that complained about a campaign sent to a list
|
10 |
-
* @param string $id
|
11 |
-
* @param int $start
|
12 |
-
* @param int $limit
|
13 |
-
* @param string $since
|
14 |
-
* @return associative_array the total of all reports and the specific reports reports this page
|
15 |
-
* - total int the total number of matching abuse reports
|
16 |
-
* - data array structs for the actual data for each reports, including:
|
17 |
-
* - date string date+time the abuse report was received and processed
|
18 |
-
* - email string the email address that reported abuse
|
19 |
-
* - campaign_id string the unique id for the campaign that report was made against
|
20 |
-
* - type string an internal type generally specifying the originating mail provider - may not be useful outside of filling report views
|
21 |
-
*/
|
22 |
-
public function abuseReports($id, $start=0, $limit=500, $since=null) {
|
23 |
-
$_params = array("id" => $id, "start" => $start, "limit" => $limit, "since" => $since);
|
24 |
-
return $this->master->call('lists/abuse-reports', $_params);
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Access up to the previous 180 days of daily detailed aggregated activity stats for a given list. Does not include AutoResponder activity.
|
29 |
-
* @param string $id
|
30 |
-
* @return array of structs containing daily values, each containing:
|
31 |
-
*/
|
32 |
-
public function activity($id) {
|
33 |
-
$_params = array("id" => $id);
|
34 |
-
return $this->master->call('lists/activity', $_params);
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Subscribe a batch of email addresses to a list at once. If you are using a serialized version of the API, we strongly suggest that you
|
39 |
-
only run this method as a POST request, and <em>not</em> a GET request. Maximum batch sizes vary based on the amount of data in each record,
|
40 |
-
though you should cap them at 5k - 10k records, depending on your experience. These calls are also long, so be sure you increase your timeout values.
|
41 |
-
* @param string $id
|
42 |
-
* @param array $batch
|
43 |
-
* - email associative_array a struct with one of the following keys - failing to provide anything will produce an error relating to the email address. Provide multiples and we'll use the first we see in this same order.
|
44 |
-
* - email string an email address
|
45 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
46 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
47 |
-
* - email_type string for the email type option (html or text)
|
48 |
-
* - merge_vars associative_array data for the various list specific and special merge vars documented in lists/subscribe
|
49 |
-
* @param boolean $double_optin
|
50 |
-
* @param boolean $update_existing
|
51 |
-
* @param boolean $replace_interests
|
52 |
-
* @return associative_array struct of result counts and associated data
|
53 |
-
* - add_count int Number of email addresses that were successfully added
|
54 |
-
* - adds array array of structs for each add
|
55 |
-
* - email string the email address added
|
56 |
-
* - euid string the email unique id
|
57 |
-
* - leid string the list member's truly unique id
|
58 |
-
* - update_count int Number of email addresses that were successfully updated
|
59 |
-
* - updates array array of structs for each update
|
60 |
-
* - email string the email address added
|
61 |
-
* - euid string the email unique id
|
62 |
-
* - leid string the list member's truly unique id
|
63 |
-
* - error_count int Number of email addresses that failed during addition/updating
|
64 |
-
* - errors array array of error structs including:
|
65 |
-
* - email string whatever was passed in the batch record's email parameter
|
66 |
-
* - email string the email address added
|
67 |
-
* - euid string the email unique id
|
68 |
-
* - leid string the list member's truly unique id
|
69 |
-
* - code int the error code
|
70 |
-
* - error string the full error message
|
71 |
-
* - row associative_array the row from the batch that caused the error
|
72 |
-
*/
|
73 |
-
public function batchSubscribe($id, $batch, $double_optin=true, $update_existing=false, $replace_interests=true) {
|
74 |
-
$_params = array("id" => $id, "batch" => $batch, "double_optin" => $double_optin, "update_existing" => $update_existing, "replace_interests" => $replace_interests);
|
75 |
-
return $this->master->call('lists/batch-subscribe', $_params);
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Unsubscribe a batch of email addresses from a list
|
80 |
-
* @param string $id
|
81 |
-
* @param array $batch
|
82 |
-
* - email string an email address
|
83 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
84 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
85 |
-
* @param boolean $delete_member
|
86 |
-
* @param boolean $send_goodbye
|
87 |
-
* @param boolean $send_notify
|
88 |
-
* @return array Array of structs containing results and any errors that occurred
|
89 |
-
* - success_count int Number of email addresses that were successfully removed
|
90 |
-
* - error_count int Number of email addresses that failed during addition/updating
|
91 |
-
* - errors array array of error structs including:
|
92 |
-
* - email string whatever was passed in the batch record's email parameter
|
93 |
-
* - email string the email address added
|
94 |
-
* - euid string the email unique id
|
95 |
-
* - leid string the list member's truly unique id
|
96 |
-
* - code int the error code
|
97 |
-
* - error string the full error message
|
98 |
-
*/
|
99 |
-
public function batchUnsubscribe($id, $batch, $delete_member=false, $send_goodbye=true, $send_notify=false) {
|
100 |
-
$_params = array("id" => $id, "batch" => $batch, "delete_member" => $delete_member, "send_goodbye" => $send_goodbye, "send_notify" => $send_notify);
|
101 |
-
return $this->master->call('lists/batch-unsubscribe', $_params);
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Retrieve the clients that the list's subscribers have been tagged as being used based on user agents seen. Made possible by <a href="http://user-agent-string.info" target="_blank">user-agent-string.info</a>
|
106 |
-
* @param string $id
|
107 |
-
* @return associative_array the desktop and mobile user agents in use on the list
|
108 |
-
* - desktop associative_array desktop user agents and percentages
|
109 |
-
* - penetration double the percent of desktop clients in use
|
110 |
-
* - clients array array of structs for each client including:
|
111 |
-
* - client string the common name for the client
|
112 |
-
* - icon string a url to an image representing this client
|
113 |
-
* - percent string percent of list using the client
|
114 |
-
* - members string total members using the client
|
115 |
-
* - mobile associative_array mobile user agents and percentages
|
116 |
-
* - penetration double the percent of mobile clients in use
|
117 |
-
* - clients array array of structs for each client including:
|
118 |
-
* - client string the common name for the client
|
119 |
-
* - icon string a url to an image representing this client
|
120 |
-
* - percent string percent of list using the client
|
121 |
-
* - members string total members using the client
|
122 |
-
*/
|
123 |
-
public function clients($id) {
|
124 |
-
$_params = array("id" => $id);
|
125 |
-
return $this->master->call('lists/clients', $_params);
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Access the Growth History by Month in aggregate or for a given list.
|
130 |
-
* @param string $id
|
131 |
-
* @return array array of structs containing months and growth data
|
132 |
-
* - month string The Year and Month in question using YYYY-MM format
|
133 |
-
* - existing int number of existing subscribers to start the month
|
134 |
-
* - imports int number of subscribers imported during the month
|
135 |
-
* - optins int number of subscribers who opted-in during the month
|
136 |
-
*/
|
137 |
-
public function growthHistory($id=null) {
|
138 |
-
$_params = array("id" => $id);
|
139 |
-
return $this->master->call('lists/growth-history', $_params);
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* Get the list of interest groupings for a given list, including the label, form information, and included groups for each
|
144 |
-
* @param string $id
|
145 |
-
* @param bool $counts
|
146 |
-
* @return array array of structs of the interest groupings for the list
|
147 |
-
* - id int The id for the Grouping
|
148 |
-
* - name string Name for the Interest groups
|
149 |
-
* - form_field string Gives the type of interest group: checkbox,radio,select
|
150 |
-
* - groups array Array structs of the grouping options (interest groups) including:
|
151 |
-
* - bit string the bit value - not really anything to be done with this
|
152 |
-
* - name string the name of the group
|
153 |
-
* - display_order string the display order of the group, if set
|
154 |
-
* - subscribers int total number of subscribers who have this group if "counts" is true. otherwise empty
|
155 |
-
*/
|
156 |
-
public function interestGroupings($id, $counts=false) {
|
157 |
-
$_params = array("id" => $id, "counts" => $counts);
|
158 |
-
return $this->master->call('lists/interest-groupings', $_params);
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Add a single Interest Group - if interest groups for the List are not yet enabled, adding the first
|
163 |
-
group will automatically turn them on.
|
164 |
-
* @param string $id
|
165 |
-
* @param string $group_name
|
166 |
-
* @param int $grouping_id
|
167 |
-
* @return associative_array with a single entry:
|
168 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
169 |
-
*/
|
170 |
-
public function interestGroupAdd($id, $group_name, $grouping_id=null) {
|
171 |
-
$_params = array("id" => $id, "group_name" => $group_name, "grouping_id" => $grouping_id);
|
172 |
-
return $this->master->call('lists/interest-group-add', $_params);
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Delete a single Interest Group - if the last group for a list is deleted, this will also turn groups for the list off.
|
177 |
-
* @param string $id
|
178 |
-
* @param string $group_name
|
179 |
-
* @param int $grouping_id
|
180 |
-
* @return associative_array with a single entry:
|
181 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
182 |
-
*/
|
183 |
-
public function interestGroupDel($id, $group_name, $grouping_id=null) {
|
184 |
-
$_params = array("id" => $id, "group_name" => $group_name, "grouping_id" => $grouping_id);
|
185 |
-
return $this->master->call('lists/interest-group-del', $_params);
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Change the name of an Interest Group
|
190 |
-
* @param string $id
|
191 |
-
* @param string $old_name
|
192 |
-
* @param string $new_name
|
193 |
-
* @param int $grouping_id
|
194 |
-
* @return associative_array with a single entry:
|
195 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
196 |
-
*/
|
197 |
-
public function interestGroupUpdate($id, $old_name, $new_name, $grouping_id=null) {
|
198 |
-
$_params = array("id" => $id, "old_name" => $old_name, "new_name" => $new_name, "grouping_id" => $grouping_id);
|
199 |
-
return $this->master->call('lists/interest-group-update', $_params);
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Add a new Interest Grouping - if interest groups for the List are not yet enabled, adding the first
|
204 |
-
grouping will automatically turn them on.
|
205 |
-
* @param string $id
|
206 |
-
* @param string $name
|
207 |
-
* @param string $type
|
208 |
-
* @param array $groups
|
209 |
-
* @return associative_array with a single entry:
|
210 |
-
* - id int the new grouping id if the request succeeds, otherwise an error will be thrown
|
211 |
-
*/
|
212 |
-
public function interestGroupingAdd($id, $name, $type, $groups) {
|
213 |
-
$_params = array("id" => $id, "name" => $name, "type" => $type, "groups" => $groups);
|
214 |
-
return $this->master->call('lists/interest-grouping-add', $_params);
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Delete an existing Interest Grouping - this will permanently delete all contained interest groups and will remove those selections from all list members
|
219 |
-
* @param int $grouping_id
|
220 |
-
* @return associative_array with a single entry:
|
221 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
222 |
-
*/
|
223 |
-
public function interestGroupingDel($grouping_id) {
|
224 |
-
$_params = array("grouping_id" => $grouping_id);
|
225 |
-
return $this->master->call('lists/interest-grouping-del', $_params);
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Update an existing Interest Grouping
|
230 |
-
* @param int $grouping_id
|
231 |
-
* @param string $name
|
232 |
-
* @param string $value
|
233 |
-
* @return associative_array with a single entry:
|
234 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
235 |
-
*/
|
236 |
-
public function interestGroupingUpdate($grouping_id, $name, $value) {
|
237 |
-
$_params = array("grouping_id" => $grouping_id, "name" => $name, "value" => $value);
|
238 |
-
return $this->master->call('lists/interest-grouping-update', $_params);
|
239 |
-
}
|
240 |
-
|
241 |
-
/**
|
242 |
-
* Retrieve the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address
|
243 |
-
* @param string $id
|
244 |
-
* @return array array of locations
|
245 |
-
* - country string the country name
|
246 |
-
* - cc string the ISO 3166 2 digit country code
|
247 |
-
* - percent double the percent of subscribers in the country
|
248 |
-
* - total double the total number of subscribers in the country
|
249 |
-
*/
|
250 |
-
public function locations($id) {
|
251 |
-
$_params = array("id" => $id);
|
252 |
-
return $this->master->call('lists/locations', $_params);
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Get the most recent 100 activities for particular list members (open, click, bounce, unsub, abuse, sent to, etc.)
|
257 |
-
* @param string $id
|
258 |
-
* @param array $emails
|
259 |
-
* - email string an email address - for new subscribers obviously this should be used
|
260 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
261 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
262 |
-
* @return associative_array of data and success/error counts
|
263 |
-
* - success_count int the number of subscribers successfully found on the list
|
264 |
-
* - error_count int the number of subscribers who were not found on the list
|
265 |
-
* - errors array array of error structs including:
|
266 |
-
* - email string whatever was passed in the email parameter
|
267 |
-
* - email string the email address added
|
268 |
-
* - euid string the email unique id
|
269 |
-
* - leid string the list member's truly unique id
|
270 |
-
* - error string the error message
|
271 |
-
* - code string the error code
|
272 |
-
* - data array an array of structs where each activity record has:
|
273 |
-
* - email string whatever was passed in the email parameter
|
274 |
-
* - email string the email address added
|
275 |
-
* - euid string the email unique id
|
276 |
-
* - leid string the list member's truly unique id
|
277 |
-
* - activity array an array of structs containing the activity, including:
|
278 |
-
* - action string The action name, one of: open, click, bounce, unsub, abuse, sent, queued, ecomm, mandrill_send, mandrill_hard_bounce, mandrill_soft_bounce, mandrill_open, mandrill_click, mandrill_spam, mandrill_unsub, mandrill_reject
|
279 |
-
* - timestamp string The date+time of the action (GMT)
|
280 |
-
* - url string For click actions, the url clicked, otherwise this is empty
|
281 |
-
* - type string If there's extra bounce, unsub, etc data it will show up here.
|
282 |
-
* - campaign_id string The campaign id the action was related to, if it exists - otherwise empty (ie, direct unsub from list)
|
283 |
-
* - campaign_data associative_array If not deleted, the campaigns/list data for the campaign
|
284 |
-
*/
|
285 |
-
public function memberActivity($id, $emails) {
|
286 |
-
$_params = array("id" => $id, "emails" => $emails);
|
287 |
-
return $this->master->call('lists/member-activity', $_params);
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Get all the information for particular members of a list
|
292 |
-
* @param string $id
|
293 |
-
* @param array $emails
|
294 |
-
* - email string an email address - for new subscribers obviously this should be used
|
295 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
296 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
297 |
-
* @return associative_array of data and success/error counts
|
298 |
-
* - success_count int the number of subscribers successfully found on the list
|
299 |
-
* - error_count int the number of subscribers who were not found on the list
|
300 |
-
* - errors array array of error structs including:
|
301 |
-
* - email associative_array whatever was passed in the email parameter
|
302 |
-
* - email string the email address added
|
303 |
-
* - euid string the email unique id
|
304 |
-
* - leid string the list member's truly unique id
|
305 |
-
* - error string the error message
|
306 |
-
* - data array array of structs for each valid list member
|
307 |
-
* - id string The unique id (euid) for this email address on an account
|
308 |
-
* - email string The email address associated with this record
|
309 |
-
* - email_type string The type of emails this customer asked to get: html or text
|
310 |
-
* - merges associative_array a struct containing a key for each merge tags and the data for those tags for this email address, plus:
|
311 |
-
* - GROUPINGS array if Interest groupings are enabled, this will exist with structs for each grouping:
|
312 |
-
* - id int the grouping id
|
313 |
-
* - name string the interest group name
|
314 |
-
* - groups array structs for each group in the grouping
|
315 |
-
* - name string the group name
|
316 |
-
* - interested bool whether the member has this group selected
|
317 |
-
* - status string The subscription status for this email address, either pending, subscribed, unsubscribed, or cleaned
|
318 |
-
* - ip_signup string IP Address this address signed up from. This may be blank if single optin is used.
|
319 |
-
* - timestamp_signup string The date+time the double optin was initiated. This may be blank if single optin is used.
|
320 |
-
* - ip_opt string IP Address this address opted in from.
|
321 |
-
* - timestamp_opt string The date+time the optin completed
|
322 |
-
* - member_rating int the rating of the subscriber. This will be 1 - 5 as described <a href="http://eepurl.com/f-2P" target="_blank">here</a>
|
323 |
-
* - campaign_id string If the user is unsubscribed and they unsubscribed from a specific campaign, that campaign_id will be listed, otherwise this is not returned.
|
324 |
-
* - lists array An array of structs for the other lists this member belongs to
|
325 |
-
* - id string the list id
|
326 |
-
* - status string the members status on that list
|
327 |
-
* - timestamp string The date+time this email address entered it's current status
|
328 |
-
* - info_changed string The last time this record was changed. If the record is old enough, this may be blank.
|
329 |
-
* - web_id int The Member id used in our web app, allows you to create a link directly to it
|
330 |
-
* - leid int The Member id used in our web app, allows you to create a link directly to it
|
331 |
-
* - list_id string The list id the for the member record being returned
|
332 |
-
* - list_name string The list name the for the member record being returned
|
333 |
-
* - language string if set/detected, a language code from <a href="http://kb.mailchimp.com/article/can-i-see-what-languages-my-subscribers-use#code" target="_blank">here</a>
|
334 |
-
* - is_gmonkey bool Whether the member is a <a href="http://mailchimp.com/features/golden-monkeys/" target="_blank">Golden Monkey</a> or not.
|
335 |
-
* - geo associative_array the geographic information if we have it. including:
|
336 |
-
* - latitude string the latitude
|
337 |
-
* - longitude string the longitude
|
338 |
-
* - gmtoff string GMT offset
|
339 |
-
* - dstoff string GMT offset during daylight savings (if DST not observered, will be same as gmtoff)
|
340 |
-
* - timezone string the timezone we've place them in
|
341 |
-
* - cc string 2 digit ISO-3166 country code
|
342 |
-
* - region string generally state, province, or similar
|
343 |
-
* - clients associative_array the client we've tracked the address as using with two keys:
|
344 |
-
* - name string the common name of the client
|
345 |
-
* - icon_url string a url representing a path to an icon representing this client
|
346 |
-
* - static_segments array structs for each static segments the member is a part of including:
|
347 |
-
* - id int the segment id
|
348 |
-
* - name string the name given to the segment
|
349 |
-
* - added string the date the member was added
|
350 |
-
* - notes array structs for each note entered for this member. For each note:
|
351 |
-
* - id int the note id
|
352 |
-
* - note string the text entered
|
353 |
-
* - created string the date the note was created
|
354 |
-
* - updated string the date the note was last updated
|
355 |
-
* - created_by_name string the name of the user who created the note. This can change as users update their profile.
|
356 |
-
*/
|
357 |
-
public function memberInfo($id, $emails) {
|
358 |
-
$_params = array("id" => $id, "emails" => $emails);
|
359 |
-
return $this->master->call('lists/member-info', $_params);
|
360 |
-
}
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Get all of the list members for a list that are of a particular status and potentially matching a segment. This will cause locking, so don't run multiples at once. Are you trying to get a dump including lots of merge
|
364 |
-
data or specific members of a list? If so, checkout the <a href="/export/1.0/list.func.php">List Export API</a>
|
365 |
-
* @param string $id
|
366 |
-
* @param string $status
|
367 |
-
* @param associative_array $opts
|
368 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
369 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
370 |
-
* - sort_field string optional the data field to sort by - mergeX (1-30), your custom merge tags, "email", "rating","last_update_time", or "optin_time" - invalid fields will be ignored
|
371 |
-
* - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive)
|
372 |
-
* - segment associative_array a properly formatted segment that works with campaigns/segment-test
|
373 |
-
* @return associative_array of the total records matched and limited list member data for this page
|
374 |
-
* - total int the total matching records
|
375 |
-
* - data array structs for each member as returned by member-info
|
376 |
-
*/
|
377 |
-
public function members($id, $status='subscribed', $opts=array()) {
|
378 |
-
$_params = array("id" => $id, "status" => $status, "opts" => $opts);
|
379 |
-
return $this->master->call('lists/members', $_params);
|
380 |
-
}
|
381 |
-
|
382 |
-
/**
|
383 |
-
* Add a new merge tag to a given list
|
384 |
-
* @param string $id
|
385 |
-
* @param string $tag
|
386 |
-
* @param string $name
|
387 |
-
* @param associative_array $options
|
388 |
-
* - field_type string optional one of: text, number, radio, dropdown, date, address, phone, url, imageurl, zip, birthday - defaults to text
|
389 |
-
* - req boolean optional indicates whether the field is required - defaults to false
|
390 |
-
* - public boolean optional indicates whether the field is displayed in public - defaults to true
|
391 |
-
* - show boolean optional indicates whether the field is displayed in the app's list member view - defaults to true
|
392 |
-
* - order int The order this merge tag should be displayed in - this will cause existing values to be reset so this fits
|
393 |
-
* - default_value string optional the default value for the field. See lists/subscribe() for formatting info. Defaults to blank - max 255 bytes
|
394 |
-
* - helptext string optional the help text to be used with some newer forms. Defaults to blank - max 255 bytes
|
395 |
-
* - choices array optional kind of - an array of strings to use as the choices for radio and dropdown type fields
|
396 |
-
* - dateformat string optional only valid for birthday and date fields. For birthday type, must be "MM/DD" (default) or "DD/MM". For date type, must be "MM/DD/YYYY" (default) or "DD/MM/YYYY". Any other values will be converted to the default.
|
397 |
-
* - phoneformat string optional "US" is the default - any other value will cause them to be unformatted (international)
|
398 |
-
* - defaultcountry string optional the <a href="http://www.iso.org/iso/english_country_names_and_code_elements" target="_blank">ISO 3166 2 digit character code</a> for the default country. Defaults to "US". Anything unrecognized will be converted to the default.
|
399 |
-
* @return associative_array the full data for the new merge var, just like merge-vars returns
|
400 |
-
* - name string Name/description of the merge field
|
401 |
-
* - req bool Denotes whether the field is required (true) or not (false)
|
402 |
-
* - field_type string The "data type" of this merge var. One of: email, text, number, radio, dropdown, date, address, phone, url, imageurl
|
403 |
-
* - public bool Whether or not this field is visible to list subscribers
|
404 |
-
* - show bool Whether the field is displayed in thelist dashboard
|
405 |
-
* - order string The order this field displays in on forms
|
406 |
-
* - default string The default value for this field
|
407 |
-
* - helptext string The helptext for this field
|
408 |
-
* - size string The width of the field to be used
|
409 |
-
* - tag string The merge tag that's used for forms and lists/subscribe() and lists/update-member()
|
410 |
-
* - choices array the options available for radio and dropdown field types
|
411 |
-
* - id int an unchanging id for the merge var
|
412 |
-
*/
|
413 |
-
public function mergeVarAdd($id, $tag, $name, $options=array()) {
|
414 |
-
$_params = array("id" => $id, "tag" => $tag, "name" => $name, "options" => $options);
|
415 |
-
return $this->master->call('lists/merge-var-add', $_params);
|
416 |
-
}
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Delete a merge tag from a given list and all its members. Seriously - the data is removed from all members as well!
|
420 |
-
Note that on large lists this method may seem a bit slower than calls you typically make.
|
421 |
-
* @param string $id
|
422 |
-
* @param string $tag
|
423 |
-
* @return associative_array with a single entry:
|
424 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
425 |
-
*/
|
426 |
-
public function mergeVarDel($id, $tag) {
|
427 |
-
$_params = array("id" => $id, "tag" => $tag);
|
428 |
-
return $this->master->call('lists/merge-var-del', $_params);
|
429 |
-
}
|
430 |
-
|
431 |
-
/**
|
432 |
-
* Completely resets all data stored in a merge var on a list. All data is removed and this action can not be undone.
|
433 |
-
* @param string $id
|
434 |
-
* @param string $tag
|
435 |
-
* @return associative_array with a single entry:
|
436 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
437 |
-
*/
|
438 |
-
public function mergeVarReset($id, $tag) {
|
439 |
-
$_params = array("id" => $id, "tag" => $tag);
|
440 |
-
return $this->master->call('lists/merge-var-reset', $_params);
|
441 |
-
}
|
442 |
-
|
443 |
-
/**
|
444 |
-
* Sets a particular merge var to the specified value for every list member. Only merge var ids 1 - 30 may be modified this way. This is generally a dirty method
|
445 |
-
unless you're fixing data since you should probably be using default_values and/or conditional content. as with lists/merge-var-reset(), this can not be undone.
|
446 |
-
* @param string $id
|
447 |
-
* @param string $tag
|
448 |
-
* @param string $value
|
449 |
-
* @return associative_array with a single entry:
|
450 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
451 |
-
*/
|
452 |
-
public function mergeVarSet($id, $tag, $value) {
|
453 |
-
$_params = array("id" => $id, "tag" => $tag, "value" => $value);
|
454 |
-
return $this->master->call('lists/merge-var-set', $_params);
|
455 |
-
}
|
456 |
-
|
457 |
-
/**
|
458 |
-
* Update most parameters for a merge tag on a given list. You cannot currently change the merge type
|
459 |
-
* @param string $id
|
460 |
-
* @param string $tag
|
461 |
-
* @param associative_array $options
|
462 |
-
* @return associative_array the full data for the new merge var, just like merge-vars returns
|
463 |
-
* - name string Name/description of the merge field
|
464 |
-
* - req bool Denotes whether the field is required (true) or not (false)
|
465 |
-
* - field_type string The "data type" of this merge var. One of: email, text, number, radio, dropdown, date, address, phone, url, imageurl
|
466 |
-
* - public bool Whether or not this field is visible to list subscribers
|
467 |
-
* - show bool Whether the field is displayed in thelist dashboard
|
468 |
-
* - order string The order this field to displays in on forms
|
469 |
-
* - default string The default value for this field
|
470 |
-
* - helptext string The helptext for this field
|
471 |
-
* - size string The width of the field to be used
|
472 |
-
* - tag string The merge tag that's used for forms and lists/subscribe() and lists/update-member()
|
473 |
-
* - choices array the options available for radio and dropdown field types
|
474 |
-
* - id int an unchanging id for the merge var
|
475 |
-
*/
|
476 |
-
public function mergeVarUpdate($id, $tag, $options) {
|
477 |
-
$_params = array("id" => $id, "tag" => $tag, "options" => $options);
|
478 |
-
return $this->master->call('lists/merge-var-update', $_params);
|
479 |
-
}
|
480 |
-
|
481 |
-
/**
|
482 |
-
* Get the list of merge tags for a given list, including their name, tag, and required setting
|
483 |
-
* @param array $id
|
484 |
-
* @return associative_array of data and success/error counts
|
485 |
-
* - success_count int the number of subscribers successfully found on the list
|
486 |
-
* - error_count int the number of subscribers who were not found on the list
|
487 |
-
* - data array of structs for the merge tags on each list
|
488 |
-
* - id string the list id
|
489 |
-
* - name string the list name
|
490 |
-
* - merge_vars array of structs for each merge var
|
491 |
-
* - name string Name of the merge field
|
492 |
-
* - req bool Denotes whether the field is required (true) or not (false)
|
493 |
-
* - field_type string The "data type" of this merge var. One of the options accepted by field_type in lists/merge-var-add
|
494 |
-
* - public bool Whether or not this field is visible to list subscribers
|
495 |
-
* - show bool Whether the list owner has this field displayed on their list dashboard
|
496 |
-
* - order string The order the list owner has set this field to display in
|
497 |
-
* - default string The default value the list owner has set for this field
|
498 |
-
* - helptext string The helptext for this field
|
499 |
-
* - size string The width of the field to be used
|
500 |
-
* - tag string The merge tag that's used for forms and lists/subscribe() and listUpdateMember()
|
501 |
-
* - choices array For radio and dropdown field types, an array of the options available
|
502 |
-
* - id int an unchanging id for the merge var
|
503 |
-
* - errors array of error structs
|
504 |
-
* - id string the passed list id that failed
|
505 |
-
* - code int the resulting error code
|
506 |
-
* - msg string the resulting error message
|
507 |
-
*/
|
508 |
-
public function mergeVars($id) {
|
509 |
-
$_params = array("id" => $id);
|
510 |
-
return $this->master->call('lists/merge-vars', $_params);
|
511 |
-
}
|
512 |
-
|
513 |
-
/**
|
514 |
-
* Retrieve all of Segments for a list.
|
515 |
-
* @param string $id
|
516 |
-
* @param string $type
|
517 |
-
* @return associative_array with 2 keys:
|
518 |
-
* - static array of structs with data for each segment
|
519 |
-
* - id int the id of the segment
|
520 |
-
* - name string the name for the segment
|
521 |
-
* - created_date string the date+time the segment was created
|
522 |
-
* - last_update string the date+time the segment was last updated (add or del)
|
523 |
-
* - last_reset string the date+time the segment was last reset (ie had all members cleared from it)
|
524 |
-
* - saved array of structs with data for each segment
|
525 |
-
* - id int the id of the segment
|
526 |
-
* - name string the name for the segment
|
527 |
-
* - segment_opts string same match+conditions struct typically used
|
528 |
-
* - segment_text string a textual description of the segment match/conditions
|
529 |
-
* - created_date string the date+time the segment was created
|
530 |
-
* - last_update string the date+time the segment was last updated (add or del)
|
531 |
-
*/
|
532 |
-
public function segments($id, $type=null) {
|
533 |
-
$_params = array("id" => $id, "type" => $type);
|
534 |
-
return $this->master->call('lists/segments', $_params);
|
535 |
-
}
|
536 |
-
|
537 |
-
/**
|
538 |
-
* Save a segment against a list for later use. There is no limit to the number of segments which can be saved. Static Segments <strong>are not</strong> tied
|
539 |
-
to any merge data, interest groups, etc. They essentially allow you to configure an unlimited number of custom segments which will have standard performance.
|
540 |
-
When using proper segments, Static Segments are one of the available options for segmentation just as if you used a merge var (and they can be used with other segmentation
|
541 |
-
options), though performance may degrade at that point. Saved Segments (called "auto-updating" in the app) are essentially just the match+conditions typically
|
542 |
-
used.
|
543 |
-
* @param string $id
|
544 |
-
* @param associative_array $opts
|
545 |
-
* - type string either "static" or "saved"
|
546 |
-
* - name string a unique name per list for the segment - 100 byte maximum length, anything longer will throw an error
|
547 |
-
* - segment_opts associative_array for "saved" only, the standard segment match+conditions, just like campaigns/segment-test
|
548 |
-
* - match string "any" or "all"
|
549 |
-
* - conditions array structs for each condition, just like campaigns/segment-test
|
550 |
-
* @return associative_array with a single entry:
|
551 |
-
* - id int the id of the new segment, otherwise an error will be thrown.
|
552 |
-
*/
|
553 |
-
public function segmentAdd($id, $opts) {
|
554 |
-
$_params = array("id" => $id, "opts" => $opts);
|
555 |
-
return $this->master->call('lists/segment-add', $_params);
|
556 |
-
}
|
557 |
-
|
558 |
-
/**
|
559 |
-
* Delete a segment. Note that this will, of course, remove any member affiliations with any static segments deleted
|
560 |
-
* @param string $id
|
561 |
-
* @param int $seg_id
|
562 |
-
* @return associative_array with a single entry:
|
563 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
564 |
-
*/
|
565 |
-
public function segmentDel($id, $seg_id) {
|
566 |
-
$_params = array("id" => $id, "seg_id" => $seg_id);
|
567 |
-
return $this->master->call('lists/segment-del', $_params);
|
568 |
-
}
|
569 |
-
|
570 |
-
/**
|
571 |
-
* Allows one to test their segmentation rules before creating a campaign using them - this is no different from campaigns/segment-test() and will eventually replace it.
|
572 |
-
For the time being, the crazy segmenting condition documentation will continue to live over there.
|
573 |
-
* @param string $list_id
|
574 |
-
* @param associative_array $options
|
575 |
-
* @return associative_array with a single entry:
|
576 |
-
* - total int The total number of subscribers matching your segmentation options
|
577 |
-
*/
|
578 |
-
public function segmentTest($list_id, $options) {
|
579 |
-
$_params = array("list_id" => $list_id, "options" => $options);
|
580 |
-
return $this->master->call('lists/segment-test', $_params);
|
581 |
-
}
|
582 |
-
|
583 |
-
/**
|
584 |
-
* Update an existing segment. The list and type can not be changed.
|
585 |
-
* @param string $id
|
586 |
-
* @param int $seg_id
|
587 |
-
* @param associative_array $opts
|
588 |
-
* - name string a unique name per list for the segment - 100 byte maximum length, anything longer will throw an error
|
589 |
-
* - segment_opts associative_array for "saved" only, the standard segment match+conditions, just like campaigns/segment-test
|
590 |
-
* - match string "any" or "all"
|
591 |
-
* - conditions array structs for each condition, just like campaigns/segment-test
|
592 |
-
* @return associative_array with a single entry:
|
593 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
594 |
-
*/
|
595 |
-
public function segmentUpdate($id, $seg_id, $opts) {
|
596 |
-
$_params = array("id" => $id, "seg_id" => $seg_id, "opts" => $opts);
|
597 |
-
return $this->master->call('lists/segment-update', $_params);
|
598 |
-
}
|
599 |
-
|
600 |
-
/**
|
601 |
-
* Save a segment against a list for later use. There is no limit to the number of segments which can be saved. Static Segments <strong>are not</strong> tied
|
602 |
-
to any merge data, interest groups, etc. They essentially allow you to configure an unlimited number of custom segments which will have standard performance.
|
603 |
-
When using proper segments, Static Segments are one of the available options for segmentation just as if you used a merge var (and they can be used with other segmentation
|
604 |
-
options), though performance may degrade at that point.
|
605 |
-
* @param string $id
|
606 |
-
* @param string $name
|
607 |
-
* @return associative_array with a single entry:
|
608 |
-
* - id int the id of the new segment, otherwise an error will be thrown.
|
609 |
-
*/
|
610 |
-
public function staticSegmentAdd($id, $name) {
|
611 |
-
$_params = array("id" => $id, "name" => $name);
|
612 |
-
return $this->master->call('lists/static-segment-add', $_params);
|
613 |
-
}
|
614 |
-
|
615 |
-
/**
|
616 |
-
* Delete a static segment. Note that this will, of course, remove any member affiliations with the segment
|
617 |
-
* @param string $id
|
618 |
-
* @param int $seg_id
|
619 |
-
* @return associative_array with a single entry:
|
620 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
621 |
-
*/
|
622 |
-
public function staticSegmentDel($id, $seg_id) {
|
623 |
-
$_params = array("id" => $id, "seg_id" => $seg_id);
|
624 |
-
return $this->master->call('lists/static-segment-del', $_params);
|
625 |
-
}
|
626 |
-
|
627 |
-
/**
|
628 |
-
* Add list members to a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list
|
629 |
-
in order to be included - this <strong>will not</strong> subscribe them to the list!
|
630 |
-
* @param string $id
|
631 |
-
* @param int $seg_id
|
632 |
-
* @param array $batch
|
633 |
-
* - email string an email address
|
634 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
635 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
636 |
-
* @return associative_array an array with the results of the operation
|
637 |
-
* - success_count int the total number of successful updates (will include members already in the segment)
|
638 |
-
* - errors array structs for each error including:
|
639 |
-
* - email string whatever was passed in the email parameter
|
640 |
-
* - email string the email address added
|
641 |
-
* - euid string the email unique id
|
642 |
-
* - leid string the list member's truly unique id
|
643 |
-
* - code string the error code
|
644 |
-
* - error string the full error message
|
645 |
-
*/
|
646 |
-
public function staticSegmentMembersAdd($id, $seg_id, $batch) {
|
647 |
-
$_params = array("id" => $id, "seg_id" => $seg_id, "batch" => $batch);
|
648 |
-
return $this->master->call('lists/static-segment-members-add', $_params);
|
649 |
-
}
|
650 |
-
|
651 |
-
/**
|
652 |
-
* Remove list members from a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list
|
653 |
-
in order to be removed - this <strong>will not</strong> unsubscribe them from the list!
|
654 |
-
* @param string $id
|
655 |
-
* @param int $seg_id
|
656 |
-
* @param array $batch
|
657 |
-
* - email string an email address
|
658 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
659 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
660 |
-
* @return associative_array an array with the results of the operation
|
661 |
-
* - success_count int the total number of successful removals
|
662 |
-
* - error_count int the total number of unsuccessful removals
|
663 |
-
* - errors array structs for each error including:
|
664 |
-
* - email string whatever was passed in the email parameter
|
665 |
-
* - email string the email address added
|
666 |
-
* - euid string the email unique id
|
667 |
-
* - leid string the list member's truly unique id
|
668 |
-
* - code string the error code
|
669 |
-
* - error string the full error message
|
670 |
-
*/
|
671 |
-
public function staticSegmentMembersDel($id, $seg_id, $batch) {
|
672 |
-
$_params = array("id" => $id, "seg_id" => $seg_id, "batch" => $batch);
|
673 |
-
return $this->master->call('lists/static-segment-members-del', $_params);
|
674 |
-
}
|
675 |
-
|
676 |
-
/**
|
677 |
-
* Resets a static segment - removes <strong>all</strong> members from the static segment. Note: does not actually affect list member data
|
678 |
-
* @param string $id
|
679 |
-
* @param int $seg_id
|
680 |
-
* @return associative_array with a single entry:
|
681 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
682 |
-
*/
|
683 |
-
public function staticSegmentReset($id, $seg_id) {
|
684 |
-
$_params = array("id" => $id, "seg_id" => $seg_id);
|
685 |
-
return $this->master->call('lists/static-segment-reset', $_params);
|
686 |
-
}
|
687 |
-
|
688 |
-
/**
|
689 |
-
* Retrieve all of the Static Segments for a list.
|
690 |
-
* @param string $id
|
691 |
-
* @param boolean $get_counts
|
692 |
-
* @param int $start
|
693 |
-
* @param int $limit
|
694 |
-
* @return array an of structs with data for each static segment
|
695 |
-
* - id int the id of the segment
|
696 |
-
* - name string the name for the segment
|
697 |
-
* - member_count int the total number of subscribed members currently in a segment
|
698 |
-
* - created_date string the date+time the segment was created
|
699 |
-
* - last_update string the date+time the segment was last updated (add or del)
|
700 |
-
* - last_reset string the date+time the segment was last reset (ie had all members cleared from it)
|
701 |
-
*/
|
702 |
-
public function staticSegments($id, $get_counts=true, $start=0, $limit=null) {
|
703 |
-
$_params = array("id" => $id, "get_counts" => $get_counts, "start" => $start, "limit" => $limit);
|
704 |
-
return $this->master->call('lists/static-segments', $_params);
|
705 |
-
}
|
706 |
-
|
707 |
-
/**
|
708 |
-
* Subscribe the provided email to a list. By default this sends a confirmation email - you will not see new members until the link contained in it is clicked!
|
709 |
-
* @param string $id
|
710 |
-
* @param associative_array $email
|
711 |
-
* - email string an email address - for new subscribers obviously this should be used
|
712 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
713 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
714 |
-
* @param associative_array $merge_vars
|
715 |
-
* - new-email string set this to change the email address. This is only respected on calls using update_existing or when passed to lists/update.
|
716 |
-
* - groupings array of Interest Grouping structs. Each should contain:
|
717 |
-
* - id int Grouping "id" from lists/interest-groupings (either this or name must be present) - this id takes precedence and can't change (unlike the name)
|
718 |
-
* - name string Grouping "name" from lists/interest-groupings (either this or id must be present)
|
719 |
-
* - groups array an array of valid group names for this grouping.
|
720 |
-
* - optin_ip string Set the Opt-in IP field. <em>Abusing this may cause your account to be suspended.</em> We do validate this and it must not be a private IP address.
|
721 |
-
* - optin_time string Set the Opt-in Time field. <em>Abusing this may cause your account to be suspended.</em> We do validate this and it must be a valid date. Use - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00" to be safe. Generally, though, anything strtotime() understands we'll understand - <a href="http://us2.php.net/strtotime" target="_blank">http://us2.php.net/strtotime</a>
|
722 |
-
* - mc_location associative_array Set the member's geographic location either by optin_ip or geo data.
|
723 |
-
* - latitude string use the specified latitude (longitude must exist for this to work)
|
724 |
-
* - longitude string use the specified longitude (latitude must exist for this to work)
|
725 |
-
* - anything string if this (or any other key exists here) we'll try to use the optin ip. NOTE - this will slow down each subscribe call a bit, especially for lat/lng pairs in sparsely populated areas. Currently our automated background processes can and will overwrite this based on opens and clicks.
|
726 |
-
* - mc_language string Set the member's language preference. Supported codes are fully case-sensitive and can be found <a href="http://kb.mailchimp.com/article/can-i-see-what-languages-my-subscribers-use#code" target="_new">here</a>.
|
727 |
-
* - mc_notes array of structs for managing notes - it may contain:
|
728 |
-
* - note string the note to set. this is required unless you're deleting a note
|
729 |
-
* - id int the note id to operate on. not including this (or using an invalid id) causes a new note to be added
|
730 |
-
* - action string if the "id" key exists and is valid, an "update" key may be set to "append" (default), "prepend", "replace", or "delete" to handle how we should update existing notes. "delete", obviously, will only work with a valid "id" - passing that along with "note" and an invalid "id" is wrong and will be ignored.
|
731 |
-
* @param string $email_type
|
732 |
-
* @param bool $double_optin
|
733 |
-
* @param bool $update_existing
|
734 |
-
* @param bool $replace_interests
|
735 |
-
* @param bool $send_welcome
|
736 |
-
* @return associative_array the ids for this subscriber
|
737 |
-
* - email string the email address added
|
738 |
-
* - euid string the email unique id
|
739 |
-
* - leid string the list member's truly unique id
|
740 |
-
*/
|
741 |
-
public function subscribe($id, $email, $merge_vars=null, $email_type='html', $double_optin=true, $update_existing=false, $replace_interests=true, $send_welcome=false) {
|
742 |
-
$_params = array("id" => $id, "email" => $email, "merge_vars" => $merge_vars, "email_type" => $email_type, "double_optin" => $double_optin, "update_existing" => $update_existing, "replace_interests" => $replace_interests, "send_welcome" => $send_welcome);
|
743 |
-
return $this->master->call('lists/subscribe', $_params);
|
744 |
-
}
|
745 |
-
|
746 |
-
/**
|
747 |
-
* Unsubscribe the given email address from the list
|
748 |
-
* @param string $id
|
749 |
-
* @param associative_array $email
|
750 |
-
* - email string an email address
|
751 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
752 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
753 |
-
* @param boolean $delete_member
|
754 |
-
* @param boolean $send_goodbye
|
755 |
-
* @param boolean $send_notify
|
756 |
-
* @return associative_array with a single entry:
|
757 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
758 |
-
*/
|
759 |
-
public function unsubscribe($id, $email, $delete_member=false, $send_goodbye=true, $send_notify=true) {
|
760 |
-
$_params = array("id" => $id, "email" => $email, "delete_member" => $delete_member, "send_goodbye" => $send_goodbye, "send_notify" => $send_notify);
|
761 |
-
return $this->master->call('lists/unsubscribe', $_params);
|
762 |
-
}
|
763 |
-
|
764 |
-
/**
|
765 |
-
* Edit the email address, merge fields, and interest groups for a list member. If you are doing a batch update on lots of users,
|
766 |
-
consider using lists/batch-subscribe() with the update_existing and possible replace_interests parameter.
|
767 |
-
* @param string $id
|
768 |
-
* @param associative_array $email
|
769 |
-
* - email string an email address
|
770 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
771 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
772 |
-
* @param array $merge_vars
|
773 |
-
* @param string $email_type
|
774 |
-
* @param boolean $replace_interests
|
775 |
-
* @return associative_array the ids for this subscriber
|
776 |
-
* - email string the email address added
|
777 |
-
* - euid string the email unique id
|
778 |
-
* - leid string the list member's truly unique id
|
779 |
-
*/
|
780 |
-
public function updateMember($id, $email, $merge_vars, $email_type='', $replace_interests=true) {
|
781 |
-
$_params = array("id" => $id, "email" => $email, "merge_vars" => $merge_vars, "email_type" => $email_type, "replace_interests" => $replace_interests);
|
782 |
-
return $this->master->call('lists/update-member', $_params);
|
783 |
-
}
|
784 |
-
|
785 |
-
/**
|
786 |
-
* Add a new Webhook URL for the given list
|
787 |
-
* @param string $id
|
788 |
-
* @param string $url
|
789 |
-
* @param associative_array $actions
|
790 |
-
* - subscribe bool optional as subscribes occur, defaults to true
|
791 |
-
* - unsubscribe bool optional as subscribes occur, defaults to true
|
792 |
-
* - profile bool optional as profile updates occur, defaults to true
|
793 |
-
* - cleaned bool optional as emails are cleaned from the list, defaults to true
|
794 |
-
* - upemail bool optional when subscribers change their email address, defaults to true
|
795 |
-
* - campaign bool option when a campaign is sent or canceled, defaults to true
|
796 |
-
* @param associative_array $sources
|
797 |
-
* - user bool optional user/subscriber initiated actions, defaults to true
|
798 |
-
* - admin bool optional admin actions in our web app, defaults to true
|
799 |
-
* - api bool optional actions that happen via API calls, defaults to false
|
800 |
-
* @return associative_array with a single entry:
|
801 |
-
* - id int the id of the new webhook, otherwise an error will be thrown.
|
802 |
-
*/
|
803 |
-
public function webhookAdd($id, $url, $actions=array(), $sources=array()) {
|
804 |
-
$_params = array("id" => $id, "url" => $url, "actions" => $actions, "sources" => $sources);
|
805 |
-
return $this->master->call('lists/webhook-add', $_params);
|
806 |
-
}
|
807 |
-
|
808 |
-
/**
|
809 |
-
* Delete an existing Webhook URL from a given list
|
810 |
-
* @param string $id
|
811 |
-
* @param string $url
|
812 |
-
* @return associative_array with a single entry:
|
813 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
814 |
-
*/
|
815 |
-
public function webhookDel($id, $url) {
|
816 |
-
$_params = array("id" => $id, "url" => $url);
|
817 |
-
return $this->master->call('lists/webhook-del', $_params);
|
818 |
-
}
|
819 |
-
|
820 |
-
/**
|
821 |
-
* Return the Webhooks configured for the given list
|
822 |
-
* @param string $id
|
823 |
-
* @return array of structs for each webhook
|
824 |
-
* - url string the URL for this Webhook
|
825 |
-
* - actions associative_array the possible actions and whether they are enabled
|
826 |
-
* - subscribe bool triggered when subscribes happen
|
827 |
-
* - unsubscribe bool triggered when unsubscribes happen
|
828 |
-
* - profile bool triggered when profile updates happen
|
829 |
-
* - cleaned bool triggered when a subscriber is cleaned (bounced) from a list
|
830 |
-
* - upemail bool triggered when a subscriber's email address is changed
|
831 |
-
* - campaign bool triggered when a campaign is sent or canceled
|
832 |
-
* - sources associative_array the possible sources and whether they are enabled
|
833 |
-
* - user bool whether user/subscriber triggered actions are returned
|
834 |
-
* - admin bool whether admin (manual, in-app) triggered actions are returned
|
835 |
-
* - api bool whether api triggered actions are returned
|
836 |
-
*/
|
837 |
-
public function webhooks($id) {
|
838 |
-
$_params = array("id" => $id);
|
839 |
-
return $this->master->call('lists/webhooks', $_params);
|
840 |
-
}
|
841 |
-
|
842 |
-
/**
|
843 |
-
* Retrieve all of the lists defined for your user account
|
844 |
-
* @param associative_array $filters
|
845 |
-
* - list_id string optional - return a single list using a known list_id. Accepts multiples separated by commas when not using exact matching
|
846 |
-
* - list_name string optional - only lists that match this name
|
847 |
-
* - from_name string optional - only lists that have a default from name matching this
|
848 |
-
* - from_email string optional - only lists that have a default from email matching this
|
849 |
-
* - from_subject string optional - only lists that have a default from email matching this
|
850 |
-
* - created_before string optional - only show lists that were created before this date+time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00"
|
851 |
-
* - created_after string optional - only show lists that were created since this date+time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00"
|
852 |
-
* - exact boolean optional - flag for whether to filter on exact values when filtering, or search within content for filter values - defaults to true
|
853 |
-
* @param int $start
|
854 |
-
* @param int $limit
|
855 |
-
* @param string $sort_field
|
856 |
-
* @param string $sort_dir
|
857 |
-
* @return associative_array result of the operation including valid data and any errors
|
858 |
-
* - total int the total number of lists which matched the provided filters
|
859 |
-
* - data array structs for the lists which matched the provided filters, including the following
|
860 |
-
* - id string The list id for this list. This will be used for all other list management functions.
|
861 |
-
* - web_id int The list id used in our web app, allows you to create a link directly to it
|
862 |
-
* - name string The name of the list.
|
863 |
-
* - date_created string The date that this list was created.
|
864 |
-
* - email_type_option boolean Whether or not the List supports multiple formats for emails or just HTML
|
865 |
-
* - use_awesomebar boolean Whether or not campaigns for this list use the Awesome Bar in archives by default
|
866 |
-
* - default_from_name string Default From Name for campaigns using this list
|
867 |
-
* - default_from_email string Default From Email for campaigns using this list
|
868 |
-
* - default_subject string Default Subject Line for campaigns using this list
|
869 |
-
* - default_language string Default Language for this list's forms
|
870 |
-
* - list_rating double An auto-generated activity score for the list (0 - 5)
|
871 |
-
* - subscribe_url_short string Our eepurl shortened version of this list's subscribe form (will not change)
|
872 |
-
* - subscribe_url_long string The full version of this list's subscribe form (host will vary)
|
873 |
-
* - beamer_address string The email address to use for this list's <a href="http://kb.mailchimp.com/article/how-do-i-import-a-campaign-via-email-email-beamer/">Email Beamer</a>
|
874 |
-
* - visibility string Whether this list is Public (pub) or Private (prv). Used internally for projects like <a href="http://blog.mailchimp.com/introducing-wavelength/" target="_blank">Wavelength</a>
|
875 |
-
* - stats associative_array various stats and counts for the list - many of these are cached for at least 5 minutes
|
876 |
-
* - member_count double The number of active members in the given list.
|
877 |
-
* - unsubscribe_count double The number of members who have unsubscribed from the given list.
|
878 |
-
* - cleaned_count double The number of members cleaned from the given list.
|
879 |
-
* - member_count_since_send double The number of active members in the given list since the last campaign was sent
|
880 |
-
* - unsubscribe_count_since_send double The number of members who have unsubscribed from the given list since the last campaign was sent
|
881 |
-
* - cleaned_count_since_send double The number of members cleaned from the given list since the last campaign was sent
|
882 |
-
* - campaign_count double The number of campaigns in any status that use this list
|
883 |
-
* - grouping_count double The number of Interest Groupings for this list
|
884 |
-
* - group_count double The number of Interest Groups (regardless of grouping) for this list
|
885 |
-
* - merge_var_count double The number of merge vars for this list (not including the required EMAIL one)
|
886 |
-
* - avg_sub_rate double the average number of subscribe per month for the list (empty value if we haven't calculated this yet)
|
887 |
-
* - avg_unsub_rate double the average number of unsubscribe per month for the list (empty value if we haven't calculated this yet)
|
888 |
-
* - target_sub_rate double the target subscription rate for the list to keep it growing (empty value if we haven't calculated this yet)
|
889 |
-
* - open_rate double the average open rate per campaign for the list (empty value if we haven't calculated this yet)
|
890 |
-
* - click_rate double the average click rate per campaign for the list (empty value if we haven't calculated this yet)
|
891 |
-
* - modules array Any list specific modules installed for this list (example is SocialPro)
|
892 |
-
* - errors array structs of any errors found while loading lists - usually just from providing invalid list ids
|
893 |
-
* - param string the data that caused the failure
|
894 |
-
* - code int the error code
|
895 |
-
* - error string the error message
|
896 |
-
*/
|
897 |
-
public function getList($filters=array(), $start=0, $limit=25, $sort_field='created', $sort_dir='DESC') {
|
898 |
-
$_params = array("filters" => $filters, "start" => $start, "limit" => $limit, "sort_field" => $sort_field, "sort_dir" => $sort_dir);
|
899 |
-
return $this->master->call('lists/list', $_params);
|
900 |
-
}
|
901 |
-
|
902 |
-
}
|
903 |
-
|
904 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Mobile.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Mobile {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Neapolitan.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Neapolitan {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
}
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Reports.php
DELETED
@@ -1,459 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Reports {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Get all email addresses that complained about a given campaign
|
10 |
-
* @param string $cid
|
11 |
-
* @param associative_array $opts
|
12 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
13 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
14 |
-
* - since string optional pull only messages since this time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00"
|
15 |
-
* @return associative_array abuse report data for this campaign
|
16 |
-
* - total int the total reports matched
|
17 |
-
* - data array a struct for the each report, including:
|
18 |
-
* - date string date/time the abuse report was received and processed
|
19 |
-
* - member string the email address that reported abuse - will only contain email if the list or member has been removed
|
20 |
-
* - type string an internal type generally specifying the originating mail provider - may not be useful outside of filling report views
|
21 |
-
*/
|
22 |
-
public function abuse($cid, $opts=array()) {
|
23 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
24 |
-
return $this->master->call('reports/abuse', $_params);
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best
|
29 |
-
suited for display in customized reports pages. Note: some messages will contain HTML - clean tags as necessary
|
30 |
-
* @param string $cid
|
31 |
-
* @return array of structs for advice on the campaign's performance, each containing:
|
32 |
-
* - msg string the advice message
|
33 |
-
* - type string the "type" of the message. one of: negative, positive, or neutral
|
34 |
-
*/
|
35 |
-
public function advice($cid) {
|
36 |
-
$_params = array("cid" => $cid);
|
37 |
-
return $this->master->call('reports/advice', $_params);
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Retrieve the most recent full bounce message for a specific email address on the given campaign.
|
42 |
-
Messages over 30 days old are subject to being removed
|
43 |
-
* @param string $cid
|
44 |
-
* @param associative_array $email
|
45 |
-
* - email string an email address - this is recommended for this method
|
46 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
47 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
48 |
-
* @return associative_array the full bounce message for this email+campaign along with some extra data.
|
49 |
-
* - date string date the bounce was received and processed
|
50 |
-
* - member associative_array the member record as returned by lists/member-info()
|
51 |
-
* - message string the entire bounce message received
|
52 |
-
*/
|
53 |
-
public function bounceMessage($cid, $email) {
|
54 |
-
$_params = array("cid" => $cid, "email" => $email);
|
55 |
-
return $this->master->call('reports/bounce-message', $_params);
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Retrieve the full bounce messages for the given campaign. Note that this can return very large amounts
|
60 |
-
of data depending on how large the campaign was and how much cruft the bounce provider returned. Also,
|
61 |
-
messages over 30 days old are subject to being removed
|
62 |
-
* @param string $cid
|
63 |
-
* @param associative_array $opts
|
64 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
65 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
66 |
-
* - since string optional pull only messages since this time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00"
|
67 |
-
* @return associative_array data for the full bounce messages for this campaign
|
68 |
-
* - total int that total number of bounce messages for the campaign
|
69 |
-
* - data array structs containing the data for this page
|
70 |
-
* - date string date the bounce was received and processed
|
71 |
-
* - member associative_array the member record as returned by lists/member-info()
|
72 |
-
* - message string the entire bounce message received
|
73 |
-
*/
|
74 |
-
public function bounceMessages($cid, $opts=array()) {
|
75 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
76 |
-
return $this->master->call('reports/bounce-messages', $_params);
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Return the list of email addresses that clicked on a given url, and how many times they clicked
|
81 |
-
* @param string $cid
|
82 |
-
* @param int $tid
|
83 |
-
* @param associative_array $opts
|
84 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
85 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
86 |
-
* - sort_field string optional the data to sort by - "clicked" (order clicks occurred, default) or "clicks" (total number of opens). Invalid fields will fall back on the default.
|
87 |
-
* - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive)
|
88 |
-
* @return associative_array containing the total records matched and the specific records for this page
|
89 |
-
* - total int the total number of records matched
|
90 |
-
* - data array structs for each email addresses that click the requested url
|
91 |
-
* - member associative_array the member record as returned by lists/member-info()
|
92 |
-
* - clicks int Total number of times the URL was clicked by this email address
|
93 |
-
*/
|
94 |
-
public function clickDetail($cid, $tid, $opts=array()) {
|
95 |
-
$_params = array("cid" => $cid, "tid" => $tid, "opts" => $opts);
|
96 |
-
return $this->master->call('reports/click-detail', $_params);
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* The urls tracked and their click counts for a given campaign.
|
101 |
-
* @param string $cid
|
102 |
-
* @return associative_array including:
|
103 |
-
* - total array structs for each url tracked for the full campaign
|
104 |
-
* - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats
|
105 |
-
* - clicks int Number of times the specific link was clicked
|
106 |
-
* - clicks_percent double the percentage of total clicks "clicks" represents
|
107 |
-
* - unique int Number of unique people who clicked on the specific link
|
108 |
-
* - unique_percent double the percentage of unique clicks "unique" represents
|
109 |
-
* - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map.
|
110 |
-
* - a array if this was an absplit campaign, stat structs for the a group
|
111 |
-
* - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats
|
112 |
-
* - clicks int Number of times the specific link was clicked
|
113 |
-
* - clicks_percent double the percentage of total clicks "clicks" represents
|
114 |
-
* - unique int Number of unique people who clicked on the specific link
|
115 |
-
* - unique_percent double the percentage of unique clicks "unique" represents
|
116 |
-
* - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map.
|
117 |
-
* - b array if this was an absplit campaign, stat structs for the b group
|
118 |
-
* - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats
|
119 |
-
* - clicks int Number of times the specific link was clicked
|
120 |
-
* - clicks_percent double the percentage of total clicks "clicks" represents
|
121 |
-
* - unique int Number of unique people who clicked on the specific link
|
122 |
-
* - unique_percent double the percentage of unique clicks "unique" represents
|
123 |
-
* - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map.
|
124 |
-
*/
|
125 |
-
public function clicks($cid) {
|
126 |
-
$_params = array("cid" => $cid);
|
127 |
-
return $this->master->call('reports/clicks', $_params);
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Retrieve the Ecommerce Orders tracked by ecomm/order-add()
|
132 |
-
* @param string $cid
|
133 |
-
* @param associative_array $opts
|
134 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
135 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
136 |
-
* - since string optional pull only messages since this time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00"
|
137 |
-
* @return associative_array the total matching orders and the specific orders for the requested page
|
138 |
-
* - total int the total matching orders
|
139 |
-
* - data array structs for the actual data for each order being returned
|
140 |
-
* - store_id string the store id generated by the plugin used to uniquely identify a store
|
141 |
-
* - store_name string the store name collected by the plugin - often the domain name
|
142 |
-
* - order_id string the internal order id the store tracked this order by
|
143 |
-
* - member associative_array the member record as returned by lists/member-info() that received this campaign and is associated with this order
|
144 |
-
* - order_total double the order total
|
145 |
-
* - tax_total double the total tax for the order (if collected)
|
146 |
-
* - ship_total double the shipping total for the order (if collected)
|
147 |
-
* - order_date string the date the order was tracked - from the store if possible, otherwise the GMT time we received it
|
148 |
-
* - lines array structs containing details of the order:
|
149 |
-
* - line_num int the line number assigned to this line
|
150 |
-
* - product_id int the product id assigned to this item
|
151 |
-
* - product_name string the product name
|
152 |
-
* - product_sku string the sku for the product
|
153 |
-
* - product_category_id int the id for the product category
|
154 |
-
* - product_category_name string the product category name
|
155 |
-
* - qty double optional the quantity of the item ordered - defaults to 1
|
156 |
-
* - cost double optional the cost of a single item (ie, not the extended cost of the line) - defaults to 0
|
157 |
-
*/
|
158 |
-
public function ecommOrders($cid, $opts=array()) {
|
159 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
160 |
-
return $this->master->call('reports/ecomm-orders', $_params);
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Retrieve the eepurl stats from the web/Twitter mentions for this campaign
|
165 |
-
* @param string $cid
|
166 |
-
* @return associative_array containing tweets, retweets, clicks, and referrer related to using the campaign's eepurl
|
167 |
-
* - twitter associative_array various Twitter related stats
|
168 |
-
* - tweets int Total number of tweets seen
|
169 |
-
* - first_tweet string date and time of the first tweet seen
|
170 |
-
* - last_tweet string date and time of the last tweet seen
|
171 |
-
* - retweets int Total number of retweets seen
|
172 |
-
* - first_retweet string date and time of the first retweet seen
|
173 |
-
* - last_retweet string date and time of the last retweet seen
|
174 |
-
* - statuses array an structs for statuses recorded including:
|
175 |
-
* - status string the text of the tweet/update
|
176 |
-
* - screen_name string the screen name as recorded when first seen
|
177 |
-
* - status_id string the status id of the tweet (they are really unsigned 64 bit ints)
|
178 |
-
* - datetime string the date/time of the tweet
|
179 |
-
* - is_retweet bool whether or not this was a retweet
|
180 |
-
* - clicks associative_array stats related to click-throughs on the eepurl
|
181 |
-
* - clicks int Total number of clicks seen
|
182 |
-
* - first_click string date and time of the first click seen
|
183 |
-
* - last_click string date and time of the first click seen
|
184 |
-
* - locations array structs for geographic locations including:
|
185 |
-
* - country string the country name the click was tracked to
|
186 |
-
* - region string the region in the country the click was tracked to (if available)
|
187 |
-
* - referrers array structs for referrers, including
|
188 |
-
* - referrer string the referrer, truncated to 100 bytes
|
189 |
-
* - clicks int Total number of clicks seen from this referrer
|
190 |
-
* - first_click string date and time of the first click seen from this referrer
|
191 |
-
* - last_click string date and time of the first click seen from this referrer
|
192 |
-
*/
|
193 |
-
public function eepurl($cid) {
|
194 |
-
$_params = array("cid" => $cid);
|
195 |
-
return $this->master->call('reports/eepurl', $_params);
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Given a campaign and email address, return the entire click and open history with timestamps, ordered by time. If you need to dump the full activity for a campaign
|
200 |
-
and/or get incremental results, you should use the <a href="http://apidocs.mailchimp.com/export/1.0/campaignsubscriberactivity.func.php" targret="_new">campaignSubscriberActivity Export API method</a>,
|
201 |
-
<strong>not</strong> this, especially for large campaigns.
|
202 |
-
* @param string $cid
|
203 |
-
* @param array $emails
|
204 |
-
* - email string an email address
|
205 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
206 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
207 |
-
* @return associative_array of data and success/error counts
|
208 |
-
* - success_count int the number of subscribers successfully found on the list
|
209 |
-
* - error_count int the number of subscribers who were not found on the list
|
210 |
-
* - errors array array of error structs including:
|
211 |
-
* - email string whatever was passed in the email parameter
|
212 |
-
* - email string the email address added
|
213 |
-
* - euid string the email unique id
|
214 |
-
* - leid string the list member's truly unique id
|
215 |
-
* - msg string the error message
|
216 |
-
* - data array an array of structs where each activity record has:
|
217 |
-
* - email string whatever was passed in the email parameter
|
218 |
-
* - email string the email address added
|
219 |
-
* - euid string the email unique id
|
220 |
-
* - leid string the list member's truly unique id
|
221 |
-
* - member associative_array the member record as returned by lists/member-info()
|
222 |
-
* - activity array an array of structs containing the activity, including:
|
223 |
-
* - action string The action name - either open or click
|
224 |
-
* - timestamp string The date/time of the action (GMT)
|
225 |
-
* - url string For click actions, the url clicked, otherwise this is empty
|
226 |
-
* - ip string The IP address the activity came from
|
227 |
-
*/
|
228 |
-
public function memberActivity($cid, $emails) {
|
229 |
-
$_params = array("cid" => $cid, "emails" => $emails);
|
230 |
-
return $this->master->call('reports/member-activity', $_params);
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* Retrieve the list of email addresses that did not open a given campaign
|
235 |
-
* @param string $cid
|
236 |
-
* @param associative_array $opts
|
237 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
238 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
239 |
-
* @return associative_array a total of all matching emails and the specific emails for this page
|
240 |
-
* - total int the total number of members who didn't open the campaign
|
241 |
-
* - data array structs for each campaign member matching as returned by lists/member-info()
|
242 |
-
*/
|
243 |
-
public function notOpened($cid, $opts=array()) {
|
244 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
245 |
-
return $this->master->call('reports/not-opened', $_params);
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Retrieve the list of email addresses that opened a given campaign with how many times they opened
|
250 |
-
* @param string $cid
|
251 |
-
* @param associative_array $opts
|
252 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
253 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
254 |
-
* - sort_field string optional the data to sort by - "opened" (order opens occurred, default) or "opens" (total number of opens). Invalid fields will fall back on the default.
|
255 |
-
* - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive)
|
256 |
-
* @return associative_array containing the total records matched and the specific records for this page
|
257 |
-
* - total int the total number of records matched
|
258 |
-
* - data array structs for the actual opens data, including:
|
259 |
-
* - member associative_array the member record as returned by lists/member-info()
|
260 |
-
* - opens int Total number of times the campaign was opened by this email address
|
261 |
-
*/
|
262 |
-
public function opened($cid, $opts=array()) {
|
263 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
264 |
-
return $this->master->call('reports/opened', $_params);
|
265 |
-
}
|
266 |
-
|
267 |
-
/**
|
268 |
-
* Get the top 5 performing email domains for this campaign. Users wanting more than 5 should use campaign reports/member-activity()
|
269 |
-
or campaignEmailStatsAIMAll() and generate any additional stats they require.
|
270 |
-
* @param string $cid
|
271 |
-
* @return array domains structs for each email domains and their associated stats
|
272 |
-
* - domain string Domain name or special "Other" to roll-up stats past 5 domains
|
273 |
-
* - total_sent int Total Email across all domains - this will be the same in every row
|
274 |
-
* - emails int Number of emails sent to this domain
|
275 |
-
* - bounces int Number of bounces
|
276 |
-
* - opens int Number of opens
|
277 |
-
* - clicks int Number of clicks
|
278 |
-
* - unsubs int Number of unsubs
|
279 |
-
* - delivered int Number of deliveries
|
280 |
-
* - emails_pct int Percentage of emails that went to this domain (whole number)
|
281 |
-
* - bounces_pct int Percentage of bounces from this domain (whole number)
|
282 |
-
* - opens_pct int Percentage of opens from this domain (whole number)
|
283 |
-
* - clicks_pct int Percentage of clicks from this domain (whole number)
|
284 |
-
* - unsubs_pct int Percentage of unsubs from this domain (whole number)
|
285 |
-
*/
|
286 |
-
public function domainPerformance($cid) {
|
287 |
-
$_params = array("cid" => $cid);
|
288 |
-
return $this->master->call('reports/domain-performance', $_params);
|
289 |
-
}
|
290 |
-
|
291 |
-
/**
|
292 |
-
* Retrieve the countries/regions and number of opens tracked for each. Email address are not returned.
|
293 |
-
* @param string $cid
|
294 |
-
* @return array an array of country structs where opens occurred
|
295 |
-
* - code string The ISO3166 2 digit country code
|
296 |
-
* - name string A version of the country name, if we have it
|
297 |
-
* - opens int The total number of opens that occurred in the country
|
298 |
-
* - regions array structs of data for each sub-region in the country
|
299 |
-
* - code string An internal code for the region. When this is blank, it indicates we know the country, but not the region
|
300 |
-
* - name string The name of the region, if we have one. For blank "code" values, this will be "Rest of Country"
|
301 |
-
* - opens int The total number of opens that occurred in the country
|
302 |
-
*/
|
303 |
-
public function geoOpens($cid) {
|
304 |
-
$_params = array("cid" => $cid);
|
305 |
-
return $this->master->call('reports/geo-opens', $_params);
|
306 |
-
}
|
307 |
-
|
308 |
-
/**
|
309 |
-
* Retrieve the Google Analytics data we've collected for this campaign. Note, requires Google Analytics Add-on to be installed and configured.
|
310 |
-
* @param string $cid
|
311 |
-
* @return array of structs for analytics we've collected for the passed campaign.
|
312 |
-
* - visits int number of visits
|
313 |
-
* - pages int number of page views
|
314 |
-
* - new_visits int new visits recorded
|
315 |
-
* - bounces int vistors who "bounced" from your site
|
316 |
-
* - time_on_site double the total time visitors spent on your sites
|
317 |
-
* - goal_conversions int number of goals converted
|
318 |
-
* - goal_value double value of conversion in dollars
|
319 |
-
* - revenue double revenue generated by campaign
|
320 |
-
* - transactions int number of transactions tracked
|
321 |
-
* - ecomm_conversions int number Ecommerce transactions tracked
|
322 |
-
* - goals array structs containing goal names and number of conversions
|
323 |
-
* - name string the name of the goal
|
324 |
-
* - conversions int the number of conversions for the goal
|
325 |
-
*/
|
326 |
-
public function googleAnalytics($cid) {
|
327 |
-
$_params = array("cid" => $cid);
|
328 |
-
return $this->master->call('reports/google-analytics', $_params);
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Get email addresses the campaign was sent to
|
333 |
-
* @param string $cid
|
334 |
-
* @param associative_array $opts
|
335 |
-
* - status string optional the status to pull - one of 'sent', 'hard' (bounce), or 'soft' (bounce). By default, all records are returned
|
336 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
337 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
338 |
-
* @return associative_array a total of all matching emails and the specific emails for this page
|
339 |
-
* - total int the total number of members for the campaign and status
|
340 |
-
* - data array structs for each campaign member matching
|
341 |
-
* - member associative_array the member record as returned by lists/member-info()
|
342 |
-
* - status string the status of the send - one of 'sent', 'hard', 'soft'
|
343 |
-
* - absplit_group string if this was an absplit campaign, one of 'a','b', or 'winner'
|
344 |
-
* - tz_group string if this was an timewarp campaign the timezone GMT offset the member was included in
|
345 |
-
*/
|
346 |
-
public function sentTo($cid, $opts=array()) {
|
347 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
348 |
-
return $this->master->call('reports/sent-to', $_params);
|
349 |
-
}
|
350 |
-
|
351 |
-
/**
|
352 |
-
* Get the URL to a customized <a href="http://eepurl.com/gKmL" target="_blank">VIP Report</a> for the specified campaign and optionally send an email to someone with links to it. Note subsequent calls will overwrite anything already set for the same campign (eg, the password)
|
353 |
-
* @param string $cid
|
354 |
-
* @param array $opts
|
355 |
-
* - to_email string optional - optional, comma delimited list of email addresses to share the report with - no value means an email will not be sent
|
356 |
-
* - theme_id int optional - either a global or a user-specific theme id. Currently this needs to be pulled out of either the Share Report or Cobranding web views by grabbing the "theme" attribute from the list presented.
|
357 |
-
* - css_url string optional - a link to an external CSS file to be included after our default CSS (http://vip-reports.net/css/vip.css) <strong>only if</strong> loaded via the "secure_url" - max 255 bytes
|
358 |
-
* @return associative_array details for the shared report, including:
|
359 |
-
* - title string The Title of the Campaign being shared
|
360 |
-
* - url string The URL to the shared report
|
361 |
-
* - secure_url string The URL to the shared report, including the password (good for loading in an IFRAME). For non-secure reports, this will not be returned
|
362 |
-
* - password string If secured, the password for the report, otherwise this field will not be returned
|
363 |
-
*/
|
364 |
-
public function share($cid, $opts=array()) {
|
365 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
366 |
-
return $this->master->call('reports/share', $_params);
|
367 |
-
}
|
368 |
-
|
369 |
-
/**
|
370 |
-
* Retrieve relevant aggregate campaign statistics (opens, bounces, clicks, etc.)
|
371 |
-
* @param string $cid
|
372 |
-
* @return associative_array the statistics for this campaign
|
373 |
-
* - syntax_errors int Number of email addresses in campaign that had syntactical errors.
|
374 |
-
* - hard_bounces int Number of email addresses in campaign that hard bounced.
|
375 |
-
* - soft_bounces int Number of email addresses in campaign that soft bounced.
|
376 |
-
* - unsubscribes int Number of email addresses in campaign that unsubscribed.
|
377 |
-
* - abuse_reports int Number of email addresses in campaign that reported campaign for abuse.
|
378 |
-
* - forwards int Number of times email was forwarded to a friend.
|
379 |
-
* - forwards_opens int Number of times a forwarded email was opened.
|
380 |
-
* - opens int Number of times the campaign was opened.
|
381 |
-
* - last_open string Date of the last time the email was opened.
|
382 |
-
* - unique_opens int Number of people who opened the campaign.
|
383 |
-
* - clicks int Number of times a link in the campaign was clicked.
|
384 |
-
* - unique_clicks int Number of unique recipient/click pairs for the campaign.
|
385 |
-
* - last_click string Date of the last time a link in the email was clicked.
|
386 |
-
* - users_who_clicked int Number of unique recipients who clicked on a link in the campaign.
|
387 |
-
* - emails_sent int Number of email addresses campaign was sent to.
|
388 |
-
* - unique_likes int total number of unique likes (Facebook)
|
389 |
-
* - recipient_likes int total number of recipients who liked (Facebook) the campaign
|
390 |
-
* - facebook_likes int total number of likes (Facebook) that came from Facebook
|
391 |
-
* - industry associative_array Various rates/percentages for the account's selected industry - empty otherwise. These will vary across calls, do not use them for anything important.
|
392 |
-
* - type string the selected industry
|
393 |
-
* - open_rate float industry open rate
|
394 |
-
* - click_rate float industry click rate
|
395 |
-
* - bounce_rate float industry bounce rate
|
396 |
-
* - unopen_rate float industry unopen rate
|
397 |
-
* - unsub_rate float industry unsub rate
|
398 |
-
* - abuse_rate float industry abuse rate
|
399 |
-
* - absplit associative_array If this was an absplit campaign, stats for the A and B groups will be returned - otherwise this is empty
|
400 |
-
* - bounces_a int bounces for the A group
|
401 |
-
* - bounces_b int bounces for the B group
|
402 |
-
* - forwards_a int forwards for the A group
|
403 |
-
* - forwards_b int forwards for the B group
|
404 |
-
* - abuse_reports_a int abuse reports for the A group
|
405 |
-
* - abuse_reports_b int abuse reports for the B group
|
406 |
-
* - unsubs_a int unsubs for the A group
|
407 |
-
* - unsubs_b int unsubs for the B group
|
408 |
-
* - recipients_click_a int clicks for the A group
|
409 |
-
* - recipients_click_b int clicks for the B group
|
410 |
-
* - forwards_opens_a int opened forwards for the A group
|
411 |
-
* - forwards_opens_b int opened forwards for the B group
|
412 |
-
* - opens_a int total opens for the A group
|
413 |
-
* - opens_b int total opens for the B group
|
414 |
-
* - last_open_a string date/time of last open for the A group
|
415 |
-
* - last_open_b string date/time of last open for the BG group
|
416 |
-
* - unique_opens_a int unique opens for the A group
|
417 |
-
* - unique_opens_b int unique opens for the B group
|
418 |
-
* - timewarp array If this campaign was a Timewarp campaign, an array of structs from each timezone stats exist for. Each will contain:
|
419 |
-
* - opens int opens for this timezone
|
420 |
-
* - last_open string the date/time of the last open for this timezone
|
421 |
-
* - unique_opens int the unique opens for this timezone
|
422 |
-
* - clicks int the total clicks for this timezone
|
423 |
-
* - last_click string the date/time of the last click for this timezone
|
424 |
-
* - unique_opens int the unique clicks for this timezone
|
425 |
-
* - bounces int the total bounces for this timezone
|
426 |
-
* - total int the total number of members sent to in this timezone
|
427 |
-
* - sent int the total number of members delivered to in this timezone
|
428 |
-
* - timeseries array structs for the first 24 hours of the campaign, per-hour stats:
|
429 |
-
* - timestamp string The timestemp in Y-m-d H:00:00 format
|
430 |
-
* - emails_sent int the total emails sent during the hour
|
431 |
-
* - unique_opens int unique opens seen during the hour
|
432 |
-
* - recipients_click int unique clicks seen during the hour
|
433 |
-
*/
|
434 |
-
public function summary($cid) {
|
435 |
-
$_params = array("cid" => $cid);
|
436 |
-
return $this->master->call('reports/summary', $_params);
|
437 |
-
}
|
438 |
-
|
439 |
-
/**
|
440 |
-
* Get all unsubscribed email addresses for a given campaign
|
441 |
-
* @param string $cid
|
442 |
-
* @param associative_array $opts
|
443 |
-
* - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
|
444 |
-
* - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
|
445 |
-
* @return associative_array a total of all unsubscribed emails and the specific members for this page
|
446 |
-
* - total int the total number of unsubscribes for the campaign
|
447 |
-
* - data array structs for the email addresses that unsubscribed
|
448 |
-
* - member string the member that unsubscribed as returned by lists/member-info()
|
449 |
-
* - reason string the reason collected for the unsubscribe. If populated, one of 'NORMAL','NOSIGNUP','INAPPROPRIATE','SPAM','OTHER'
|
450 |
-
* - reason_text string if the reason is OTHER, the text entered.
|
451 |
-
*/
|
452 |
-
public function unsubscribes($cid, $opts=array()) {
|
453 |
-
$_params = array("cid" => $cid, "opts" => $opts);
|
454 |
-
return $this->master->call('reports/unsubscribes', $_params);
|
455 |
-
}
|
456 |
-
|
457 |
-
}
|
458 |
-
|
459 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Templates.php
DELETED
@@ -1,114 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Templates {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Create a new user template, <strong>NOT</strong> campaign content. These templates can then be applied while creating campaigns.
|
10 |
-
* @param string $name
|
11 |
-
* @param string $html
|
12 |
-
* @param int $folder_id
|
13 |
-
* @return associative_array with a single element:
|
14 |
-
* - template_id int the new template id, otherwise an error is thrown.
|
15 |
-
*/
|
16 |
-
public function add($name, $html, $folder_id=null) {
|
17 |
-
$_params = array("name" => $name, "html" => $html, "folder_id" => $folder_id);
|
18 |
-
return $this->master->call('templates/add', $_params);
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Delete (deactivate) a user template
|
23 |
-
* @param int $template_id
|
24 |
-
* @return associative_array with a single entry:
|
25 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
26 |
-
*/
|
27 |
-
public function del($template_id) {
|
28 |
-
$_params = array("template_id" => $template_id);
|
29 |
-
return $this->master->call('templates/del', $_params);
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Pull details for a specific template to help support editing
|
34 |
-
* @param int $template_id
|
35 |
-
* @param string $type
|
36 |
-
* @return associative_array info to be used when editing
|
37 |
-
* - default_content associative_array the default content broken down into the named editable sections for the template - dependant upon template, so not documented
|
38 |
-
* - sections associative_array the valid editable section names - dependant upon template, so not documented
|
39 |
-
* - source string the full source of the template as if you exported it via our template editor
|
40 |
-
* - preview string similar to the source, but the rendered version of the source from our popup preview
|
41 |
-
*/
|
42 |
-
public function info($template_id, $type='user') {
|
43 |
-
$_params = array("template_id" => $template_id, "type" => $type);
|
44 |
-
return $this->master->call('templates/info', $_params);
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created.
|
49 |
-
* @param associative_array $types
|
50 |
-
* - user boolean Custom templates for this user account. Defaults to true.
|
51 |
-
* - gallery boolean Templates from our Gallery. Note that some templates that require extra configuration are withheld. (eg, the Etsy template). Defaults to false.
|
52 |
-
* - base boolean Our "start from scratch" extremely basic templates. Defaults to false. As of the 9.0 update, "base" templates are no longer available via the API because they are now all saved Drag & Drop templates.
|
53 |
-
* @param associative_array $filters
|
54 |
-
* - category string optional for Gallery templates only, limit to a specific template category
|
55 |
-
* - folder_id string user templates, limit to this folder_id
|
56 |
-
* - include_inactive boolean user templates are not deleted, only set inactive. defaults to false.
|
57 |
-
* - inactive_only boolean only include inactive user templates. defaults to false.
|
58 |
-
* - include_drag_and_drop boolean Include templates created and saved using the new Drag & Drop editor. <strong>Note:</strong> You will not be able to edit or create new drag & drop templates via this API. This is useful only for creating a new campaign based on a drag & drop template.
|
59 |
-
* @return associative_array for each type
|
60 |
-
* - user array matching user templates, if requested.
|
61 |
-
* - id int Id of the template
|
62 |
-
* - name string Name of the template
|
63 |
-
* - layout string General description of the layout of the template
|
64 |
-
* - category string The category for the template, if there is one.
|
65 |
-
* - preview_image string If we've generated it, the url of the preview image for the template. We do out best to keep these up to date, but Preview image urls are not guaranteed to be available
|
66 |
-
* - date_created string The date/time the template was created
|
67 |
-
* - active boolean whether or not the template is active and available for use.
|
68 |
-
* - edit_source boolean Whether or not you are able to edit the source of a template.
|
69 |
-
* - folder_id boolean if it's in one, the folder id
|
70 |
-
* - gallery array matching gallery templates, if requested.
|
71 |
-
* - id int Id of the template
|
72 |
-
* - name string Name of the template
|
73 |
-
* - layout string General description of the layout of the template
|
74 |
-
* - category string The category for the template, if there is one.
|
75 |
-
* - preview_image string If we've generated it, the url of the preview image for the template. We do out best to keep these up to date, but Preview image urls are not guaranteed to be available
|
76 |
-
* - date_created string The date/time the template was created
|
77 |
-
* - active boolean whether or not the template is active and available for use.
|
78 |
-
* - edit_source boolean Whether or not you are able to edit the source of a template.
|
79 |
-
* - base array matching base templates, if requested. (Will always be empty as of 9.0)
|
80 |
-
*/
|
81 |
-
public function getList($types=array(), $filters=array()) {
|
82 |
-
$_params = array("types" => $types, "filters" => $filters);
|
83 |
-
return $this->master->call('templates/list', $_params);
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Undelete (reactivate) a user template
|
88 |
-
* @param int $template_id
|
89 |
-
* @return associative_array with a single entry:
|
90 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
91 |
-
*/
|
92 |
-
public function undel($template_id) {
|
93 |
-
$_params = array("template_id" => $template_id);
|
94 |
-
return $this->master->call('templates/undel', $_params);
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Replace the content of a user template, <strong>NOT</strong> campaign content.
|
99 |
-
* @param int $template_id
|
100 |
-
* @param associative_array $values
|
101 |
-
* - name string the name for the template - names must be unique and a max of 50 bytes
|
102 |
-
* - html string a string specifying the entire template to be created. This is <strong>NOT</strong> campaign content. They are intended to utilize our <a href="http://www.mailchimp.com/resources/email-template-language/" target="_blank">template language</a>.
|
103 |
-
* - folder_id int the folder to put this template in - 0 or a blank values will remove it from a folder.
|
104 |
-
* @return associative_array with a single entry:
|
105 |
-
* - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
|
106 |
-
*/
|
107 |
-
public function update($template_id, $values) {
|
108 |
-
$_params = array("template_id" => $template_id, "values" => $values);
|
109 |
-
return $this->master->call('templates/update', $_params);
|
110 |
-
}
|
111 |
-
|
112 |
-
}
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Users.php
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Users {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Invite a user to your account
|
10 |
-
* @param string $email
|
11 |
-
* @param string $role
|
12 |
-
* @param string $msg
|
13 |
-
* @return associative_array the method completion status
|
14 |
-
* - status string The status (success) of the call if it completed. Otherwise an error is thrown.
|
15 |
-
*/
|
16 |
-
public function invite($email, $role='viewer', $msg='') {
|
17 |
-
$_params = array("email" => $email, "role" => $role, "msg" => $msg);
|
18 |
-
return $this->master->call('users/invite', $_params);
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Resend an invite a user to your account. Note, if the same address has been invited multiple times, this will simpy re-send the most recent invite
|
23 |
-
* @param string $email
|
24 |
-
* @return associative_array the method completion status
|
25 |
-
* - status string The status (success) of the call if it completed. Otherwise an error is thrown.
|
26 |
-
*/
|
27 |
-
public function inviteResend($email) {
|
28 |
-
$_params = array("email" => $email);
|
29 |
-
return $this->master->call('users/invite-resend', $_params);
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Revoke an invitation sent to a user to your account. Note, if the same address has been invited multiple times, this will simpy revoke the most recent invite
|
34 |
-
* @param string $email
|
35 |
-
* @return associative_array the method completion status
|
36 |
-
* - status string The status (success) of the call if it completed. Otherwise an error is thrown.
|
37 |
-
*/
|
38 |
-
public function inviteRevoke($email) {
|
39 |
-
$_params = array("email" => $email);
|
40 |
-
return $this->master->call('users/invite-revoke', $_params);
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Retrieve the list of pending users invitations have been sent for.
|
45 |
-
* @return array structs for each invitation, including:
|
46 |
-
* - email string the email address the invitation was sent to
|
47 |
-
* - role string the role that will be assigned if they accept
|
48 |
-
* - sent_at string the time the invitation was sent. this will change if it's resent.
|
49 |
-
* - expiration string the expiration time for the invitation. this will change if it's resent.
|
50 |
-
* - msg string the welcome message included with the invitation
|
51 |
-
*/
|
52 |
-
public function invites() {
|
53 |
-
$_params = array();
|
54 |
-
return $this->master->call('users/invites', $_params);
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Revoke access for a specified login
|
59 |
-
* @param string $username
|
60 |
-
* @return associative_array the method completion status
|
61 |
-
* - status string The status (success) of the call if it completed. Otherwise an error is thrown.
|
62 |
-
*/
|
63 |
-
public function loginRevoke($username) {
|
64 |
-
$_params = array("username" => $username);
|
65 |
-
return $this->master->call('users/login-revoke', $_params);
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Retrieve the list of active logins.
|
70 |
-
* @return array structs for each user, including:
|
71 |
-
* - id int the login id for this login
|
72 |
-
* - username string the username used to log in
|
73 |
-
* - name string a display name for the account - empty first/last names will return the username
|
74 |
-
* - email string the email tied to the account used for passwords resets and the ilk
|
75 |
-
* - role string the role assigned to the account
|
76 |
-
* - avatar string if available, the url for the login's avatar
|
77 |
-
* - global_user_id int the globally unique user id for the user account connected to
|
78 |
-
* - dc_unique_id string the datacenter unique id for the user account connected to, like helper/account-details
|
79 |
-
*/
|
80 |
-
public function logins() {
|
81 |
-
$_params = array();
|
82 |
-
return $this->master->call('users/logins', $_params);
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Retrieve the profile for the login owning the provided API Key
|
87 |
-
* @return associative_array the current user's details, including:
|
88 |
-
* - id int the login id for this login
|
89 |
-
* - username string the username used to log in
|
90 |
-
* - name string a display name for the account - empty first/last names will return the username
|
91 |
-
* - email string the email tied to the account used for passwords resets and the ilk
|
92 |
-
* - role string the role assigned to the account
|
93 |
-
* - avatar string if available, the url for the login's avatar
|
94 |
-
* - global_user_id int the globally unique user id for the user account connected to
|
95 |
-
* - dc_unique_id string the datacenter unique id for the user account connected to, like helper/account-details
|
96 |
-
* - account_name string The name of the account to which the API key belongs
|
97 |
-
*/
|
98 |
-
public function profile() {
|
99 |
-
$_params = array();
|
100 |
-
return $this->master->call('users/profile', $_params);
|
101 |
-
}
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailchimp/Vip.php
DELETED
@@ -1,111 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mailchimp_Vip {
|
4 |
-
public function __construct(Mailchimp $master) {
|
5 |
-
$this->master = $master;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Retrieve all Activity (opens/clicks) for VIPs over the past 10 days
|
10 |
-
* @return array structs for each activity recorded.
|
11 |
-
* - action string The action taken - either "open" or "click"
|
12 |
-
* - timestamp string The datetime the action occurred in GMT
|
13 |
-
* - url string IF the action is a click, the url that was clicked
|
14 |
-
* - unique_id string The campaign_id of the List the Member appears on
|
15 |
-
* - title string The campaign title
|
16 |
-
* - list_name string The name of the List the Member appears on
|
17 |
-
* - list_id string The id of the List the Member appears on
|
18 |
-
* - email string The email address of the member
|
19 |
-
* - fname string IF a FNAME merge field exists on the list, that value for the member
|
20 |
-
* - lname string IF a LNAME merge field exists on the list, that value for the member
|
21 |
-
* - member_rating int the rating of the subscriber. This will be 1 - 5 as described <a href="http://eepurl.com/f-2P" target="_blank">here</a>
|
22 |
-
* - member_since string the datetime the member was added and/or confirmed
|
23 |
-
* - geo associative_array the geographic information if we have it. including:
|
24 |
-
* - latitude string the latitude
|
25 |
-
* - longitude string the longitude
|
26 |
-
* - gmtoff string GMT offset
|
27 |
-
* - dstoff string GMT offset during daylight savings (if DST not observered, will be same as gmtoff
|
28 |
-
* - timezone string the timezone we've place them in
|
29 |
-
* - cc string 2 digit ISO-3166 country code
|
30 |
-
* - region string generally state, province, or similar
|
31 |
-
*/
|
32 |
-
public function activity() {
|
33 |
-
$_params = array();
|
34 |
-
return $this->master->call('vip/activity', $_params);
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Add VIPs (previously called Golden Monkeys)
|
39 |
-
* @param string $id
|
40 |
-
* @param array $emails
|
41 |
-
* - email string an email address - for new subscribers obviously this should be used
|
42 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
43 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
44 |
-
* @return associative_array of data and success/error counts
|
45 |
-
* - success_count int the number of successful adds
|
46 |
-
* - error_count int the number of unsuccessful adds
|
47 |
-
* - errors array array of error structs including:
|
48 |
-
* - email associative_array whatever was passed in the email parameter
|
49 |
-
* - email string the email address added
|
50 |
-
* - euid string the email unique id
|
51 |
-
* - leid string the list member's truly unique id
|
52 |
-
* - code string the error code
|
53 |
-
* - error string the error message
|
54 |
-
* - data array array of structs for each member added
|
55 |
-
* - email associative_array whatever was passed in the email parameter
|
56 |
-
* - email string the email address added
|
57 |
-
* - euid string the email unique id
|
58 |
-
* - leid string the list member's truly unique id
|
59 |
-
*/
|
60 |
-
public function add($id, $emails) {
|
61 |
-
$_params = array("id" => $id, "emails" => $emails);
|
62 |
-
return $this->master->call('vip/add', $_params);
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Remove VIPs - this does not affect list membership
|
67 |
-
* @param string $id
|
68 |
-
* @param array $emails
|
69 |
-
* - email string an email address - for new subscribers obviously this should be used
|
70 |
-
* - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc.
|
71 |
-
* - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes
|
72 |
-
* @return associative_array of data and success/error counts
|
73 |
-
* - success_count int the number of successful deletions
|
74 |
-
* - error_count int the number of unsuccessful deletions
|
75 |
-
* - errors array array of error structs including:
|
76 |
-
* - email associative_array whatever was passed in the email parameter
|
77 |
-
* - email string the email address
|
78 |
-
* - euid string the email unique id
|
79 |
-
* - leid string the list member's truly unique id
|
80 |
-
* - code string the error code
|
81 |
-
* - msg string the error message
|
82 |
-
* - data array array of structs for each member deleted
|
83 |
-
* - email associative_array whatever was passed in the email parameter
|
84 |
-
* - email string the email address
|
85 |
-
* - euid string the email unique id
|
86 |
-
* - leid string the list member's truly unique id
|
87 |
-
*/
|
88 |
-
public function del($id, $emails) {
|
89 |
-
$_params = array("id" => $id, "emails" => $emails);
|
90 |
-
return $this->master->call('vip/del', $_params);
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Retrieve all Golden Monkey(s) for an account
|
95 |
-
* @return array structs for each Golden Monkey, including:
|
96 |
-
* - list_id string The id of the List the Member appears on
|
97 |
-
* - list_name string The name of the List the Member appears on
|
98 |
-
* - email string The email address of the member
|
99 |
-
* - fname string IF a FNAME merge field exists on the list, that value for the member
|
100 |
-
* - lname string IF a LNAME merge field exists on the list, that value for the member
|
101 |
-
* - member_rating int the rating of the subscriber. This will be 1 - 5 as described <a href="http://eepurl.com/f-2P" target="_blank">here</a>
|
102 |
-
* - member_since string the datetime the member was added and/or confirmed
|
103 |
-
*/
|
104 |
-
public function members() {
|
105 |
-
$_params = array();
|
106 |
-
return $this->master->call('vip/members', $_params);
|
107 |
-
}
|
108 |
-
|
109 |
-
}
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/wp-subscribe-admin.css
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Plugin Name: WP Subscribe
|
3 |
-
Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
|
4 |
-
Author: MyThemeShop
|
5 |
-
Author URI: http://mythemeshop.com
|
6 |
-
*/
|
7 |
-
.wp_subscribe_options_form label { vertical-align: top }
|
8 |
-
.wp_subscribe_colors, .wp_subscribe_labels { }
|
9 |
-
.wp_subscribe_options_form .wp-picker-container { position: absolute; right: 0; }
|
10 |
-
.wp_subscribe_colors > div { position: relative; margin: 20px 0; }
|
11 |
-
.wp_subscribe_colors label { display: inline-block; margin-top: 2px; }
|
12 |
-
.wp_subscribe_options_form .wp-picker-container > a { margin-right: 0 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/wp-subscribe.css
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Plugin Name: WP Subscribe
|
3 |
-
Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
|
4 |
-
Author: MyThemeShop
|
5 |
-
Author URI: http://mythemeshop.com
|
6 |
-
*/
|
7 |
-
#wp-subscribe { padding: 26px; background: #f47555; }
|
8 |
-
#wp-subscribe h4.title { font-size: 22px; color: #FFFFFF; line-height: 1; text-align: center; text-transform: uppercase; margin-bottom: 0; }
|
9 |
-
#wp-subscribe h4.title span { display: inline-block; font-weight: bold; font-size: 38px; margin-top: 15px; }
|
10 |
-
#wp-subscribe p { color: #FFFFFF; margin: 0; text-align: center; }
|
11 |
-
#wp-subscribe p.text { margin: 15px 0; opacity: 0.8; }
|
12 |
-
#wp-subscribe input { border: none; width: 100%; text-align: center; box-sizing: border-box; padding: 10px 0; margin: 0; box-shadow: none; border-radius: 0; height: 45px; }
|
13 |
-
#wp-subscribe .email-field { margin-top: 10px }
|
14 |
-
#wp-subscribe input.email-field, #wp-subscribe input.name-field { color: #FFFFFF; background: #d56144; }
|
15 |
-
#wp-subscribe input::-webkit-input-placeholder { color: inherit; opacity: 0.8; }
|
16 |
-
#wp-subscribe input:-moz-input-placeholder { color: inherit; opacity: 0.8; }
|
17 |
-
#wp-subscribe input::-moz-input-placeholder { color: inherit; opacity: 0.8; }
|
18 |
-
#wp-subscribe input::-ms-input-placeholder { color: inherit; opacity: 0.8; }
|
19 |
-
#wp-subscribe input:focus::-webkit-input-placeholder { color: transparent !important }
|
20 |
-
#wp-subscribe input:focus::-moz-input-placeholder { color: transparent !important }
|
21 |
-
#wp-subscribe input:focus:-moz-input-placeholder { color: transparent !important }
|
22 |
-
#wp-subscribe input:focus::input-placeholder { color: transparent !important }
|
23 |
-
#wp-subscribe input.submit { background: #FFFFFF; color: #f47555; margin-top: 20px; font-size: 18px; text-transform: uppercase; font-weight: 500; box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05); cursor: pointer; }
|
24 |
-
#wp-subscribe p.footer-text { margin-top: 10px; font-size: 12px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/wp-subscribe-admin.js
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Plugin Name: WP Subscribe
|
3 |
-
Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
|
4 |
-
Author: MyThemeShop
|
5 |
-
Author URI: http://mythemeshop.com
|
6 |
-
*/
|
7 |
-
( function( $ ){
|
8 |
-
|
9 |
-
// color picker
|
10 |
-
function initColorPicker( widget ) {
|
11 |
-
// and services dropdown
|
12 |
-
widget.find('.wp-subscribe-service-field select').change(function(event) {
|
13 |
-
var $this = $(this);
|
14 |
-
widget.find('.wp_subscribe_account_details_'+$this.val()).show().siblings('div').hide();
|
15 |
-
widget.find('.wp_subscribe_account_details').slideDown();
|
16 |
-
}).trigger('change');
|
17 |
-
}
|
18 |
-
|
19 |
-
function onFormUpdate( event, widget ) {
|
20 |
-
initColorPicker( widget );
|
21 |
-
}
|
22 |
-
|
23 |
-
$( document ).on( 'widget-added widget-updated', onFormUpdate );
|
24 |
-
|
25 |
-
$( document ).ready( function() {
|
26 |
-
$( '#widgets-right .widget:has(.wp-subscribe-service-field select)' ).each( function () {
|
27 |
-
initColorPicker( $( this ) );
|
28 |
-
});
|
29 |
-
} );
|
30 |
-
|
31 |
-
// slideToggle
|
32 |
-
$(document).on('click', function(e) {
|
33 |
-
var $this = jQuery(e.target);
|
34 |
-
var $widget = $this.closest('.wp_subscribe_options_form');
|
35 |
-
if ($widget.length) {
|
36 |
-
if ($this.is('.wp-subscribe-toggle')) {
|
37 |
-
e.preventDefault();
|
38 |
-
var $related = $widget.find('.'+$this.attr('rel'));
|
39 |
-
$related.slideToggle();
|
40 |
-
}
|
41 |
-
}
|
42 |
-
});
|
43 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mythemeshop
|
|
3 |
Creator's website link: http://mythemeshop.com/plugins/wp-subscribe/
|
4 |
Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -82,6 +82,9 @@ Please disable all plugins and check if plugin is working properly. Then you can
|
|
82 |
|
83 |
== Changelog ==
|
84 |
|
|
|
|
|
|
|
85 |
= 1.2.4 =
|
86 |
* Fixed aweber issues
|
87 |
|
3 |
Creator's website link: http://mythemeshop.com/plugins/wp-subscribe/
|
4 |
Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.9.1
|
7 |
+
Stable tag: 1.2.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
82 |
|
83 |
== Changelog ==
|
84 |
|
85 |
+
= 1.2.5 =
|
86 |
+
* Fixed aweber list issue
|
87 |
+
|
88 |
= 1.2.4 =
|
89 |
* Fixed aweber issues
|
90 |
|
wp-subscribe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP Subscribe
|
4 |
* Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
|
5 |
* Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
|
6 |
-
* Version: 1.2.
|
7 |
* Author: MyThemeShop
|
8 |
* Author URI: http://mythemeshop.com/
|
9 |
* Text Domain: wp-subscribe
|
@@ -27,7 +27,7 @@ if( ! class_exists('MTS_WP_Subscribe') ) :
|
|
27 |
* Plugin Version
|
28 |
* @var string
|
29 |
*/
|
30 |
-
private $version = '1.2.
|
31 |
|
32 |
/**
|
33 |
* Hold an instance of MTS_WP_Subscribe class
|
@@ -262,6 +262,7 @@ if( ! class_exists('MTS_WP_Subscribe') ) :
|
|
262 |
}
|
263 |
|
264 |
try {
|
|
|
265 |
$lists = call_user_func_array( array( $service, 'get_lists' ), $args );
|
266 |
}
|
267 |
catch( Exception $e ) {
|
3 |
* Plugin Name: WP Subscribe
|
4 |
* Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
|
5 |
* Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
|
6 |
+
* Version: 1.2.5
|
7 |
* Author: MyThemeShop
|
8 |
* Author URI: http://mythemeshop.com/
|
9 |
* Text Domain: wp-subscribe
|
27 |
* Plugin Version
|
28 |
* @var string
|
29 |
*/
|
30 |
+
private $version = '1.2.5';
|
31 |
|
32 |
/**
|
33 |
* Hold an instance of MTS_WP_Subscribe class
|
262 |
}
|
263 |
|
264 |
try {
|
265 |
+
$args['raw'] = $args;
|
266 |
$lists = call_user_func_array( array( $service, 'get_lists' ), $args );
|
267 |
}
|
268 |
catch( Exception $e ) {
|