Open
Conversation
added the ! to line 195 as recommended by kevinohashi Added "getSummonerName" this returns the correctly formatted name from a lowercase name Example "UseRName" from "username"
Removed my API key
Owner
|
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? |
Author
|
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. |
Owner
|
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"} |
Author
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is mainly me learning how to do pull requests, but i wanted to get the correct casing on a username.