+0
-1
@@ -8,3 +8,2 @@ require("./vm.js"); | ||
| oauth: require("./oauth.js"), | ||
| video: require("./video.js"), | ||
@@ -11,0 +10,0 @@ auth: require("./val.js").auth, |
+1
-1
| { | ||
| "name": "buzzk", | ||
| "displayName": "BUZZK", | ||
| "version": "2.3.10", | ||
| "version": "2.3.11", | ||
| "description": "뿌지직 (BUZZK) - 치지직(CHZZK) 챗봇을 더욱 쉽게 개발할 수 있도록 돕는 비공식 라이브러리.", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
+27
-7
@@ -17,11 +17,9 @@ <img src="https://github.com/Emin-G/Img/blob/main/buzzk/buzzk_pamplet.gif?raw=true" alt="BuzzkThumb" width="100%"> | ||
| ### 🎉 2.2 업데이트 | ||
| - 이제 Axios를 사용하여 API를 불러옵니다! | ||
| - 더욱 안정적이고 빠른 성능을 보일 것으로 기대됩니다! | ||
| ### 🎉 2.3.11 업데이트 | ||
| - 이제 사용되지 않는, 작동하지 않는 함수 buzzk.video를 Deprecate 했습니다. | ||
| - 프로젝트에서 buzzk.video 함수를 사용하셨다면 업데이트 전 모두 제거하시기 바랍니다. | ||
| - 자세한 사항은 하단의 마이그레이션 가이드를 참고해주세요. | ||
| ### 🎉 2.1 업데이트 | ||
| - 공식 API로 거의 대부분의 작업을 대체했어요! | ||
| > [!CAUTION] | ||
| > 이 버전 이후부터는 공식 API와 비공식 API를 혼용하여 사용합니다. | ||
| > 현재 버전은 공식 API와 비공식 API를 혼용하여 사용합니다. | ||
| > 공식 API로 대체 가능한 기능은 모두 공식 API를 이용할 예정입니다. | ||
@@ -33,5 +31,27 @@ | ||
| > `npm install buzzk@1.11.3` | ||
| > * (지원되지 않음 / 권장되지 않음) | ||
| --- | ||
| ## ✒️ 마이그레이션 가이드 (v.2.3.x -> v.2.3.11) | ||
| <details> | ||
| <summary>펼쳐보기</summary> | ||
| buzzk.video | ||
| | <img src="https://github.com/Emin-G/Img/blob/main/tags/tag_delete-min.png?raw=true" alt="BUZZK" width="70"> | 삭제 | | ||
| |--|--| | ||
| | | buzzk.video.getList(channelID, size) | | ||
| --- | ||
| | <img src="https://github.com/Emin-G/Img/blob/main/tags/tag_delete-min.png?raw=true" alt="BUZZK" width="70"> | 삭제 | | ||
| |--|--| | ||
| | | buzzk.video.get(no) | | ||
| </details> | ||
| --- | ||
| ## ✒️ 마이그레이션 가이드 (v.2.3.x -> v.2.3.8) | ||
@@ -38,0 +58,0 @@ |
-113
| const { reqChzzk, reqNaver } = require("./tool.js"); | ||
| /** | ||
| * @typedef {Object.<number, chzzkVideo>} chzzkVideos | ||
| */ | ||
| /** | ||
| * @typedef {Object} chzzkVideo | ||
| * @property {number} no | ||
| * @property {string} id | ||
| * @property {string} title | ||
| * @property {string} category | ||
| * @property {number} duration | ||
| * @property {string} uploadOn | ||
| * @property {string} imageURL | ||
| * @property {string} trailerURL | ||
| */ | ||
| /** | ||
| * @param {string} channelID | ||
| * @param {?number} size | ||
| * @returns {Promise<chzzkVideos>} | ||
| */ | ||
| async function getList (channelID, size) { | ||
| return new Promise(async (resolve, reject) => { | ||
| let res = await reqChzzk("service/v1/channels/" + channelID + "/videos?sortType=LATEST&pagingType=PAGE&page=0&size=" + size || 24); | ||
| if (res.code != 200 || !res.content) return resolve(null); | ||
| let videos = res.content.data; | ||
| if (Object.keys(videos).length < 1) return resolve(null); | ||
| let data = new Map(); | ||
| try { | ||
| for (let o in videos) { | ||
| let vdDetail = { | ||
| no: videos[o].videoNo, | ||
| id: videos[o].videoId, | ||
| title: videos[o].videoTitle, | ||
| category: videos[o].videoCategoryValue, | ||
| duration: videos[o].duration, | ||
| uploadOn: videos[o].publishDate, | ||
| imageURL: videos[o].thumbnailImageUrl, | ||
| trailerURL: videos[o].trailerUrl | ||
| } | ||
| data[Object.keys(data).length] = vdDetail; | ||
| } | ||
| return resolve(data); | ||
| } | ||
| catch(error) { | ||
| return resolve(null); | ||
| } | ||
| }); | ||
| } | ||
| /** | ||
| * @typedef {Object} chzzkVideoDetail | ||
| * @property {string} id | ||
| * @property {string} title | ||
| * @property {string} category | ||
| * @property {number} duration | ||
| * @property {string} uploadOn | ||
| * @property {string} startOn | ||
| * @property {string} imageURL | ||
| * @property {string} trailerURL | ||
| * @property {chzzkVideoURL} videoURL | ||
| */ | ||
| /** | ||
| * @typedef {Object.<number, string>} chzzkVideoURL | ||
| */ | ||
| /** | ||
| * @param {number} no | ||
| * @returns {Promise<chzzkVideoDetail>} | ||
| */ | ||
| async function get (no) { | ||
| return new Promise(async (resolve, reject) => { | ||
| let res = await reqChzzk("service/v3/videos/" + no); | ||
| if (res.code != 200 || !res.content) return resolve(null); | ||
| res = res.content; | ||
| try { | ||
| let vdDetail = { | ||
| id: res.videoId, | ||
| title: res.videoTitle, | ||
| category: res.videoCategoryValue, | ||
| duration: res.duration, | ||
| uploadOn: res.publishDate, | ||
| startOn: res.liveOpenDate, | ||
| imageURL: res.thumbnailImageUrl, | ||
| trailerURL: res.trailerUrl, | ||
| videoURL: "https://apis.naver.com/neonplayer/vodplay/v2/playback/" + res.videoId + "?key=" + res.inKey | ||
| } | ||
| return resolve(vdDetail); | ||
| } | ||
| catch(error) { | ||
| return resolve(null); | ||
| } | ||
| }); | ||
| } | ||
| module.exports = { | ||
| getList: getList, | ||
| get: get | ||
| } |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
526
3.95%42359
-5.73%11
-8.33%824
-10.34%