Netherworld's Pretend Minibar

    yt-toolkit

    1.3.6 • Public • Published

    Y-TK

    Contents

    About

    Y-TK is a module that helps to use youtube tools.

    • This module is not affiliated with youtube.

    Examples

    const YTK = require('yt-toolkit');
    const Query = new YTK.Query("Your Youtube API Key");
    
    Query.Search("Any Search", (Results) => {
        console.log(Results);
    });

    - Next Page Example

    Query.Search("Any Search", (Results) => {
        Results["Page"].Next((Results) => {
            console.log(Results);
        });
    });

    - Prev Page Example

    Query.Search("Any Search", (Results) => {
        Results["Page"].Next((Results) => {
            Results["Page"].Prev((Results) => {
                console.log(Results);
            });
        });
    });

    - Streaming Example

    const Downloader = new YTK.Downloader();
    
    Downloader.Video('Any Youtube Video Link or ID', (Stream) => {
        Stream.pipe(require('fs').createWriteStream('File.'+Stream["format"]));
    }, {
        Video: false,
    });
    Downloader.Playlist("Any Youtube Playlist Link or ID", (Array) => {
        Array.forEach((Stream) => {
            Stream.pipe(require('fs').createWriteStream(Stream["ID"]+"."+Stream["format"]));
        });
    }, {
        Video: false,
    });

    Install

    npm i yt-toolkit

    DownloadsWeekly Downloads

    7

    Version

    1.3.6

    License

    MIT

    Unpacked Size

    10.6 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar