api:https://www.yuque.com/augus-gsjgn/eagle-api/pq0y2y
//官方api源码
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("http://localhost:41595/api/folder/list?token=YOUR_API_TOKEN", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
url = "http://localhost:41595/api/folder/list?token=YOUR_API_TOKEN"
response = requests.get(url)
data = response.json()
if response.status_code == 200 and data["status"] == "success":
folder = data["data"][5] # 获取我的第六个文件夹
children = folder["children"]
children_names = [child["name"] for child in children]
print("Children:")
for name in children_names:
print(name)
else:
print("Error occurred:", data)