From 2c99f1a2f0ec5308eb3f21c7bdeebeda67956373 Mon Sep 17 00:00:00 2001 From: surzm Date: Thu, 16 Jul 2020 14:58:09 +0300 Subject: [PATCH 1/2] add method for getting templates from account --- src/ApiClient.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ApiClient.php b/src/ApiClient.php index 9d5681b..3fd65f9 100755 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -1605,4 +1605,16 @@ public function deleteSmsCampaign($campaignID) return $this->handleResult($requestResult); } + + /** + * Get list of account's templates + * + * @return stdClass + */ + public function getTemplates() + { + $requestResult = $this->sendRequest('/templates', 'GET'); + + return $this->handleResult($requestResult); + } } \ No newline at end of file From eb33933664654907cce0f674ddeca2bb72d1ea7e Mon Sep 17 00:00:00 2001 From: surzm Date: Thu, 16 Jul 2020 16:16:59 +0300 Subject: [PATCH 2/2] only owners templates --- src/ApiClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ApiClient.php b/src/ApiClient.php index 3fd65f9..00abcbd 100755 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -1611,9 +1611,9 @@ public function deleteSmsCampaign($campaignID) * * @return stdClass */ - public function getTemplates() + public function getMyTemplates() { - $requestResult = $this->sendRequest('/templates', 'GET'); + $requestResult = $this->sendRequest('templates?owner=me', 'GET'); return $this->handleResult($requestResult); }