UNPKG

soop-extension

Version:

라이브 스트리밍 서비스 숲(soop)의 비공식 API 라이브러리

48 lines (47 loc) 1.4 kB
import { Events, SoopChatOptionsWithClient } from "./types"; export declare class SoopChat { private readonly client; private ws; private chatUrl; private liveDetail; private cookie; private options; private handlers; private pingIntervalId; constructor(options: SoopChatOptionsWithClient); private _connected; private _entered; connect(): Promise<void>; disconnect(): Promise<void>; sendChat(message: string): Promise<boolean>; on<T extends keyof Events>(event: T, handler: (data: Events[T]) => void): void; emit(event: string, data: any): void; private handleMessage; private parseConnect; private parseEnterChatRoom; private parseSubscribe; private parseAdBalloonDonation; private parseVideoDonation; private parseViewer; private parseExit; private parseEmoticon; private parseTextDonation; private parseNotification; private parseChat; private parseMessageType; private startPingInterval; private stopPingInterval; private sendPing; private makeChatUrl; private getByteSize; private getPayloadLength; private createAgent; private getViewerElements; private getConnectPacket; private getJoinPacket; private getEnterInfoPacket; private getPacket; private waitForEnter; private errorHandling; private objectToQueryString; }