Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

barotube

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

barotube - npm Package Compare versions

Comparing version 2.1.20 to 2.2.0

index.js

6

package.json
{
"name": "barotube",
"homepage": "*",
"version": "2.1.20",
"homepage": "in care",
"version": "2.2.0",
"type": "module",

@@ -28,4 +28,4 @@ "main": "index.mjs",

"dependencies": {
"node-fetch": "^3.3.1"
"axios": "^0.24.0"
}
}

@@ -1,98 +0,118 @@

# barotube
# BaroTube Module
## **Info**
In short, our module is a tool for extracting video and playlist information from the YouTube platform. Other than that, don't forget to generate the API key from our site. (:
BaroTube Module is a Node.js module used to interact with the BaroTube API.
## **Install**
```bash
npm install barotube
## Installation
To add the module to your project, you can use the following command:
```shell
npm install barotube-module
```
## **Usage**
```js
const Barotube = require('barotube');
const barotube = new Barotube("API KEY");
## Usage
```javascript
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);
}
});
```
### **.searchVideos();**
## Example **searchVideo** DATA
```js
barotube.searchVideos('URL or search args', function(err, data) {
if (err) throw err;
console.log(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...
]
```
* Results
>```js
> [
> {
> 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...
>]
>```
### **.getPlaylist();**
## Example **getPlaylist** DATA
```js
barotube.getPlaylist('only playlist URL or playlist ID', function(err, data) {
if (err) throw err;
console.log(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...
]
]
```
* Results
>```js
>[
> {
> 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](https://barotubeapi.cf) website and generate a key.
## License
This project is licensed under the MIT License. For more information, see the [LICENSE](LICENSE) file.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc