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

@micmac/youtube

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@micmac/youtube - npm Package Compare versions

Comparing version 1.6.2 to 2.0.0

55

main.js

@@ -38,4 +38,7 @@ // fonction searchVideos retourne les 10 dernières videos de la chaine beerus

};
var SearchThisVideo = {
videoDetails: function (_idVideo) {
var SearchThisVideo = function () {
this.videoParams = new Object();
};
SearchThisVideo.prototype = {
get: function (_idVideo, success, error) {
moment.locale('fr');

@@ -46,12 +49,42 @@ youtube.videos.list({

"maxResults": 1
}, function (err, response) {
}, function (err, res) {
if (err) {
var thisVideo = {'Error': err};
error(err);
}
if (response) {
console.log(response);
var thisVideo = response;
if (res) {
success(res);
}
return thisVideo;
});
}.bind(this));
},
getVideoDetails: function (_idVideo) {
this.get(_idVideo,
function (res) {
moment.locale('fr');
var resFR = res;
resFR.videoData.items[0].snippet.publishedAt = moment(resFR.videoData.items[0].snippet.publishedAt).format('LL');
return resFR;
},
function (err) {
console.log(err);
return err;
});
},
goToVideoPage: function (_idVideo, cssFile, _res, _adr) {
this.get(_idVideo,
function (res) {
moment.locale('fr');
res.data.items[0].snippet.publishedAt = moment(res.data.items[0].snippet.publishedAt).format('LL');
this.params = {
css: cssFile,
videoData: res
};
_res.render(_adr, {
params: this.params
});
console.log(this.params.videoData.data.items[0].id);
},
function (err) {
console.log(err);
return err;
});
}

@@ -61,4 +94,4 @@ };

module.exports = {
SearchThisVideo : SearchThisVideo.videoDetails(),
SearchVideos : SearchAlexVideos
SearchThisVideo: SearchThisVideo,
SearchVideos: SearchAlexVideos
};

@@ -65,0 +98,0 @@

2

package.json
{
"name": "@micmac/youtube",
"version": "1.6.2",
"version": "2.0.0",
"description": "utilisation api youtube data",

@@ -5,0 +5,0 @@ "main": "main.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