kevinohashi / php-riot-api

PHP Wrapper for Riot Games API
MIT License
75 stars 40 forks source link

Problems with certain functions? #30

Closed Forge-Media closed 9 years ago

Forge-Media commented 9 years ago

I'm having problems with the following functions: • $r = $test->getSummonerId($summoner_name) - Returns nothing ($r is empty) • $r = $test->getLeague($summoner_id); - Returns the following: Array ( [status] => Array ( [message] => Access denied [status_code] => 401 ) )

Is your 'php-riot-api' still working, or since the October 1'st change does it no longer work?

Sorry if these are simple problems to solve but I'm really new to the RIOT API and its the first API with PHP Libraries which just don't seem to work, sigh :(

I've also double checked and my API Key seems to work as other functions to return correct values.

kevinohashi commented 9 years ago

Working on finding these issues. I figured out the first one I think. It's a problem with names being case sensitive when referencing them in PHP index. Working on 2nd. I'll have a patch soon, but you can make sure you only use lowercase, should fix that issue.

kevinohashi commented 9 years ago

Second issue seems to be they updated API endpoint to 2.5. Patch will be live in a few minutes.

Forge-Media commented 9 years ago

Second issue seems to be they updated API endpoint to 2.5. Patch will be live in a few minutes.

Just fixed this my self I think, but will wait for the patch. Read through https://developer.riotgames.com/api/methods and noticed there was a new version.

As for the case problem let me test that.

kevinohashi commented 9 years ago

https://github.com/kevinohashi/php-riot-api/commit/ac306fdbfda4a05f654b96bd1d107142670cc58a

should fix your issues. Let me know if anything else is not working.

kevinohashi commented 9 years ago

Looks like we were on the same page and off by a couple minutes :)

Forge-Media commented 9 years ago

Sorry about that, the caching caught me.

Yeah removing all caps from my summoner name solves the ID problem :D

I'm just trying to a build a script to update my teampage: http://www.forgegaming.net/the-team/ automatically as opposed to manually updating. Seems simple enough

kevinohashi commented 9 years ago

I sent you an email to your listed email on github