aviso-yt
v0.1.0
Published
Librería para facilitar la suscripción a canales de youtube
Downloads
30
Maintainers
Readme
Nota: el puerto que usarás tiene que ser accesible desde internet
Ejemplo
const youtube = require("aviso-yt");
let cliente = new youtube.Client( "/aviso-youtube/callback", {port: 80});;
cliente.on("NuevoVideo", (video) => {
console.log(`Nuevo video de ${video.usuario_canal}: ${video.canal}. ${video.link}`);
});
cliente.interactuar("LINK_CANAL", "suscribir", "TU IP O URL");
Ejemplo con app existente
const express = require("express");
const app = express();
const youtube = require("aviso-yt");
app.listen(80);
let cliente = new yt.Client( "/aviso-youtube/callback", {app: app});
cliente.on("NuevoVideo", (video) => {
console.log(`Nuevo video de ${video.usuario_canal}: ${video.canal}. ${video.link}`);
});
cliente.interactuar("LINK_CANAL", "suscribir", "TU IP O URL");