조인천

base

Showing 1 changed file with 19 additions and 0 deletions
1 +var request = require('request');
2 +
3 +var optionParams = {
4 + q:"kakao",
5 + part:"snippet",
6 + key:"AIzaSyCgGa6aM7taXs4bajtYukbc_EQAKTLVTNc",
7 + maxResult2:5
8 +};
9 +var url = "https://www.googleapis.com/youtube/v3/search?";
10 +for (var option in optionParams)
11 +{
12 + url+=option+"="+optionParams[option]+"&";
13 +}
14 +
15 +url = url.substr(0,url.length-1);
16 +
17 +request(url, function(err,res,body){
18 + console.log(body)
19 +});
...\ No newline at end of file ...\ No newline at end of file