Merge branch 'dev'

This commit is contained in:
2023-12-27 14:50:22 -05:00
4 changed files with 86 additions and 0 deletions

View File

@ -56,6 +56,21 @@
return array($walls, $meta);
}
function gettaginfo($link) {
$decoded = json_decode(callapi("GET", $link), true);
$tag = [];
foreach($decoded["data"] as $key => $value) {
$tag["id"] = $decoded["data"]["id"];
$tag["name"] = $decoded["data"]["name"];
$tag["alias"] = $decoded["data"]["alias"];
$tag["category_id"] = $decoded["data"]["category_id"];
$tag["purity"] = $decoded["data"]["purity"];
$tag["created_at"] = $decoded["data"]["created_at"];
}
return $tag;
}
function getwallpaper($link) {
$decoded = json_decode(callapi("GET", $link), true);
$wall = $decoded["data"];
@ -95,6 +110,9 @@
$wall["tags"][$key]["purity"] = $decoded["data"]["tags"][$key]["purity"];
$wall["tags"][$key]["created_at"] = $decoded["data"]["tags"][$key]["created_at"];
}
$wall["thumbs"]["large"] = $decoded["data"]["thumbs"]["large"];
$wall["thumbs"]["orig"] = $decoded["data"]["thumbs"]["original"];
$wall["thumbs"]["small"] = $decoded["data"]["thumbs"]["small"];
}
return $wall;
}