buzzk 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -242,6 +242,8 @@ dotenv와 함께 사용하는 것을 매우 권장합니다.
242
242
  - closeOn
243
243
  - status
244
244
  - polling
245
+ - liveID
246
+ - videoID
245
247
 
246
248
  </details>
247
249
 
package/lib/live.js CHANGED
@@ -35,11 +35,13 @@ const { reqChzzk, reqGame } = require("./tool.js");
35
35
  async function getDetail (channelID) {
36
36
  return new Promise(async (resolve, reject) => {
37
37
 
38
- let res = await reqChzzk("service/v2/channels/" + channelID + "/live-detail");
38
+ let res = await reqChzzk("service/v3/channels/" + channelID + "/live-detail");
39
39
  if (res.code != 200 || !res.content) return resolve(null);
40
40
  res = res.content;
41
41
 
42
42
  try {
43
+ let livePlayback = await JSON.parse(res.livePlaybackJson);
44
+
43
45
  let lvDetail = {
44
46
  channelID: res.channel.channelId,
45
47
  channel: { name: res.channel.channelName, imageURL: res.channel.channelImageUrl },
@@ -51,7 +53,9 @@ async function getDetail (channelID) {
51
53
  startOn: res.openDate,
52
54
  closeOn: res.closeDate,
53
55
  status: res.status,
54
- polling: JSON.parse(res.livePollingStatusJson)
56
+ polling: JSON.parse(res.livePollingStatusJson),
57
+ liveID: livePlayback.meta.liveId,
58
+ videoID: livePlayback.meta.videoId
55
59
  }
56
60
 
57
61
  return resolve(lvDetail);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzk",
3
3
  "displayName": "BUZZK",
4
- "version": "1.10.0",
4
+ "version": "1.11.0",
5
5
  "description": "뿌지직 (BUZZK) - 치지직(CHZZK) 챗봇을 더욱 쉽게 개발할 수 있도록 돕는 비공식 라이브러리.",
6
6
  "main": "lib/index.js",
7
7
  "type": "commonjs",