UNPKG

@ginstone/nga-api

Version:

44 lines (43 loc) 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReadApi = void 0; const ReplyLocation_1 = require("../response/ReplyLocation"); class ReadApi { /** * 请求一个回复Id的具体地址,使用to参数获取重定向地址 @param client 客户端 * @param replyId 回复id */ static toReply(client, replyId) { return client.toReply(replyId).then(res => { const location = new ReplyLocation_1.ReplyLocation(res); location.replyId = replyId; return location; }); } } /** * 获取单个回复内容 * @param client 客户端 * @param pid 回复id */ ReadApi.readReply = (client, pid) => client.read({ pid }); /** * 获取单个回复内容 * @param client 客户端 * @param pid 回复id */ ReadApi.readReplyDoc = (client, pid) => client.readDoc({ pid }); /** * 获取主题某一页内容 * @param client 客户端 * @param params 参数 */ ReadApi.readTopic = (client, params) => client.read(params); /** * 获取主题某一页内容(网页解析) * @param client 客户端 * @param params 参数 */ ReadApi.readTopicDoc = (client, params) => client.readDoc(params); exports.ReadApi = ReadApi;