generated from nathanwoodburn/firewallet-plugin-template
test: Initial domain TLD info
This commit is contained in:
@@ -33,7 +33,7 @@ functions = {
|
||||
"returns": {
|
||||
"info":
|
||||
{
|
||||
"name": "Information on the domain",
|
||||
"name": "Shakestation information",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
@@ -48,5 +48,13 @@ def domain_info(params, authentication):
|
||||
if not domain:
|
||||
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"}
|
||||
Reference in New Issue
Block a user