/** * Delivers a JSON response for video searches */ public function videoSearch() { $searchConfig = new Wikia\Search\Config(); $searchConfig->setCityId($this->wg->CityId)->setQuery($this->getVal('q'))->setNamespaces(array(NS_FILE))->setVideoSearch(true); $wikiaSearch = $this->queryServiceFactory->getFromConfig($searchConfig); $this->getResponse()->setFormat('json'); $this->getResponse()->setData($wikiaSearch->searchAsApi()); }