Пример #1
0
 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;
 }
Пример #2
0
 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;
 }
Пример #3
0
 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;
 }
Пример #4
0
 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;
 }