New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0.0 to 2.0.1

29

index.js

@@ -35,31 +35,2 @@ const BASE_URL = 'http://mrbaro-youtube-api.glitch.me';

async getVideoInfo(value, callback) {
let videos, err;
if (callback) {
videos = await fetch(`${BASE_URL}/videos`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
v: value
})
})
.then(res => res.json());
if (videos.error) err = new Error(`BaroTube: ${videos.error}`);
return callback(err, videos[0]);
} else {
videos = await fetch(`${BASE_URL}/videos`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
v: value
})
})
.then(res => res.json());
if (videos.error) throw new Error(`BaroTube: ${videos.error}`);
return videos[0];
}
}
async getPlaylist(value, callback) {

@@ -66,0 +37,0 @@ let playlist, err;

2

package.json
{
"name": "barotube",
"version": "2.0.0",
"version": "2.0.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

@@ -57,26 +57,2 @@ # barotube

### **.getVideoInfo();**
```js
barotube.getVideoInfo('URL', function(err, data) {
if (err) throw err;
console.log(data);
});
```
* Results
>```js
>{
> title: '',
> videoId: '',
> url: '',
> duration: '',
> durationMs: 0,
> views: 0,
> author: {
> name: '',
> url: ''
> },
> thumbnail: ''
>}
>```
### **.getPlaylist();**

@@ -83,0 +59,0 @@ ```js

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