This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Workshop902", | |
"domains": [ | |
"workshop902.com", | |
"www.workshop902.com" | |
], | |
, "description": "Working code for workshop902.com" | |
, "version": "0.0.1" | |
, "private": false | |
, "author": "Alex Delany" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vids = _.keys(this.queue) | |
for (i = 0;i<vids.length;i+= 50){ | |
options = { | |
host: 'www.googleapis.com', | |
path: "/youtube/v3/videos?id=" | |
+ vids.slice(i,i+50).join(",") | |
+ "&part=statistics&fields=items&key=" | |
+ "AIzaSyBzaqm6tPr9knyq7uNYrEjIouMUvCave10" // api key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request = function(url, func ){ | |
setTimeout(function(){ | |
console.log("REQUEST", url, func); | |
func(); | |
}, 1); | |
} | |
function Source(url){ | |
this.url = url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Source(url){ | |
this.url = url; | |
this.morelinks = ['NO CHANGE']; | |
this.calculate = function(url){ | |
console.log("Calculating: " + this.url); | |
console.log('1: ' + this.morelinks) | |
var parse = function(err,resp,body){ | |
console.log('3: ' + this.morelinks) |