aboutsummaryrefslogtreecommitdiffstats
path: root/scrapers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scrapers/wallhaven.php18
1 files changed, 18 insertions, 0 deletions
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;
}