Class: LiveResource
Defined in: src/resources/live.ts:28
Live 리소스. https://chzzk.gitbook.io/chzzk/chzzk-api/live
Constructors
Constructor
new LiveResource(deps): LiveResource;Defined in: src/resources/live.ts:29
Parameters
deps
Returns
LiveResource
Methods
getSetting()
getSetting(): Promise<{
[key: string]: unknown;
category: | {
[key: string]: unknown;
categoryId: string | null;
categoryType: CategoryType | null;
categoryValue: string | null;
posterImageUrl: string | null;
}
| null;
defaultLiveTitle: string;
tags: string[];
}>;Defined in: src/resources/live.ts:75
방송 설정 조회 — GET /open/v1/lives/setting 〔유저 토큰 · Scope: 방송 설정 조회〕
Returns
Promise<{ [key: string]: unknown; category: | { [key: string]: unknown; categoryId: string | null; categoryType: CategoryType | null; categoryValue: string | null; posterImageUrl: string | null; } | null; defaultLiveTitle: string; tags: string[]; }>
iterateLives()
iterateLives(params?): AsyncGenerator<{
[key: string]: unknown;
adult: boolean;
categoryType: CategoryType | null;
channelId: string;
channelImageUrl: string | null;
channelName: string;
concurrentUserCount: number;
liveCategory: string | null;
liveCategoryValue: string | null;
liveId: number;
liveThumbnailImageUrl: string | null;
liveTitle: string;
openDate: string;
tags: string[];
}, void>;Defined in: src/resources/live.ts:44
라이브 전체 자동 순회 (page.next 커서 소진까지).
Parameters
params?
Pick<LivesParams, "size"> = {}
Returns
AsyncGenerator<{ [key: string]: unknown; adult: boolean; categoryType: CategoryType | null; channelId: string; channelImageUrl: string | null; channelName: string; concurrentUserCount: number; liveCategory: string | null; liveCategoryValue: string | null; liveId: number; liveThumbnailImageUrl: string | null; liveTitle: string; openDate: string; tags: string[]; }, void>
lives()
lives(params?): Promise<{
[key: string]: unknown;
data: object[];
page?: | {
[key: string]: unknown;
next?: string | null;
}
| null;
}>;Defined in: src/resources/live.ts:32
라이브 목록 조회(단일 페이지) — GET /open/v1/lives 〔Client 인증〕
Parameters
params?
LivesParams = {}
Returns
Promise<{ [key: string]: unknown; data: object[]; page?: | { [key: string]: unknown; next?: string | null; } | null; }>
streamKey()
streamKey(): Promise<string>;Defined in: src/resources/live.ts:59
방송 스트림키 조회 — GET /open/v1/streams/key 〔유저 토큰 · Scope: 방송 스트림키 조회〕 ⚠️ 스트림키는 방송 송출 권한 그 자체다. 로그·화면에 노출하지 말 것.
Returns
Promise<string>
updateSetting()
updateSetting(patch): Promise<void>;Defined in: src/resources/live.ts:91
방송 설정 변경 — PATCH /open/v1/lives/setting 〔유저 토큰 · Scope: 방송 설정 변경〕 전달한 필드만 변경된다. categoryId: ""는 카테고리 제거, tags: []는 태그 제거.
Parameters
patch
Returns
Promise<void>