mirror of
https://github.com/yusufipk/YTChatHub.git
synced 2026-09-11 10:56:17 +00:00
19 lines
544 B
TypeScript
19 lines
544 B
TypeScript
export type ContinuationState = {
|
|
token: string | null;
|
|
apiKey?: string;
|
|
};
|
|
|
|
export async function bootstrapInnertube(): Promise<ContinuationState> {
|
|
// TODO: fetch initial visitor data and live chat continuation token via youtubei.js
|
|
return { token: null };
|
|
}
|
|
|
|
export async function fetchChatBatch(state: ContinuationState) {
|
|
// TODO: use youtubei.js to fetch messages with the provided continuation token
|
|
// return both normalized messages and the next continuation token
|
|
return {
|
|
messages: [],
|
|
next: state.token
|
|
};
|
|
}
|