Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신지원
/
LineMusicChatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
엄민용
2021-05-31 15:47:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
196e2d95511a2dd392ce451a73cbd4f3bfc5d979
196e2d95
1 parent
2bb3f834
임시: 개인 인증 없이 API 키만 사용
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
Youtube API/video_lists.js
Youtube API/video_lists.js
0 → 100644
View file @
196e2d9
var
{
google
}
=
require
(
'googleapis'
);
var
service
=
google
.
youtube
(
'v3'
);
service
.
videos
.
list
({
key
:
'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518'
,
part
:
'snippet,statistics'
,
id
:
'p5iu1V30myk'
,
// 동영상 Id
fields
:
'items(snippet(title))'
},
function
(
err
,
response
)
{
if
(
err
)
{
console
.
log
(
'The API returned an error: '
,
err
);
return
;
}
var
video
=
response
.
data
.
items
;
if
(
video
.
length
==
0
){
console
.
log
(
'검색된 동영상이 없습니다.'
);
}
else
{
console
.
log
(
JSON
.
stringify
(
response
.
data
.
items
[
0
],
null
,
4
));
}
})
\ No newline at end of file
Please
register
or
login
to post a comment