-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-reference.js
More file actions
42 lines (35 loc) · 1.07 KB
/
Copy pathapi-reference.js
File metadata and controls
42 lines (35 loc) · 1.07 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Gathered api call methods from YouTube API v3
var base_URL="https://www.googleapis.com/youtube/v3"
// Search for a particular topic
GET {base_URL}/search?part=snippet
// &topicId=/m/05z1_ Freebase id
&q=haul
&channelId={loopthroughids}
&type=video
&maxResults=50
&key={YOUR_API_KEY}
// Retreive a list of the channels you subscribe to
GET {base_URL}/subscriptions?part=snippet
&mine=true
// This request creates a new public playlist.
POST {base_URL}/playlists?part=snippet
Request body:
{
'snippet': {
'title': 'New playlist',
'description': 'Sample playlist for Data API',
}
}
// This request adds a video to the beginning of the playlist ('position': 0).
POST {base_URL}/playlistItems?part=snippet
Request body:
{
'snippet': {
'playlistId': '{PLAYLIST_ID}',
'resourceId': {
'kind': 'youtube#video',
'videoId': '{VIDEO_ID}'
}
'position': 0
}
}