d3sd1 / OnLoL-Riot-API

Riot api base for PHP. Updated constantly and almost without bugs!
2 stars 2 forks source link

Static Data with Items #3

Closed SeaRoth closed 7 years ago

SeaRoth commented 7 years ago

When using the method staticData with "items" the json output is different than other methods such as recentGames.

Example staticData()

$api->staticData("item/3142"); Picture

$api->staticData("item"); Picture

Example recentGames()

$api->recentGames('20844500', "na"); Picture

Can anyone else confirm or deny?

d3sd1 commented 7 years ago

Hi there. On recentgames(), you can access ONLY THE SEARCHED SUMMONER ITEMS, by going to $recentgames['stats']['item0'] $recentgames['stats']['item1'] [...] $recentgames['stats']['item6'] So there you will get the item ID, and with this item ID you can search the full content of the item by going: $api->staticData("item/{ITEM_ID}"); It has a different output for saving some bytes, you know :P

SeaRoth commented 7 years ago

I was getting confused because of the JSON viewer extension on my chrome, thank you for answering! =) <3