ok
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
## 更新记录
|
## 更新记录
|
||||||
|
|
||||||
|
### version: 2.3:
|
||||||
|
|
||||||
|
宏查询接口调整,恢复使用
|
||||||
|
|
||||||
### version: 2.2:
|
### version: 2.2:
|
||||||
|
|
||||||
接口地址调整,增加部分功能
|
接口地址调整,增加部分功能
|
||||||
|
|||||||
+6
-6
@@ -1600,11 +1600,11 @@ class JX3Service:
|
|||||||
logger.debug(f"查询到数据:{kungfu}")
|
logger.debug(f"查询到数据:{kungfu}")
|
||||||
|
|
||||||
# 1. 构造请求参数
|
# 1. 构造请求参数
|
||||||
params = {"kungfu": kungfu}
|
params = {"subtype": kungfu}
|
||||||
|
|
||||||
# 2. 调用基础请求
|
# 2. 调用基础请求
|
||||||
data: Optional[list[Dict[str, Any]]] = await self._base_request(
|
data: Optional[Dict[str, Any]] = await self._base_request(
|
||||||
"jx3box_hong", "GET", params=params, out_key=""
|
"jx3box_hong", "GET", params=params
|
||||||
)
|
)
|
||||||
logger.debug(data)
|
logger.debug(data)
|
||||||
if not data:
|
if not data:
|
||||||
@@ -1616,9 +1616,9 @@ class JX3Service:
|
|||||||
msg = "按照热度排列\n"
|
msg = "按照热度排列\n"
|
||||||
n = 1
|
n = 1
|
||||||
try:
|
try:
|
||||||
for m in data:
|
for m in data.get('list',[]):
|
||||||
msg += f"{n}、{m['author']}\t{m['item_version']}\n"
|
msg += f"{n}、{m['author']}\t{m['post_title']}\n"
|
||||||
pid_list.append(m["pid"])
|
pid_list.append(m["ID"])
|
||||||
n += 1
|
n += 1
|
||||||
|
|
||||||
return_data["msg"] = msg
|
return_data["msg"] = msg
|
||||||
|
|||||||
@@ -357,12 +357,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jx3box_hong":{
|
"jx3box_hong":{
|
||||||
"url":"https://next2.jx3box.com/api/macro/tops",
|
"url":"https://cms.jx3box.com/api/cms/posts",
|
||||||
"method":"GET",
|
"method":"GET",
|
||||||
"description":"魔盒获取宏推荐列表",
|
"description":"魔盒获取宏推荐列表",
|
||||||
"params":{
|
"params":{
|
||||||
"kungfu": "易筋经",
|
"subtype": "易筋经",
|
||||||
"size": "20",
|
"type": "macro",
|
||||||
|
"per": "10",
|
||||||
|
"order": "update",
|
||||||
|
"sticky": "1",
|
||||||
"client": "std"
|
"client": "std"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from .core.fun_basic import load_as_base64
|
|||||||
@register("astrbot_plugin_jx3",
|
@register("astrbot_plugin_jx3",
|
||||||
"fxdyz",
|
"fxdyz",
|
||||||
"通过调用剑网三API接口获取游戏数据,处理发送。",
|
"通过调用剑网三API接口获取游戏数据,处理发送。",
|
||||||
"2.2",
|
"2.3",
|
||||||
"https://github.com/qsc20001102/astrbot_plugin_jx3api"
|
"https://github.com/qsc20001102/astrbot_plugin_jx3api"
|
||||||
)
|
)
|
||||||
class Jx3ApiPlugin(Star):
|
class Jx3ApiPlugin(Star):
|
||||||
|
|||||||
Reference in New Issue
Block a user