Mailchimp_Vip

The Mailchimp Subscription Form Mailchimp Vip class.

Defined (1)

The class is defined in the following location(s).

/classes/mailchimp/Mailchimp/Vip.php  
  1. class Mailchimp_Vip { 
  2. public function __construct(NM_Mailchimp $master) { 
  3. $this->master = $master; 
  4.  
  5. /** 
  6. * Retrieve all Activity (opens/clicks) for VIPs over the past 10 days 
  7. * @return array structs for each activity recorded. 
  8. * - action string The action taken - either "open" or "click" 
  9. * - timestamp string The datetime the action occurred in GMT 
  10. * - url string IF the action is a click, the url that was clicked 
  11. * - unique_id string The campaign_id of the List the Member appears on 
  12. * - title string The campaign title 
  13. * - list_name string The name of the List the Member appears on 
  14. * - list_id string The id of the List the Member appears on 
  15. * - email string The email address of the member 
  16. * - fname string IF a FNAME merge field exists on the list, that value for the member 
  17. * - lname string IF a LNAME merge field exists on the list, that value for the member 
  18. * - 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> 
  19. * - member_since string the datetime the member was added and/or confirmed 
  20. * - geo associative_array the geographic information if we have it. including: 
  21. * - latitude string the latitude 
  22. * - longitude string the longitude 
  23. * - gmtoff string GMT offset 
  24. * - dstoff string GMT offset during daylight savings (if DST not observered, will be same as gmtoff 
  25. * - timezone string the timezone we've place them in 
  26. * - cc string 2 digit ISO-3166 country code 
  27. * - region string generally state, province, or similar 
  28. */ 
  29. public function activity() { 
  30. $_params = array(); 
  31. return $this->master->call('vip/activity', $_params); 
  32.  
  33. /** 
  34. * Add VIPs (previously called Golden Monkeys) 
  35. * @param string $id 
  36. * @param array $emails 
  37. * - email string an email address - for new subscribers obviously this should be used 
  38. * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. 
  39. * - 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 
  40. * @return associative_array of data and success/error counts 
  41. * - success_count int the number of successful adds 
  42. * - error_count int the number of unsuccessful adds 
  43. * - errors array array of error structs including: 
  44. * - email associative_array whatever was passed in the email parameter 
  45. * - email string the email address added 
  46. * - euid string the email unique id 
  47. * - leid string the list member's truly unique id 
  48. * - code string the error code 
  49. * - error string the error message 
  50. * - data array array of structs for each member added 
  51. * - email associative_array whatever was passed in the email parameter 
  52. * - email string the email address added 
  53. * - euid string the email unique id 
  54. * - leid string the list member's truly unique id 
  55. */ 
  56. public function add($id, $emails) { 
  57. $_params = array("id" => $id, "emails" => $emails); 
  58. return $this->master->call('vip/add', $_params); 
  59.  
  60. /** 
  61. * Remove VIPs - this does not affect list membership 
  62. * @param string $id 
  63. * @param array $emails 
  64. * - email string an email address - for new subscribers obviously this should be used 
  65. * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. 
  66. * - 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 
  67. * @return associative_array of data and success/error counts 
  68. * - success_count int the number of successful deletions 
  69. * - error_count int the number of unsuccessful deletions 
  70. * - errors array array of error structs including: 
  71. * - email associative_array whatever was passed in the email parameter 
  72. * - email string the email address 
  73. * - euid string the email unique id 
  74. * - leid string the list member's truly unique id 
  75. * - code string the error code 
  76. * - msg string the error message 
  77. * - data array array of structs for each member deleted 
  78. * - email associative_array whatever was passed in the email parameter 
  79. * - email string the email address 
  80. * - euid string the email unique id 
  81. * - leid string the list member's truly unique id 
  82. */ 
  83. public function del($id, $emails) { 
  84. $_params = array("id" => $id, "emails" => $emails); 
  85. return $this->master->call('vip/del', $_params); 
  86.  
  87. /** 
  88. * Retrieve all Golden Monkey(s) for an account 
  89. * @return array structs for each Golden Monkey, including: 
  90. * - list_id string The id of the List the Member appears on 
  91. * - list_name string The name of the List the Member appears on 
  92. * - email string The email address of the member 
  93. * - fname string IF a FNAME merge field exists on the list, that value for the member 
  94. * - lname string IF a LNAME merge field exists on the list, that value for the member 
  95. * - 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> 
  96. * - member_since string the datetime the member was added and/or confirmed 
  97. */ 
  98. public function members() { 
  99. $_params = array(); 
  100. return $this->master->call('vip/members', $_params); 
  101.