barotube

2.2.2 • Public • Published

BaroTube Module

BaroTube Module is a Node.js module used to interact with the BaroTube API.

Installation

To add the module to your project, you can use the following command:

npm install barotube-module

Usage

const BaroTube = require('barotube-module');

const myBaroTube = new BaroTube('my-api-key');

// Example of YouTube Video search
myBaroTube.searchVideos('YouTube URL', (err, videos) => {
  if (err) {
    console.error(err);
  } else {
    console.log(videos);
  }
});

// Example of getting a YouTube Playlist
myBaroTube.getPlaylist('YouTube URL', (err, playlist) => {
  if (err) {
    console.error(err);
  } else {
    console.log(playlist);
  }
});

Example searchVideo DATA

[
  {
    title: '',
    videoId: '',
    url: '',
    duration: '',
    durationMs: 0,
    views: 0,
    author: {
      name: '',
      url: ''
    },
    thumbnail: ''
  },
  {
    title: '',
    videoId: '',
    url: '',
    duration: '',
    durationMs: 0,
    views: 0,
    author: {
      name: '',
      url: ''
    },
    thumbnail: ''
  },
  and 8 more...
]

Example getPlaylist DATA

[
  {
    id: '',
    url: '',
    title: '',
    videos_size: '',
    views: 0,
    last_updated: '',
    author: {
      id: '',
      name: '',
      avatar: '',
      url: ''
    }
  },
  videos: [
    {
      title: '',
      videoId: '',
      url: '',
      duration: '',
      durationMs: 0,
      views: 0,
      author: {
        name: '',
        url: ''
      },
      thumbnail: ''
  },
  and more...
  ]
]

API Key

When creating an instance of the BaroTube class, you need to provide an API key. This key is used to authenticate with the BaroTube API.

To obtain your API key, you need to sign up on the BaroTube API website and generate a key.

License

This project is licensed under the MIT License. For more information, see the LICENSE file.

Package Sidebar

Install

npm i barotube

Homepage

in care

Weekly Downloads

13

Version

2.2.2

License

MIT

Unpacked Size

3.59 kB

Total Files

3

Last publish

Collaborators

  • mr-baro