/** * @param $catId * @return array|string */ public function getAntragoEventsById($catId) { /** * @var \artsolution\Contao\AntragoConnector; */ $objectEvents = AntragoConnector::getContentFromApi($this->configuration['api_host'] . "/list/{$catId}", $this->configuration['api_user'], $this->configuration['api_password']); return json_decode($objectEvents, true); }
/** * @param $route * @return mixed|string */ public function getFromApi($route) { $data = AntragoConnector::getContentFromApi($this->connection['api_host'] . "/{$route}", $this->connection['api_user'], $this->connection['api_password']); return $data; }