npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

buzzk

v1.11.1

Published

뿌지직 (BUZZK) - 치지직(CHZZK) 챗봇을 더욱 쉽게 개발할 수 있도록 돕는 비공식 라이브러리.

Downloads

85

Readme

뿌지직


📖 업데이트 내역

  • 채팅 채널 연결을 유지하지 못하는 문제 완벽 해결
  • video 함수 추가
  • 채팅 채널 연결을 유지하지 못하는 문제 해결
  • 채팅 채널이 없을 때 오류가 생기는 문제 해결
  • onDonation 함수 추가

  • 본인 인증 채팅 지원 추가

  • 채팅 데이터에 hasMod 항목 추가
  • JSON을 Parse 하는 중 오류가 생기는 문제 해결
  • User-Agent 추가 (API 호출에 실패하는 문제 해결)

✒️ 마이그레이션 가이드 (v.1.2.x -> v.1.3.0)

buzzk.channel

| | buzzk.channel.getChannel | |--|--| | | buzzk.channel.search |


| | buzzk.channel.followChannel | |--|--| | | buzzk.channel.follow |


| | buzzk.channel.unFollowChannel | |--|--| | | buzzk.channel.unFollow |


buzzk.live

| | buzzk.live.getLiveDetail | |--|--| | | buzzk.live.getDetail |


| | buzzk.live.getLiveStatus | |--|--| | | buzzk.live.getStatus |


buzzk.live.getDetail (getLiveDetail)

| | (return).channel.channelName | |--|--| | | (return).channel.name |


| | (return).channel.channelImageUrl | |--|--| | | (return).channel.imageURL |


| | (return).channel.channelId | |--|--|


| | (return).channel.verifiedMark | |--|--|

👋 설치

  1. npm install buzzk
  2. const buzzk = require("buzzk");

🔥 빠른. 시작.

const buzzk = require("buzzk");
buzzk.login("NID_AUT 쿠키 값", "NID_SES 쿠키 값");

const buzzkChat = buzzk.chat;

async function test () {

    let chSearch = await buzzk.channel.search("녹두로로"); //채널 검색
    
    let channel = chSearch[0]; //검색 결과 첫번째 채널

    const lvDetail = await buzzk.live.getDetail(channel.channelID); //현재 방송 정보

    let chat = new buzzkChat(channel.channelID);
    await chat.connect(); //채팅창 연결

    let recentChat = await chat.getRecentChat(); //최근 채팅 가져오기 (기본값 50개)
    console.log(recentChat);

    chat.onMessage(async (data) => { //채팅이 왔을 때
        for (let o in data) {
            console.log(data[o].message);

			if (data[o].message === "!ping") await chat.send("pong!");
			//채팅 보내기 (login 후에만 가능)

			let userInfo = await chat.getUserInfo(data[o].author.id);
        	console.log(userInfo);
			//채팅 보낸 유저의 정보
        }
    });

	chat.onDisconnect(async () => { //채팅창 연결이 끊겼을 때
		//TODO
	});
    
}

test();

🎀 사용법

login

buzzk.login("NID_AUT 쿠키 값", "NID_SES 쿠키 값");

dotenv와 함께 사용하는 것을 매우 권장합니다.

buzzk.login(process.env.NID_AUT, process.env.NID_SES);

channel

let chSearch = await buzzk.channel.search("녹두로로");
console.log(chSearch);
  • Return
    • 0
      • channelID
      • name
      • description
      • follower
      • imageURL
      • isLive
    • 1
    • 2
    • 3
    • ...
let channel = await buzzk.channel.get("channelID 값");
console.log(channel);
  • Return
    • channelID
    • name
    • description
    • follower
    • imageURL
    • isLive
await buzzk.channel.follow("channelID 값");
await buzzk.channel.unFollow("channelID 값");

live

const lvDetail = await buzzk.live.getDetail("channelID 값");
console.log(lvDetail);
  • Return
    • channelID
    • channel
      • name
      • imageURL
    • chatID
    • chatLimit //팔로워 전용 채팅 등...
    • userCount
      • now
      • total
    • title
    • category
    • startOn
    • closeOn
    • status
    • polling
    • liveID
    • videoID
const lvStatus = await buzzk.live.getStatus("channelID 값");
console.log(lvStatus);
  • Return
    • channelID
    • chatID
    • userCount
      • now
      • total
    • title
    • status
    • polling

chat

const buzzkChat = buzzk.chat;
let chat = new buzzkChat("channelID 값");
await chat.connect(); //채팅창 연결
let recentChat = await chat.getRecentChat(갯수); //최근 채팅 가져오기 (기본값 50개)
console.log(recentChat);
  • Return
    • 0
      • author
        • id
        • name
        • imageURL
        • hasMod //관리 권한을 가졌는지 (false / true)
      • message
      • time
    • 1
    • 2
    • 3
    • ...
chat.onMessage((data) => { //채팅이 왔을 때
	console.log(data);

    for (let o in data) {
        console.log(data[o].message); //메세지만 전부 꺼내기
    }
});
  • Return
    • 0
      • author
        • id
        • name
        • imageURL
        • hasMod //관리 권한을 가졌는지 (false / true)
      • message
      • time
    • 1
    • 2
    • 3
    • ...
chat.onDonation((data) => { //도네이션이 왔을 때
	console.log(data);

    for (let o in data) {
        console.log(data[o].amount); //후원 금액만 전부 꺼내기
    }
});
  • Return
    • 0
      • amount //후원 금액
      • author
        • id
        • name
        • imageURL
        • hasMod //관리 권한을 가졌는지 (false / true)
      • message
      • time
    • 1
    • 2
    • 3
    • ...
chat.onDisconnect(() => { //채팅창 연결이 끊겼을 때
	//TODO
});
await chat.send("ㅋㅋㅋㅋㅋㅋ"); //채팅 보내기 (login 후에만 가능)
let userInfo = await chat.getUserInfo("유저의 channelID 값");
  • Return
    • channelID
    • name
    • imageURL
    • role //ex. streamer
    • followDate //팔로우 날짜 ex. 2024-02-19 23:28:11
await chat.disconnect(); //채팅창 연결 끊기

video

const videoList = await buzzk.video.getList("channelID 값", 24); //channelID 값, 가져올 갯수
console.log(videoList);
  • Return
    • 0
      • no
      • id
      • title
      • category
      • duration
      • uploadOn
      • imageURL
      • trailerURL
    • 1
    • 2
    • 3
    • ...
const video = await buzzk.video.get("no 값"); //videoList 에서 return 된 no 값
console.log(video);
console.log(video.videoURL[720]);
  • Return
    • id
    • title
    • category
    • duration
    • uploadOn
    • startOn
    • imageURL
    • trailerURL
    • videoURL
      • 144
      • 720
      • 1080