test: Initial domain TLD info

This commit is contained in:
2025-07-18 12:26:57 +10:00
parent 26e77913fb
commit 9db2a269a4

View File

@@ -33,7 +33,7 @@ functions = {
"returns": { "returns": {
"info": "info":
{ {
"name": "Information on the domain", "name": "Shakestation information",
"type": "text" "type": "text"
} }
} }
@@ -48,5 +48,13 @@ def domain_info(params, authentication):
if not domain: if not domain:
return {"info": "No domain provided"} return {"info": "No domain provided"}
response = requests.post(f"https://shakestation.com/api",
json={"action":"getTLD","tld":domain})
if response.status_code != 200:
return {"info": "Failed to fetch data from Shakestation"}
data = response.json()
return {"info": data}
return {"info": "TODO"} return {"info": "TODO"}