/**
  * @param AbstractRequest $request
  * @return string
  * @throws \Exception
  */
 protected function createUrl(AbstractRequest $request)
 {
     if ($request->getUrl() == null) {
         throw new \Exception('No URL!');
     }
     $url = $this->api->getBaseUrl() . $request->getUrl();
     $query = http_build_query(['key' => $this->api->getApplicationKey(), 'token' => $this->api->getAuthToken()]);
     $url .= '?' . $query;
     return $url;
 }
 /**
  * @param Checklist $checklist
  * @param RepositoryInformation $repoInfo
  * @param $title
  * @return ChecklistItem
  */
 public function createChecklistItem(Checklist $checklist, RepositoryInformation $repoInfo, $title)
 {
     $itemName = IssueReference::createReferenceFromRepositoryInformation($repoInfo, $title);
     $checklistItem = new ChecklistItem();
     $checklistItem->setIdChecklist($checklist->getId());
     $checklistItem->setName($itemName);
     return $this->api->createChecklistItem($checklistItem);
 }
 /**
  * @return \LooplineSystems\IssueManager\Library\Trello\Api\Object\Card|null
  */
 protected function loadCard()
 {
     $cardDto = $this->trelloWebHook->getDtoContainer()->getCardDto();
     return $this->trelloApi->getCardByShortLink($cardDto->getShortLink());
 }