@@ 1501-1513 (lines=13) @@ | ||
1498 | * |
|
1499 | * @return CS_REST_Wrapper_Result A successful response will be empty |
|
1500 | */ |
|
1501 | public function deleteSubscriber($listID, $member) |
|
1502 | { |
|
1503 | if ($member instanceof Member) { |
|
1504 | $member = $member->Email; |
|
1505 | } |
|
1506 | $wrap = new CS_REST_Subscribers($listID, $this->getAuth()); |
|
1507 | $result = $wrap->delete($member); |
|
1508 | return $this->returnResult( |
|
1509 | $result, |
|
1510 | "DELETE /api/v3.1/subscribers/{list id}.{format}?email={emailAddress}", |
|
1511 | "Unsubscribed with code ..." |
|
1512 | ); |
|
1513 | } |
|
1514 | ||
1515 | /** |
|
1516 | * Unsubscribes the given subscriber from the current list |
|
@@ 1523-1535 (lines=13) @@ | ||
1520 | * |
|
1521 | * @return CS_REST_Wrapper_Result A successful response will be empty |
|
1522 | */ |
|
1523 | public function unsubscribeSubscriber($listID, $member) |
|
1524 | { |
|
1525 | if ($member instanceof Member) { |
|
1526 | $member = $member->Email; |
|
1527 | } |
|
1528 | $wrap = new CS_REST_Subscribers($listID, $this->getAuth()); |
|
1529 | $result = $wrap->unsubscribe($member); |
|
1530 | return $this->returnResult( |
|
1531 | $result, |
|
1532 | "GET /api/v3.1/subscribers/{list id}/unsubscribe.{format}", |
|
1533 | "Unsubscribed with code ..." |
|
1534 | ); |
|
1535 | } |
|
1536 | ||
1537 | /** |
|
1538 | * Is this user part of this list at all? |
|
@@ 1681-1693 (lines=13) @@ | ||
1678 | * } |
|
1679 | * |
|
1680 | */ |
|
1681 | public function getHistory($listID, $member) |
|
1682 | { |
|
1683 | if ($member instanceof Member) { |
|
1684 | $member = $member->Email; |
|
1685 | } |
|
1686 | $wrap = new CS_REST_Subscribers($listID, $this->getAuth()); |
|
1687 | $result = $wrap->get_history($member); |
|
1688 | return $this->returnResult( |
|
1689 | $result, |
|
1690 | "GET /api/v3.1/subscribers/{list id}/history.{format}?email={email}", |
|
1691 | "got subscriber history" |
|
1692 | ); |
|
1693 | } |
|
1694 | } |
|
1695 |