Open Krayt1x opened 8 years ago
I'm confused what this is trying to do or add to the library? It looks like you created a function to get a summoner by name passing in a name?
yeah forget what im trying to do there, i see its already implements in the getSummoner call.
what it did do was correct the casing on a summoner name
example being you would put in username and get back USerNaMe or what ever casing they have.
Ah I see. That functionality exists in
//Returns summoner info given summoner id.
public function getSummoner($id,$option=null){
$call = 'summoner/' . $id;
switch ($option) {
case 'masteries':
$call .= '/masteries';
break;
case 'runes':
$call .= '/runes';
break;
case 'name':
$call .= '/name';
break;
default:
//do nothing
break;
}
//add API URL to the call
$call = self::API_URL_1_4 . $call;
return $this->request($call);
}
if you pass in optional parameter 'name'
if you pass summoner id 19008487 with name optional param, you get back:
{"19008487": "PewPewLasers"}
hey, i made the other post before i saw this but i seem to be getting the same string vs array issue again with this query as well.
This is mainly me learning how to do pull requests, but i wanted to get the correct casing on a username.