public function toHtml() { $region = Core::lib('Param')->getParam('region'); $url = Core::plugin('NoxusApi')->getApiUrl($region); $url = str_replace("#request#", "observer-mode/rest/featured", $url); $response = Core::plugin('NoxusApi')->sendRequest($url); return $response; }
public function names() { $region = Core::lib('Param')->getParam('region'); $summoner = Core::lib('Param')->getParam('summoner'); $url = Core::plugin('NoxusApi')->getApiUrl($region); $url = str_replace("#request#", "api/lol/{$region}/v{$this->_api_version}/summoner/{$summoner}/name", $url); $response = Core::plugin('NoxusApi')->sendRequest($url); return $response; }
public function masteries() { $region = Core::lib('Param')->getParam('region'); $summoner = Core::lib('Param')->getParam('summoner'); $url = Core::plugin('NoxusApi')->getApiUrl($region); $url = str_replace("#request#", "api/lol/{$region}/v{$this->_api_version}/summoner/{$summoner}/masteries", $url); $response = Core::plugin('NoxusApi')->sendRequest($url); //if(!Core::plugin('NoxusApi')->wasCache()) $this->_saveMasteries($response); return $response; }
private function _byId() { $region = Core::lib('Param')->getParam('region'); $summoner = Core::lib('Param')->getParam('summoner'); $url = Core::plugin('NoxusApi')->getApiUrl($region); $url = str_replace("#request#", "api/lol/{$region}/v{$this->_api_version}/summoner/{$summoner}", $url); $response = Core::plugin('NoxusApi')->sendRequest($url); if (!Core::plugin('NoxusApi')->wasCache()) { $this->_saveSummoners($response); } return $response; }