PHP

PHP request method

get

https://neko-love.xyz/api/v1/:endpoint
Request
Response
Request
Path Parameters
Parameter Type
required
string
The "endpoint" parameter must be a valid type
Response
200: OK
"https://neko-love.xyz/v1/neko/neko-love_54.jpg"
<?php
nekoGET("neko");
function nekoGET($type) {
$url = 'https://neko-love.xyz/api/v1/'.$type;
$body = file_get_contents($url);
if ($body == false) echo 'An error has occurred';
else {
$obj = json_decode($body);
echo $obj->{'url'};
}
}
?>