From 39dd311cee2255c6cc41d656007f395784e44d31 Mon Sep 17 00:00:00 2001 From: Squibid Date: Tue, 26 Dec 2023 22:58:20 -0500 Subject: feat:explain the users query --- scrapers/wallhaven.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'scrapers') diff --git a/scrapers/wallhaven.php b/scrapers/wallhaven.php index 5dbdd68..29df5d3 100644 --- a/scrapers/wallhaven.php +++ b/scrapers/wallhaven.php @@ -53,6 +53,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"]; @@ -92,6 +107,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; } -- cgit v1.2.1