1.0.2 • Published 5 years ago

youtube-chat-api v1.0.2

Weekly downloads
5
License
AGPL-3.0-or-later
Repository
github
Last release
5 years ago

youtube-chat-api

license

AGPL-3.0-or-later

API

import YoutubeChatAPI from 'youtube-chat-api'

const YoutubeChat = new YoutubeChatAPI(liveChatId: string, interval: number, APIKey: string, UserToken: string)

YoutubeChat.run()

YoutubeChat.on('message', (value) => {
    if (value.snippet.type === 'textMessageEvent') {
        console.log(value.snippet.textMessageDetails.messageText)
    }
})

YoutubeChat.on('stop', () => {
    console.log('youtube live chat read stopped')
})

YoutubeChat.send('Hello!')

this library can use Node.js, with ES5 or TypeScript

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago