Jump to content

Using Kimono api data in php


MilliR

Recommended Posts

I am a noob in api so please bear with me. I tried google searching for 1 hour but I can't understand anything from the results.

 

Currently, I have an API in kimono with the given example data :

 



{
 "name": "Summoners-Details",
 "count": 31,
 "frequency": "On demand",
 "version": 7,
 "newdata": false,
 "lastrunstatus": "success",
 "thisversionrun": "Tue Sep 02 2014 02:34:07 GMT+0000 (UTC)",
 "lastsuccess": "Tue Sep 02 2014 02:34:07 GMT+0000 (UTC)",
 "stats": {
"retriedUrls": [],
"failedUrls": [],
"successful": 1,
"rows": 31,
"retried": 0,
"failed": 0,
"duration": 1894
 },
 "results": {
"rank": [
 {
"division": "Wukong's Lancers Silver-tier II"
 }
]
 }
}


Here is the php code I am trying to use to get the division data, but I am getting nothing! :

 



<?php
$request = "https://www.kimonolabs.com/api/c6qj1oc?apikey=xxxxxxxxxxxxxxxxxx";
$response = file_get_contents($request);
$results = json_decode($response, TRUE);


$division = $results->{'results'}->{'rank'}->{'division'};
echo $division;
?>


What am I doing wrong here??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.