Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 90x 90x 89x 89x | import { GetThreadReq, PostReplyReq } from "proto/threads_pb";
import client from "./client";
export async function getThread(threadId: number, pageToken?: string) {
const req = new GetThreadReq();
req.setThreadId(threadId);
Iif (pageToken) {
req.setPageToken(pageToken);
}
const response = await client.threads.getThread(req);
return response.toObject();
}
export async function postReply(threadId: number, content: string) {
const req = new PostReplyReq();
req.setThreadId(threadId);
req.setContent(content);
const response = await client.threads.postReply(req);
return response.toObject();
}
|