import { ApiClient } from "../client/ApiClient"; import type { Endpoint } from "../client/endpoints"; import type { ApiResponse } from "../client/types"; import proto from "db://assets/Scripts/proto/proto.pb.js"; import type { IGirlService } from "./IGirlService"; export class HttpGirlService implements IGirlService { constructor(private api = ApiClient.I) {} // 每日推荐 async reqDailyRecommend(req: proto.cs.ICSDailyRecommendReq): Promise> { let epData: Endpoint = { path: "api/logic/dailyRecommend", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 推荐列表 async reqRecommendList(req: proto.cs.ICSRecommendReq): Promise> { let epData: Endpoint = { path: "api/logic/recommend", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 获取技师列表 async reqGetGirlList(req: proto.cs.ICSGetGirlListReq): Promise> { let epData: Endpoint = { path: "api/logic/getGirls", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 获取技师详细信息 async reqGetGirlDetail(req: proto.cs.ICSGetGirlDetailReq): Promise> { let epData: Endpoint = { path: "api/logic/girlDetail", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 解锁技师 async reqUnlockGirl(req: proto.cs.ICSUnlockGirlReq): Promise> { let epData: Endpoint = { path: "api/logic/unlockGirl", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 解锁资源 async reqUnlockGirlRes(req: proto.cs.ICSUnlockResourceReq): Promise> { let epData: Endpoint = { path: "api/logic/unlockResource", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 获取可聊天的技师数据 async reqCanChatGirlData(req: proto.cs.ICSGetLastChatListReq): Promise> { let epData: Endpoint = { path: "api/logic/getLastChat", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 获取排行榜列表 async reqGirlRankData(req: proto.cs.ICSGetRankReq): Promise> { let epData: Endpoint = { path: "api/logic/getRank", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 查看图片或者视频上报,用于排行榜 async reqViewGirl(req: proto.cs.ICSViewGirlReq): Promise> { let epData: Endpoint = { path: "api/logic/viewGirl", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 收藏技师 async reqBookmarkGirl(req: proto.cs.ICSBookmarkReq): Promise> { let epData: Endpoint = { path: "api/logic/bookmark", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 获取收藏列表 async reqBookmarkGirlList(req: proto.cs.ICSGetBookmarkReq): Promise> { let epData: Endpoint = { path: "api/logic/getBookmark", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } }