Comparing version 2.1.20 to 2.2.0
{ | ||
"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" | ||
} | ||
} |
194
README.md
@@ -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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
119
0
3610
31
+ Addedaxios@^0.24.0
+ Addedaxios@0.24.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
- Removednode-fetch@^3.3.1
- Removeddata-uri-to-buffer@4.0.1(transitive)
- Removedfetch-blob@3.2.0(transitive)
- Removedformdata-polyfill@4.0.10(transitive)
- Removednode-domexception@1.0.0(transitive)
- Removednode-fetch@3.3.2(transitive)
- Removedweb-streams-polyfill@3.3.3(transitive)