From c2e9810547f1a0ff76c5e020a63932593137c2d8 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Thu, 26 Sep 2019 13:29:22 +0530 Subject: [PATCH 01/19] Token service should use token from trello class itself --- geekyants/trelloservice/src/Services/TokenService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/TokenService.php b/geekyants/trelloservice/src/Services/TokenService.php index 267ea81..8fa981f 100644 --- a/geekyants/trelloservice/src/Services/TokenService.php +++ b/geekyants/trelloservice/src/Services/TokenService.php @@ -7,10 +7,14 @@ class TokenService extends Trello { - function __construct($value) + function __construct($value = null) { parent::__construct(); $this->id = $value; + if ($this->id == null) { + $this->id = $this->keyToken["token"]; + } + $this->utils = new Utils(); } From 98cc70487aa911b58b82b31305c4c1adb73b61d0 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Wed, 2 Oct 2019 18:52:16 +0530 Subject: [PATCH 02/19] Corrected path for addMemberByEmail --- geekyants/trelloservice/src/Services/BoardService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/BoardService.php b/geekyants/trelloservice/src/Services/BoardService.php index 28d8413..9d0f894 100644 --- a/geekyants/trelloservice/src/Services/BoardService.php +++ b/geekyants/trelloservice/src/Services/BoardService.php @@ -258,7 +258,7 @@ function update($queryParams = []) return $this->verifyIdThenSendRequest($requestOptions); } - function addMemberByEmail($queryParams, $headers, $bodyParams) + function addMemberByEmail($queryParams, $headers, $bodyParams = []) { $requestOptions = [ "id" => $this->id, @@ -266,6 +266,7 @@ function addMemberByEmail($queryParams, $headers, $bodyParams) "path" => [ "boards", $this->id, + "members ], "queryParams" => $queryParams, "headers" => $headers, From 67936ffa2dd4f185cf3d85dd92fc75bf2267c485 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Thu, 3 Oct 2019 16:33:53 +0530 Subject: [PATCH 03/19] Huge quote error fixed --- geekyants/trelloservice/src/Services/BoardService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/BoardService.php b/geekyants/trelloservice/src/Services/BoardService.php index 9d0f894..f9b87fe 100644 --- a/geekyants/trelloservice/src/Services/BoardService.php +++ b/geekyants/trelloservice/src/Services/BoardService.php @@ -266,7 +266,7 @@ function addMemberByEmail($queryParams, $headers, $bodyParams = []) "path" => [ "boards", $this->id, - "members + "members" ], "queryParams" => $queryParams, "headers" => $headers, From e95fe84979e5279616c8745f56aec2a89665b334 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Fri, 4 Oct 2019 12:00:23 +0530 Subject: [PATCH 04/19] updated card service --- geekyants/trelloservice/src/Services/CardService.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/geekyants/trelloservice/src/Services/CardService.php b/geekyants/trelloservice/src/Services/CardService.php index 5d3d433..f369d5a 100644 --- a/geekyants/trelloservice/src/Services/CardService.php +++ b/geekyants/trelloservice/src/Services/CardService.php @@ -367,6 +367,7 @@ function addComment($queryParams) return ["error" => "text should be present in query params"]; } $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -383,6 +384,7 @@ function addComment($queryParams) function addAttachment($queryParams = []) { $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -398,6 +400,7 @@ function addAttachment($queryParams = []) function addChecklist($queryParams = []) { $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -413,6 +416,7 @@ function addChecklist($queryParams = []) function addLabels($queryParams = []) { $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -428,6 +432,7 @@ function addLabels($queryParams = []) function addMembers($queryParams = []) { $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -445,6 +450,7 @@ function addNewLable($queryParams) return ["error" => "label should be present in query params"]; } $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -459,6 +465,7 @@ function addNewLable($queryParams) function markNotificationsRead($queryParams = []) { $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -476,6 +483,7 @@ function voteByMember($queryParams) return ["error" => "value should be present in query params"]; } $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", @@ -506,6 +514,7 @@ function addSticker($queryParams) } $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ "cards", From 1d0f79c087df871f3406d4541af1facb3a1b9caa Mon Sep 17 00:00:00 2001 From: mukul7 Date: Fri, 4 Oct 2019 12:02:25 +0530 Subject: [PATCH 05/19] Update CardService.php --- geekyants/trelloservice/src/Services/CardService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/CardService.php b/geekyants/trelloservice/src/Services/CardService.php index f369d5a..600d3ba 100644 --- a/geekyants/trelloservice/src/Services/CardService.php +++ b/geekyants/trelloservice/src/Services/CardService.php @@ -444,7 +444,7 @@ function addMembers($queryParams = []) return $this->verifyIdThenSendRequest($requestOptions); } - function addNewLable($queryParams) + function addNewLabel($queryParams) { if (!array_key_exists("label", $queryParams) || !$this->utils->isNotEmpty($queryParams["label"])) { return ["error" => "label should be present in query params"]; From 8707697bebfbc085571f5d1dc7204f7292e3a8bb Mon Sep 17 00:00:00 2001 From: mukul7 Date: Fri, 4 Oct 2019 15:33:30 +0530 Subject: [PATCH 06/19] Update CardService.php --- geekyants/trelloservice/src/Services/CardService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geekyants/trelloservice/src/Services/CardService.php b/geekyants/trelloservice/src/Services/CardService.php index 600d3ba..6c2840d 100644 --- a/geekyants/trelloservice/src/Services/CardService.php +++ b/geekyants/trelloservice/src/Services/CardService.php @@ -446,8 +446,8 @@ function addMembers($queryParams = []) function addNewLabel($queryParams) { - if (!array_key_exists("label", $queryParams) || !$this->utils->isNotEmpty($queryParams["label"])) { - return ["error" => "label should be present in query params"]; + if (!array_key_exists("color", $queryParams) || !$this->utils->isNotEmpty($queryParams["color"])) { + return ["error" => "color should be present in query params"]; } $requestOptions = [ "id" => $this->id, From 95d209d7d8425bcffc310395982a1c63a015e06c Mon Sep 17 00:00:00 2001 From: mukul7 Date: Sun, 6 Oct 2019 16:51:11 +0530 Subject: [PATCH 07/19] Update ActionService.php --- .../src/Services/ActionService.php | 146 +----------------- 1 file changed, 1 insertion(+), 145 deletions(-) diff --git a/geekyants/trelloservice/src/Services/ActionService.php b/geekyants/trelloservice/src/Services/ActionService.php index eaaaedf..6fe712f 100644 --- a/geekyants/trelloservice/src/Services/ActionService.php +++ b/geekyants/trelloservice/src/Services/ActionService.php @@ -73,7 +73,7 @@ function fetchCard($queryParams = []) return $this->verifyIdThenSendRequest($requestOptions); } - function fetchDisplayInfo($queryParams = []) + function fetchDisplay($queryParams = []) { $requestOptions = [ "id" => $this->id, @@ -192,148 +192,4 @@ function deleteComment($queryParams = []) ]; return $this->verifyIdThenSendRequest($requestOptions); } - - function fetchAdmins($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "actions", - $this->id, - "admins" - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function fetchSignupUrl($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "actions", - $this->id, - "signupUrl" - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function fetchMembers($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "actions", - $this->id, - "members" - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function isOrganizationTransferableToEnterprise($idOrganization) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "actions", - $this->id, - "transferrable", - "organization", $idOrganization - ], - ]; - - return $this->verifyIdThenSendRequest($requestOptions); - } - - function deactivateMember($idMember, $queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "PUT", - "path" => [ - "actions", - $this->id, - "members", - $idMember, "deactivated" - ], - "queryParams" => $queryParams, - ]; - - if (!array_key_exists("value", $queryParams)) { - return ["error" => "value should be present in query params"]; - } - return $this->verifyIdThenSendRequest($requestOptions); - } - - function tranferOrganization($queryParams) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "PUT", - "path" => [ - "actions", - $this->id, - "organizations" - ], - "queryParams" => $queryParams - ]; - if (!array_key_exists("idOrganization", $queryParams)) { - return ["error" => "idOrganization should be present in query params"]; - } - return $this->verifyIdThenSendRequest($requestOptions); - } - - function makeAdmin($idMember) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "PUT", - "path" => [ - "actions", - $this->id, - "admins", - $idMember - ], - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function removeOrganization($idOrganization) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "DELETE", - "path" => [ - "actions", - $this->id, - "organizations", - $idOrganization - ], - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function removeAdmin($idMember) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "DELETE", - "path" => [ - "actions", - $this->id, - "admins", - $idMember - ], - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } } From 6d90416c5b97668f6f2bc1fd4ecaa777310642f3 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Mon, 7 Oct 2019 12:28:11 +0530 Subject: [PATCH 08/19] Update BoardService.php --- .../src/Services/BoardService.php | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/geekyants/trelloservice/src/Services/BoardService.php b/geekyants/trelloservice/src/Services/BoardService.php index f9b87fe..ac565e5 100644 --- a/geekyants/trelloservice/src/Services/BoardService.php +++ b/geekyants/trelloservice/src/Services/BoardService.php @@ -272,9 +272,9 @@ function addMemberByEmail($queryParams, $headers, $bodyParams = []) "headers" => $headers, "bodyParams" => $bodyParams ]; - + if (!array_key_exists("email", $queryParams)) { - return ["error" => "Email should be present in query params"]; + return ["error" => "email should be present in query params"]; } if (!array_key_exists("type", $headers)) { return ["error" => "member type should be present in headers"]; @@ -297,7 +297,7 @@ function addMemberById($idMember, $queryParams) ]; if (!array_key_exists("type", $queryParams)) { - return ["error" => "Type should be present in query params"]; + return ["error" => "type should be present in query params"]; } return $this->verifyIdThenSendRequest($requestOptions); @@ -317,7 +317,7 @@ function addMembershipById($queryParams) ]; if (!array_key_exists("type", $queryParams)) { - return ["error" => "Type should be present in query params"]; + return ["error" => "type should be present in query params"]; } if (!array_key_exists("idMembership", $queryParams)) { @@ -465,7 +465,7 @@ function create($queryParams) { if (!array_key_exists('name', $queryParams)) { - return ["error" => "Name must be provided to create a Board"]; + return ["error" => "name should be present in query params"]; } $requestOptions = [ @@ -483,7 +483,7 @@ function create($queryParams) return $res; } - function enablePlugin($queryParams) + function enablePlugin($queryParams = []) { $requestOptions = [ "id" => $this->id, @@ -518,12 +518,29 @@ function generateEmailKey() "requestMethod" => "POST", "path" => [ "boards", - $this->id, "EmailKey", + $this->id, "emailKey", "generate", ], ]; return $this->verifyIdThenSendRequest($requestOptions); } + + + function addTag($queryParams){ + $requestOptions = [ + "id" => $this->id, + "requestMethod" => "POST", + "path" => [ + "boards", + $this->id, "idTags", + ], + "queryParams" => $queryParams, + ]; + if (!array_key_exists("value", $queryParams)) { + return ["error" => "value should be present in query params"]; + } + + } function createLabel($queryParams) { @@ -586,7 +603,7 @@ function enablePowerUp($queryParams) "requestMethod" => "POST", "path" => [ "boards", - $this->id, "lists", + $this->id, "powerUps", ], "queryParams" => $queryParams, ]; From 3cf5134d93d9682344a961d3299e9231fcf31dbc Mon Sep 17 00:00:00 2001 From: mukul7 Date: Mon, 7 Oct 2019 12:48:24 +0530 Subject: [PATCH 09/19] Update CardService.php --- .../trelloservice/src/Services/CardService.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/geekyants/trelloservice/src/Services/CardService.php b/geekyants/trelloservice/src/Services/CardService.php index 6c2840d..f0ed574 100644 --- a/geekyants/trelloservice/src/Services/CardService.php +++ b/geekyants/trelloservice/src/Services/CardService.php @@ -29,7 +29,7 @@ function fetch($queryParams = []) return $this->verifyIdThenSendRequest($requestOptions); } - function fetchFeild($field, $queryParams = []) + function fetchField($field, $queryParams = []) { $requestOptions = [ "id" => $this->id, @@ -273,8 +273,8 @@ function update($queryParams = []) function updateComment($idAction, $queryParams = []) { - if (!array_key_exists("Text", $queryParams) || !$this->utils->isNotEmpty($queryParams["Text"])) { - return ["error" => "Text should be present in query params"]; + if (!array_key_exists("text", $queryParams)) { + return ["error" => "text should be present in query params"]; } $requestOptions = [ "id" => $this->id, @@ -343,7 +343,7 @@ function updateSticker($idSticker, $queryParams = []) function create($queryParams) { - if (!array_key_exists("idList", $queryParams) || !$this->utils->isNotEmpty($queryParams["idList"])) { + if (!array_key_exists("idList", $queryParams)) { return ["error" => "idList should be present in query params"]; } $requestOptions = [ @@ -363,7 +363,7 @@ function create($queryParams) function addComment($queryParams) { - if (!array_key_exists("text", $queryParams) || !$this->utils->isNotEmpty($queryParams["text"])) { + if (!array_key_exists("text", $queryParams)) { return ["error" => "text should be present in query params"]; } $requestOptions = [ @@ -372,7 +372,7 @@ function addComment($queryParams) "path" => [ "cards", $this->id, - "action", + "actions", "comments" ], "queryParams" => $queryParams, @@ -446,7 +446,7 @@ function addMembers($queryParams = []) function addNewLabel($queryParams) { - if (!array_key_exists("color", $queryParams) || !$this->utils->isNotEmpty($queryParams["color"])) { + if (!array_key_exists("color", $queryParams)) { return ["error" => "color should be present in query params"]; } $requestOptions = [ @@ -608,7 +608,7 @@ function removeLabel($idLabel) "path" => [ "cards", $this->id, - "idLabel", + "idLabels", $idLabel ] ]; From a130d3d9273bd030940b0472983e631cb6a18665 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Mon, 7 Oct 2019 12:54:28 +0530 Subject: [PATCH 10/19] Update CheckListService.php --- .../src/Services/CheckListService.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/geekyants/trelloservice/src/Services/CheckListService.php b/geekyants/trelloservice/src/Services/CheckListService.php index 24b278f..4d112f5 100644 --- a/geekyants/trelloservice/src/Services/CheckListService.php +++ b/geekyants/trelloservice/src/Services/CheckListService.php @@ -16,8 +16,8 @@ function __construct($id = null) function create($queryParams) { - if (!array_key_exists('idCard', $queryParams)) { - return ["error" => "The ID of the card that the checklist should be added to must be provided to create a checklist"]; + if (!array_key_exists("idCard", $queryParams)) { + return ["error" => "idCard should be present in query params"]; } $requestOptions = [ @@ -36,8 +36,8 @@ function create($queryParams) function createCheckItem($queryParams) { - if (!array_key_exists('name', $queryParams)) { - return ["error" => "name must be provided to create a check Item in query Params"]; + if (!array_key_exists("name", $queryParams)) { + return ["error" => "name should be present in query params"]; } $requestOptions = [ @@ -69,9 +69,6 @@ function fetch($queryParams = []) function fetchField($field, $queryParams = []) { - if ($field == null || trim($field) == "") { - return ["error" => "Field must be provided"]; - } $requestOptions = [ "id" => $this->id, "requestMethod" => "GET", @@ -101,7 +98,7 @@ function fetchBoard($queryParams = []) } - function fetchCard($queryParams = []) + function fetchCards($queryParams = []) { $requestOptions = [ "id" => $this->id, @@ -133,9 +130,6 @@ function fetchCheckItems($queryParams = []) function fetchCheckItem($idCheckItem, $queryParams = []) { - if ($idCheckItem == null || trim($idCheckItem) == "") { - return ["error" => "Id of checkItem must be provided"]; - } $requestOptions = [ "id" => $this->id, "requestMethod" => "GET", From fafc6f5ab234c8e24978cf05e5a72cf8ff06685d Mon Sep 17 00:00:00 2001 From: mukul7 Date: Mon, 7 Oct 2019 13:08:10 +0530 Subject: [PATCH 11/19] Update CustomFields.php --- .../src/Services/CustomFields.php | 156 +----------------- 1 file changed, 9 insertions(+), 147 deletions(-) diff --git a/geekyants/trelloservice/src/Services/CustomFields.php b/geekyants/trelloservice/src/Services/CustomFields.php index ee4225a..023a1fa 100644 --- a/geekyants/trelloservice/src/Services/CustomFields.php +++ b/geekyants/trelloservice/src/Services/CustomFields.php @@ -19,20 +19,20 @@ function __construct($id = null) function create($bodyParams) { try { - if (!array_key_exists('idModel', $bodyParams)) { - throw new Exception("idModel i.e. The ID of the model for which the Custom Field is being defined. This should always be the ID of a board, must be provided to create a Custom Field"); + if (!array_key_exists("idModel", $bodyParams)) { + throw new Exception("idModel should be present in query params"); } if (!array_key_exists('modelType', $bodyParams)) { - throw new Exception("modelType i.e. The type of model that the Custom Field is being defined on. This should always be 'board', must be provided to create a Custom Field"); + throw new Exception("modelType should be present in query params"); } if (!array_key_exists('name', $bodyParams)) { - throw new Exception("The name of custom field must br provided to create a Custom Field"); + throw new Exception("name should be present in query params"); } if (!array_key_exists('type', $bodyParams)) { - throw new Exception("The type of custom field must br provided to create a Custom Field"); + throw new Exception("type should be present in query params"); } if (!array_key_exists('pos', $bodyParams)) { - throw new Exception("The pos of custom field must br provided to create a Custom Field"); + throw new Exception("pos should be present in query params"); } $requestOptions = [ @@ -52,7 +52,7 @@ function create($bodyParams) } } - function updateCustomField($bodyParams) + function updateCustomField($bodyParams = []) { $requestOptions = [ "requestMethod" => "PUT", @@ -100,7 +100,7 @@ function fetchOptions($queryParams = []) "id" => $this->id, "requestMethod" => "GET", "path" => [ - "checklists", + "customFields", $this->id, "options" ], @@ -111,14 +111,11 @@ function fetchOptions($queryParams = []) function fetchOption($idCustomFieldOption, $queryParams = []) { - if ($idCustomFieldOption == null || trim($idCustomFieldOption) == "") { - return ["error" => "The id of custom feild option must be provided"]; - } $requestOptions = [ "id" => $this->id, "requestMethod" => "GET", "path" => [ - "checklists", + "customFields", $this->id, "options", $idCustomFieldOption @@ -145,10 +142,6 @@ function addOption($bodyParams) function deleteOption($idCustomFieldOption) { - if (!$this->utils->isNotEmpty($idCustomFieldOption)) { - return ["error" => "Id of custom field option must be provided to delete"]; - } - $requestOptions = [ "id" => $this->id, "requestMethod" => "DELETE", @@ -204,135 +197,4 @@ function fetchAllFromBoard($idBoard, $queryParams = []) ]; return $this->sendRequest($requestOptions); } - - function fetchField($field, $queryParams = []) - { - if ($field == null || trim($field) == "") { - return ["error" => "Field must be provided"]; - } - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "checklists", - $this->id, - $field - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function fetchBoard($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "checklists", - $this->id, - "board" - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function fetchCard($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "checklists", - $this->id, - "cards" - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function fetchCheckItems($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "checklists", - $this->id, - "checkItems" - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function fetchCheckItem($idCheckItem, $queryParams = []) - { - if ($idCheckItem == null || trim($idCheckItem) == "") { - return ["error" => "Id of checkItem must be provided"]; - } - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "GET", - "path" => [ - "checklists", - $this->id, - "checkItems", - $idCheckItem - ], - "queryParams" => $queryParams, - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } - - function update($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "PUT", - "path" => [ - "checklists", - $this->id - ], - "queryParams" => $queryParams, - ]; - - return $this->verifyIdThenSendRequest($requestOptions); - } - - function updateName($queryParams = []) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "PUT", - "path" => [ - "checklists", - $this->id, - "name" - ], - "queryParams" => $queryParams, - ]; - - if (!array_key_exists("value", $queryParams)) { - return ["error" => "value should be present in query params"]; - } - return $this->verifyIdThenSendRequest($requestOptions); - } - - function deleteCheckItem($idCheckItem) - { - $requestOptions = [ - "id" => $this->id, - "requestMethod" => "DELETE", - "path" => [ - "checklists", - $this->id, - "checkItems", - $idCheckItem - ], - ]; - return $this->verifyIdThenSendRequest($requestOptions); - } } From d446d7bc6f8ac086998c1e92bd6e34b8bb4768f1 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Mon, 7 Oct 2019 14:37:56 +0530 Subject: [PATCH 12/19] Update EnterpriseService.php --- geekyants/trelloservice/src/Services/EnterpriseService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/EnterpriseService.php b/geekyants/trelloservice/src/Services/EnterpriseService.php index 1a1930b..55c10fc 100644 --- a/geekyants/trelloservice/src/Services/EnterpriseService.php +++ b/geekyants/trelloservice/src/Services/EnterpriseService.php @@ -120,7 +120,7 @@ function isOrganizationTransferableToEnterprise($idOrganization) return $this->verifyIdThenSendRequest($requestOptions); } - function deactivateMember($idMember, $queryParams = []) + function deactivateMember($idMember, $queryParams) { $requestOptions = [ "id" => $this->id, From 120b8ead7cad158bc54678c901f93917a9783f0f Mon Sep 17 00:00:00 2001 From: mukul7 Date: Mon, 7 Oct 2019 14:49:40 +0530 Subject: [PATCH 13/19] Update MemberService.php --- geekyants/trelloservice/src/Services/MemberService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/MemberService.php b/geekyants/trelloservice/src/Services/MemberService.php index bf58e7a..249fb3d 100644 --- a/geekyants/trelloservice/src/Services/MemberService.php +++ b/geekyants/trelloservice/src/Services/MemberService.php @@ -28,7 +28,7 @@ function fetch($queryParams = []) return $this->verifyIdThenSendRequest($requestOptions); } - function fetchFeild($field, $queryParams = []) + function fetchField($field, $queryParams = []) { $requestOptions = [ "id" => $this->id, From ed382d32a666669ca88f4020482786e37291f44d Mon Sep 17 00:00:00 2001 From: mukul7 Date: Wed, 9 Oct 2019 11:46:56 +0530 Subject: [PATCH 14/19] Update OrganizationService.php --- geekyants/trelloservice/src/Services/OrganizationService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geekyants/trelloservice/src/Services/OrganizationService.php b/geekyants/trelloservice/src/Services/OrganizationService.php index 66a026f..303b43c 100644 --- a/geekyants/trelloservice/src/Services/OrganizationService.php +++ b/geekyants/trelloservice/src/Services/OrganizationService.php @@ -289,7 +289,7 @@ function create($queryParams) return $res; } - function setLogo($queryParams) + function setLogo($queryParams =[]) { $requestOptions = [ @@ -326,7 +326,7 @@ function createTag($queryParams) return $this->verifyIdThenSendRequest($requestOptions); } - function export($queryParams) + function export($queryParams=[]) { $requestOptions = [ "id" => $this->id, From b704e7b41d37777c7c6db36a087f6d30c299abba Mon Sep 17 00:00:00 2001 From: mukul7 Date: Wed, 9 Oct 2019 12:20:32 +0530 Subject: [PATCH 15/19] Update CheckListService.php --- geekyants/trelloservice/src/Services/CheckListService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/geekyants/trelloservice/src/Services/CheckListService.php b/geekyants/trelloservice/src/Services/CheckListService.php index 4d112f5..8abd492 100644 --- a/geekyants/trelloservice/src/Services/CheckListService.php +++ b/geekyants/trelloservice/src/Services/CheckListService.php @@ -21,6 +21,7 @@ function create($queryParams) } $requestOptions = [ + "id" => this->id, "requestMethod" => "POST", "path" => [ "checklists", From 9d3c33a18cb7d8bd084bbc4c158a0fee53bdba88 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Wed, 9 Oct 2019 12:24:23 +0530 Subject: [PATCH 16/19] Update CheckListService.php --- geekyants/trelloservice/src/Services/CheckListService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/CheckListService.php b/geekyants/trelloservice/src/Services/CheckListService.php index 8abd492..bafbdb3 100644 --- a/geekyants/trelloservice/src/Services/CheckListService.php +++ b/geekyants/trelloservice/src/Services/CheckListService.php @@ -21,7 +21,7 @@ function create($queryParams) } $requestOptions = [ - "id" => this->id, + "id" => $this->id, "requestMethod" => "POST", "path" => [ "checklists", From a7954ffefce356118d2f00dec0d56f65a2857b17 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Wed, 9 Oct 2019 12:25:33 +0530 Subject: [PATCH 17/19] Update CheckListService.php --- geekyants/trelloservice/src/Services/CheckListService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/CheckListService.php b/geekyants/trelloservice/src/Services/CheckListService.php index bafbdb3..96b540f 100644 --- a/geekyants/trelloservice/src/Services/CheckListService.php +++ b/geekyants/trelloservice/src/Services/CheckListService.php @@ -21,7 +21,6 @@ function create($queryParams) } $requestOptions = [ - "id" => $this->id, "requestMethod" => "POST", "path" => [ "checklists", @@ -44,6 +43,7 @@ function createCheckItem($queryParams) $requestOptions = [ "requestMethod" => "POST", "path" => [ + "id" => $this->id, "checklists", $this->id, "checkItems" From 2f433ac43f6f7817edee0e245f8340b5989236e2 Mon Sep 17 00:00:00 2001 From: mukul7 Date: Wed, 9 Oct 2019 12:26:00 +0530 Subject: [PATCH 18/19] Update CheckListService.php --- geekyants/trelloservice/src/Services/CheckListService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/CheckListService.php b/geekyants/trelloservice/src/Services/CheckListService.php index 96b540f..0897041 100644 --- a/geekyants/trelloservice/src/Services/CheckListService.php +++ b/geekyants/trelloservice/src/Services/CheckListService.php @@ -41,9 +41,9 @@ function createCheckItem($queryParams) } $requestOptions = [ + "id" => $this->id, "requestMethod" => "POST", "path" => [ - "id" => $this->id, "checklists", $this->id, "checkItems" From 6bcaf79f97418277d86fd3a7e06cb2cb48e355eb Mon Sep 17 00:00:00 2001 From: mukul7 Date: Wed, 9 Oct 2019 12:43:38 +0530 Subject: [PATCH 19/19] Update CheckListService.php --- geekyants/trelloservice/src/Services/CheckListService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geekyants/trelloservice/src/Services/CheckListService.php b/geekyants/trelloservice/src/Services/CheckListService.php index 0897041..2515bd7 100644 --- a/geekyants/trelloservice/src/Services/CheckListService.php +++ b/geekyants/trelloservice/src/Services/CheckListService.php @@ -51,7 +51,7 @@ function createCheckItem($queryParams) "queryParams" => $queryParams, ]; - $this->verifyIdThenSendRequest($requestOptions); + return $this->verifyIdThenSendRequest($requestOptions); } function fetch($queryParams = [])