From efdc8b7e23acba4718d516360a90fabdc1f9aeb0 Mon Sep 17 00:00:00 2001 From: mticciati Date: Fri, 21 Sep 2018 11:32:28 -0700 Subject: [PATCH 1/3] update fetch_subscribers to accept params --- src/Client.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index f48ba2a..28a5cde 100644 --- a/src/Client.php +++ b/src/Client.php @@ -173,12 +173,14 @@ public function fetch_subscriber($params) /** * Returns a list of subscribers * + * @param array $params Set of arguments + * - optional * @return \Drip\ResponseInterface */ - public function fetch_subscribers() + public function fetch_subscribers($params=null) { - return $this->make_request("$this->account_id/subscribers"); + return $this->make_request("$this->account_id/subscribers", $params); } /** From 0c2fe7a2907b5572590f0fc7fe9fa9b3b5ebb293 Mon Sep 17 00:00:00 2001 From: mticciati Date: Mon, 24 Sep 2018 13:19:05 -0700 Subject: [PATCH 2/3] sf --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 28a5cde..739f43c 100644 --- a/src/Client.php +++ b/src/Client.php @@ -177,7 +177,7 @@ public function fetch_subscriber($params) * - optional * @return \Drip\ResponseInterface */ - public function fetch_subscribers($params=null) + public function fetch_subscribers($params = null) { return $this->make_request("$this->account_id/subscribers", $params); From 3d01becab570e0ffe955971a88a872fa7466a50c Mon Sep 17 00:00:00 2001 From: mticciati Date: Tue, 6 Nov 2018 14:08:52 -0800 Subject: [PATCH 3/3] batch unsubscribe - todo pr --- src/Client.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Client.php b/src/Client.php index 739f43c..800eb4a 100644 --- a/src/Client.php +++ b/src/Client.php @@ -233,6 +233,21 @@ public function unsubscribe_subscriber($params) return $this->make_request("$this->account_id/subscribers/$subscriber_id/unsubscribe", $params, self::POST); } + /** + * Sends a request to add/update a batch (up to 1000) of subscribers + * + * @param array $params + * @return \Drip\ResponseInterface + */ + public function unsubscribe_subscribers($params) + { + return $this->make_request( + "$this->account_id/unsubscribes/batches", + $params, + self::POST + ); + } + /** * * This calls POST /:account_id/tags to add the tag. It just returns some status code no content