summaryrefslogtreecommitdiff
path: root/hypixel_api.sh
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-10-06 12:52:52 +0200
committerLinnea Gräf <nea@nea.moe>2024-10-06 12:52:52 +0200
commit12d3727fa5308149953973a38029a2344a13719d (patch)
treecf7da4716f3eee2b517cc2f92ab8040e54339755 /hypixel_api.sh
downloadforgebot-12d3727fa5308149953973a38029a2344a13719d.tar.gz
forgebot-12d3727fa5308149953973a38029a2344a13719d.tar.bz2
forgebot-12d3727fa5308149953973a38029a2344a13719d.zip
snapshot:
Diffstat (limited to 'hypixel_api.sh')
-rw-r--r--hypixel_api.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/hypixel_api.sh b/hypixel_api.sh
new file mode 100644
index 0000000..9f2bb22
--- /dev/null
+++ b/hypixel_api.sh
@@ -0,0 +1,11 @@
+
+hypixel_request() {
+ # Usage: hypixel_request <path>
+ curl "https://api.hypixel.net/$1" -H "api-key: $HYPIXEL_KEY" 2>/dev/null
+}
+
+get_profiles_by_uuid() {
+ # Usage: get_profiles_by_uuid <uuid>
+ hypixel_request "v2/skyblock/profiles?uuid=$1"
+}
+