1.1.1 • Published 1 year ago

@elara-services/youtube-videos v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Getting Started

const { YouTubeVideos } = require("@elara-services/youtube-videos"),
        youtube = new YouTubeVideos();

Add Creators

// Adding a single creator     
youtube.creators.add("UCzEnk4KWFlSj_PjXLz0"); // Adds the channelID to the 'data' set


// Bulk adding creators
youtube.creators.bulk([
    "UCzEnk4KWFlSj_PjXLz0",
    "UC....",
    "UC.....", 
]);
// Adds all of the channelIDs to the 'data' set.

Remove Creator

youtube.creators.remove("UCzEnk4KWFlSj_PjXLz0"); // Remove the channelID from the 'data' set

List Creators

youtube.creators.list(); // Returns an array of channelIDs

Set Interval/Search Minutes

youtube.setSearch(1); // The interval will be 1 minute
// DEFAULT: 2 minutes

Listen to video announcements

youtube.listen("video", async (channelID, videos) => {
    // Code to do whatever when a new video is found. 
    // channelID: the creator's channelID
    // videos: The array of videos found for the user.
});

Listen to searching creators for videos

youtube.listen("searching", async (channels) => {
    // Code to do whatever when this event gets triggered. 
    // Channels: the array of creator channelIDs
});

Start the process

youtube.run();

Get More Information for videos

const { util: { fetchVideos } } = require("@elara-services/youtube-videos");

// `[ ... ]` provide the video IDs in an array!
const videos = await fetchVideos([ ... ], "YOUTUBE_API_KEY");
// Array of videos found
1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago