public function statisticsAction() { $type = $this->params()->fromQuery('type', false); $from = $this->params()->fromQuery('from', false); $to = $this->params()->fromQuery('to', false); $response = $this->webapicall->request('statisticsGetSeries', compact('type', 'from', 'to')); return array('result' => $response->responseData->series); }
/** * Fetch all or a subset of resources * * @param array $params * @return ApiProblem|mixed */ public function fetchAll($params = array()) { $limit = $this->getEvent()->getRequest()->getQuery('limit', false); $parameters = array('filterId' => 'All Issues'); if ($limit) { if ($limit < 2) { return new ApiProblem(400, 'Limit shall be greater than 1'); } $parameters['limit'] = $limit; } $response = $this->webapicall->request('monitorGetIssuesByPredefinedFilter', $parameters); return $response->responseData->issues; }