Fixed examples
This commit is contained in:
parent
146111288e
commit
3bbcdc6ff8
2 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ function callback(jsonObject) {
|
|||
document.getElementById('output').innerHTML = JSON.stringify(jsonObject, undefined, 4);
|
||||
}
|
||||
</script>
|
||||
<script src="http://localhost/api.php/posts,categories,tags,comments?filter=id,eq,1&callback=callback" defer="defer"></script>
|
||||
<script src="http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1&callback=callback" defer="defer"></script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id="output"></pre>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function call($method, $url, $data = false) {
|
|||
return curl_exec($ch);
|
||||
}
|
||||
|
||||
$response = call('GET','http://localhost/api.php/posts,categories,tags,comments?filter=id,eq,1');
|
||||
$response = call('GET','http://localhost/api.php/posts?include=categories,tags,comments&filter=id,eq,1');
|
||||
$jsonObject = json_decode($response,true);
|
||||
|
||||
$jsonObject = php_crud_api_transform($jsonObject);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue