| @@ 113-121 (lines=9) @@ | ||
| 110 | * @param int $contactId ID of contact to add to list |
|
| 111 | * @param int $listId ID of list to add contact to |
|
| 112 | */ |
|
| 113 | public function subscribe($contactId, $listId) |
|
| 114 | { |
|
| 115 | $this->post('contactLists', ['json' => [ |
|
| 116 | 'contactList' => [ |
|
| 117 | 'list' => $listId, |
|
| 118 | 'contact' => $contactId, |
|
| 119 | 'status' => 1, |
|
| 120 | ]]]); |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * Remove contact from the list |
|
| @@ 129-137 (lines=9) @@ | ||
| 126 | * @param int $contactId ID of contact to remove from list |
|
| 127 | * @param int $listId ID of list to remove contact from |
|
| 128 | */ |
|
| 129 | public function unsubscribe($contactId, $listId) |
|
| 130 | { |
|
| 131 | $this->post('contactLists', ['json' => [ |
|
| 132 | 'contactList' => [ |
|
| 133 | 'list' => $listId, |
|
| 134 | 'contact' => $contactId, |
|
| 135 | 'status' => 2, |
|
| 136 | ]]]); |
|
| 137 | } |
|
| 138 | ||
| 139 | /** |
|
| 140 | * Get all contacts related to the list. |
|