728x90
detail๋์ฐ๊ธฐ
๊ฐ๊ณ
๋ฐ๊ณ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
const detail = (req, res) => {
const id = req.params.item;
console.log(id);
var url =
"https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCIB5sKY_tyFQ553zWeMetTA&order=date&maxResults=30&key=AIzaSyBEAYADAOB5U5jOFlXjuSkm3haz8hvcrgU";
function call(nextToken) {
var req = require("axios");
var pageToken = "";
if (nextToken) {
pageToken = "&pageToken=" + nextToken;
}
req.get(url + pageToken || "").then(ress => {
const items = ress.data.items;
for (var i = 0; i < items.length; i++) {
var vid = items[i].id.videoId;
if (vid == id) {
res.render("upload/detail", items[i]);
console.log(items[i]);
}
}
});
}
call();
};
|
cs |
for๋ฌธ์ผ๋ก ๋น๊ต๋ฐ์น๊ธฐ...ใ
728x90
'Develop Study ๐ป' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์ํ detail comment๋์ฐ๊ธฐ (0) | 2020.07.06 |
---|---|
์ํ ์๋ฌ๐ญ (0) | 2020.07.05 |
์ํ project - YouTube ์คํฌ๋กค๋ง (0) | 2020.07.02 |
์ค๋ฅ์ 99%์์ธ์ ์คํ ๋๋ฌธ (0) | 2020.06.22 |
Node.js ํ๋ก๊ทธ๋๋ฐ (0) | 2020.04.17 |