| @@ 660-676 (lines=17) @@ | ||
| 657 | * ) |
|
| 658 | * } |
|
| 659 | */ |
|
| 660 | public function getActiveSubscribers($listID, $daysAgo = 3650, $page = 1, $pageSize = 999, $sortByField = "DATE", $sortDirection = "DESC") |
|
| 661 | { |
|
| 662 | //require_once '../../csrest_lists.php'; |
|
| 663 | $wrap = new CS_REST_Lists($listID, $this->getAuth()); |
|
| 664 | $result = $wrap->get_active_subscribers( |
|
| 665 | date('Y-m-d', strtotime('-'.$daysAgo.' days')), |
|
| 666 | $page, |
|
| 667 | $pageSize, |
|
| 668 | $sortByField, |
|
| 669 | $sortDirection |
|
| 670 | ); |
|
| 671 | return $this->returnResult( |
|
| 672 | $result, |
|
| 673 | "GET /api/v3.1/lists/{ID}/active", |
|
| 674 | "Got active subscribers" |
|
| 675 | ); |
|
| 676 | } |
|
| 677 | ||
| 678 | /** |
|
| 679 | * Gets all unconfirmed subscribers added since the given date |
|
| @@ 713-729 (lines=17) @@ | ||
| 710 | * ) |
|
| 711 | * } |
|
| 712 | */ |
|
| 713 | public function getUnconfirmedSubscribers($listID, $daysAgo = 3650, $page = 1, $pageSize = 999, $sortByField = "DATE", $sortDirection = "DESC") |
|
| 714 | { |
|
| 715 | //require_once '../../csrest_lists.php'; |
|
| 716 | $wrap = new CS_REST_Lists($listID, $this->getAuth()); |
|
| 717 | $result = $wrap->get_unconfirmed_subscribers( |
|
| 718 | date('Y-m-d', strtotime('-'.$daysAgo.' days')), |
|
| 719 | $page, |
|
| 720 | $pageSize, |
|
| 721 | $sortByField, |
|
| 722 | $sortDirection |
|
| 723 | ); |
|
| 724 | return $this->returnResult( |
|
| 725 | $result, |
|
| 726 | "GET /api/v3.1/lists/{ID}/unconfirmed", |
|
| 727 | "Got unconfimred subscribers" |
|
| 728 | ); |
|
| 729 | } |
|
| 730 | ||
| 731 | /** |
|
| 732 | * Gets all bounced subscribers who have bounced out since the given date |
|
| @@ 766-782 (lines=17) @@ | ||
| 763 | * ) |
|
| 764 | * } |
|
| 765 | */ |
|
| 766 | public function getBouncedSubscribers($listID, $daysAgo = 3650, $page = 1, $pageSize = 999, $sortByField = "DATE", $sortDirection = "DESC") |
|
| 767 | { |
|
| 768 | //require_once '../../csrest_lists.php'; |
|
| 769 | $wrap = new CS_REST_Lists($listID, $this->getAuth()); |
|
| 770 | $result = $wrap->get_bounced_subscribers( |
|
| 771 | date('Y-m-d', strtotime('-'.$daysAgo.' days')), |
|
| 772 | $page, |
|
| 773 | $pageSize, |
|
| 774 | $sortByField, |
|
| 775 | $sortDirection |
|
| 776 | ); |
|
| 777 | return $this->returnResult( |
|
| 778 | $result, |
|
| 779 | "GET /api/v3.1/lists/{ID}/bounced", |
|
| 780 | "Got bounced subscribers" |
|
| 781 | ); |
|
| 782 | } |
|
| 783 | ||
| 784 | ||
| 785 | /** |
|
| @@ 820-836 (lines=17) @@ | ||
| 817 | * ) |
|
| 818 | * } |
|
| 819 | */ |
|
| 820 | public function getUnsubscribedSubscribers($listID, $daysAgo = 3650, $page = 1, $pageSize = 999, $sortByField = "DATE", $sortDirection = "DESC") |
|
| 821 | { |
|
| 822 | //require_once '../../csrest_lists.php'; |
|
| 823 | $wrap = new CS_REST_Lists($listID, $this->getAuth()); |
|
| 824 | $result = $wrap->get_unsubscribed_subscribers( |
|
| 825 | date('Y-m-d', strtotime('-'.$daysAgo.' days')), |
|
| 826 | $page, |
|
| 827 | $pageSize, |
|
| 828 | $sortByField, |
|
| 829 | $sortDirection |
|
| 830 | ); |
|
| 831 | return $this->returnResult( |
|
| 832 | $result, |
|
| 833 | "GET /api/v3.1/lists/{ID}/unsubscribed", |
|
| 834 | "Got unsubscribed subscribers" |
|
| 835 | ); |
|
| 836 | } |
|
| 837 | ||
| 838 | /** |
|
| 839 | * Gets all unsubscribed subscribers who have unsubscribed since the given date |
|
| @@ 873-889 (lines=17) @@ | ||
| 870 | * ) |
|
| 871 | * } |
|
| 872 | */ |
|
| 873 | public function getDeletedSubscribers($listID, $daysAgo = 3650, $page = 1, $pageSize = 999, $sortByField = "email", $sortDirection = "asc") |
|
| 874 | { |
|
| 875 | //require_once '../../csrest_lists.php'; |
|
| 876 | $wrap = new CS_REST_Lists($listID, $this->getAuth()); |
|
| 877 | $result = $wrap->get_deleted_subscribers( |
|
| 878 | date('Y-m-d', strtotime('-'.$daysAgo.' days')), |
|
| 879 | $page, |
|
| 880 | $pageSize, |
|
| 881 | $sortByField, |
|
| 882 | $sortDirection |
|
| 883 | ); |
|
| 884 | return $this->returnResult( |
|
| 885 | $result, |
|
| 886 | "GET /api/v3/lists/{ID}/delete", |
|
| 887 | "Got deleted subscribers" |
|
| 888 | ); |
|
| 889 | } |
|
| 890 | ||
| 891 | /** |
|
| 892 | * Updates the details of an existing list |
|
| @@ 1236-1252 (lines=17) @@ | ||
| 1233 | * ) |
|
| 1234 | * } |
|
| 1235 | */ |
|
| 1236 | public function getUnsubscribes($campaignID, $daysAgo = 3650, $page =1, $pageSize = 999, $sortByField = "EMAIL", $sortDirection = "ASC") |
|
| 1237 | { |
|
| 1238 | //require_once '../../csrest_campaigns.php'; |
|
| 1239 | $wrap = new CS_REST_Campaigns($campaignID, $this->getAuth()); |
|
| 1240 | $result = $wrap->get_unsubscribes( |
|
| 1241 | date('Y-m-d', strtotime('-'.$daysAgo.' days')), |
|
| 1242 | $page, |
|
| 1243 | $pageSize, |
|
| 1244 | $sortByField, |
|
| 1245 | $sortDirection |
|
| 1246 | ); |
|
| 1247 | return $this->returnResult( |
|
| 1248 | $result, |
|
| 1249 | "GET /api/v3.1/campaigns/{id}/unsubscribes", |
|
| 1250 | "Got unsubscribes" |
|
| 1251 | ); |
|
| 1252 | } |
|
| 1253 | ||
| 1254 | ||
| 1255 | ||