♻️ 姑且没登录的功能都给试了下

This commit is contained in:
目棃
2024-07-03 17:49:15 +08:00
parent 367307029b
commit 8a2c7d13c6
47 changed files with 1135 additions and 315 deletions

View File

@@ -1,26 +1,21 @@
/**
* @file plugins Hutao request getOverview.ts
* @file plugins/Hutao/request/getOverview.ts
* @description 获取深渊概览数据
* @since Alpha v0.2.0
* @since Beta v0.5.0
*/
import { http } from "@tauri-apps/api";
import { Response } from "@tauri-apps/api/http";
import TGHttp from "../../../utils/TGHttp.js";
import HutaoApi from "../api/index.js";
/**
* @description 获取深渊概览数据
* @since Alpha v0.2.0
* @since Beta v0.5.0
* @return {Promise<TGApp.Plugins.Hutao.Abyss.OverviewData>}
*/
async function getOverview(): Promise<TGApp.Plugins.Hutao.Abyss.OverviewData> {
const url = HutaoApi.Abyss.overview;
return await http
.fetch(url, { method: "GET" })
.then((res: Response<TGApp.Plugins.Hutao.Abyss.OverviewResponse>) => {
return res.data.data;
});
const resp = await TGHttp<TGApp.Plugins.Hutao.Abyss.OverviewResponse>(url, { method: "GET" });
return resp.data;
}
export default getOverview;