Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chatzzk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chatzzk

experimental chzzk chat r/o api

  • 0.1.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
38
increased by2.7%
Maintainers
1
Weekly downloads
 
Created
Source

chatzzk - Chzzk Chat API

Currently read-only. quite unstable.

Usage

Please pin a major version on your dependency, as API may change suddenly.

import Chzzk from 'https://unpkg.com/chatzzk@0.1/src/index.mjs'

const chatzzk = new Chatzzk('a9ab391cdd3faef4ca2ee782e96e5c59', {
  // timeout
  rpcTimeout: 1_000,
  // will log any message not handled by onmessage()
  logUnhandledMessage: false,
  // your own API proxy - required if CORS applied
  api: {
    liveStatus: uid => `https://example.com/live-status/${uid}`,
    accessToken: cid => `https://example.com/access-token/${cid}`
  }
})

c.on('message', payload => {
  // name color parsed & provided in paylaod.color
  console.log(chalk.hex(payload.color)(payload.profile.nickname), payload.msg)
})

Payload Types

See src/commands.mjs.

those types are called 'cmd' inside, and consist of 4+1-digit decimal numbers.

Notes about Closed API

API Proxies

Basically, on browser, Naver API will disallow your access with CORS policy. you may provide your own API proxy against this situation, or wait until full API opens.

Specify a function under options.api to return URL, that heads those endpoints:

  • liveStatus: https://api.chzzk.naver.com/polling/v2/channels/${uid}/live-status
  • accessToken: https://comm-api.game.naver.com/nng_main/v1/chats/access-token?channelId=${cid}&chatType=STREAMING

FAQs

Package last updated on 11 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc