@@ -9,20 +9,56 @@ and content.<br><br>
99This sample also updates the channel's
1010<code ><a href =" /youtube/v3/docs/channels#brandingSettings.channel.showBrowseView " >brandingSettings.channel.showBrowseView</a ></code >
1111property so that the channel displays content in a browse view (rather than a feed view). A channel's sections are only
12- visible if the channel displays content in a browse view.</ p >< p >More information on channel sections is available in the
12+ visible if the channel displays content in a browse view.<br >< br >More information on channel sections is available in the
1313<a href =" https://support.google.com/youtube/answer/3027787 " >YouTube Help Center</a >.
1414
15+ ### [ Add a channel subscription] ( /youtube/api-samples/blob/master/python/add_subscription.py )
16+
17+ Method: youtube.subscriptions.insert<br >
18+ Description: This sample calls the API's <code >subscriptions.insert</code > method to add a subscription to a specified
19+ channel.
20+
1521### [ Add a featured video] ( /youtube/api-samples/blob/master/python/add_featured_video.py )
1622
1723Method: youtube.channels.update<br >
1824Description: This sample calls the API's <code >channels.update</code > method to set <code >invideoPromotion</code >
1925properties for the channel.
2026
21- ### [ Add a channel subscription ] ( /youtube/api-samples/blob/master/python/add_subscription .py )
27+ ### [ Create a playlist ] ( /youtube/api-samples/blob/master/python/playlist_updates .py )
2228
23- Method: youtube.subscriptions.insert<br >
24- Description: This sample calls the API's <code >subscriptions.insert</code > method to add a subscription to a specified
25- channel.
29+ Method: youtube.playlists.insert<br >
30+ Description: This sample calls the API's <code >playlists.insert</code > method to create a private playlist owned by the
31+ channel authorizing the request.
32+
33+ ### [ Create and manage comments] ( /youtube/api-samples/blob/master/python/comment_handling.py )
34+
35+ Method: youtube.commentThreads.list, youtube.comments.insert, youtube.comments.list, youtube.comments.update,
36+ youtube.comments.setModerationStatus, youtube.comments.markAsSpam, youtube.comments.delete<br >
37+ Description: This sample demonstrates how to use the following API methods to create and manage comments:<br >
38+ <ul >
39+ <li >It calls the <code >commentThreads.list</code > method with the <code >videoId</code > parameter set to retrieve comments
40+ for a video.</li >
41+ <li >It calls the <code >comments.insert</code > method with the <code >parentId</code > parameter set to reply to an existing
42+ comment.</li >
43+ <li >It calls the <code >comments.list</code > method with the <code >parentId</code > parameter to retrieve the comments in the
44+ thread.</li >
45+ <li >It calls the <code >comments.update</code > method with comment in the request body to update a comment.</li >
46+ <li >It calls the <code >comments.setModerationStatus</code > method to set the moderation status of the comment, the
47+ <code >comments.markAsSpam</code > method to mark the comment as spam, and the <code >comments.delete</code > method to
48+ delete the comment, using the <code >id</code > parameter to identify the comment.</li ></ul >
49+
50+ ### [ Create and manage comment threads] ( /youtube/api-samples/blob/master/python/comment_threads.py )
51+
52+ Method: youtube.commentThreads.insert, youtube.commentThreads.list, youtube.commentThreads.update<br >
53+ Description: This sample demonstrates how to use the following API methods to create and manage top-level comments:<br >
54+ <ul >
55+ <li >It calls the <code >commentThreads.insert</code > method once with the <code >channelId</code > parameter to create a
56+ channel comment and once with the <code >videoId</code > parameter to create a video comment.</li >
57+ <li >It calls the <code >commentThreads.list</code > method once with the <code >channelId</code > parameter to retrieve
58+ channel comments and once with the <code >videoId</code > parameter to retrieve video comments.</li >
59+ <li >It calls the <code >commentThreads.update</code > method once to update a video comment and then again to update a
60+ channel comment. In each case, the request body contains the <code >comment</code > resource being updated.</li >
61+ </ul >
2662
2763### [ Create and manage YouTube video caption tracks] ( /youtube/api-samples/blob/master/python/captions.py )
2864
@@ -41,12 +77,46 @@ tracks.</li>
4177identify the caption track.</li >
4278</ul >
4379
80+ ### [ Like a video] ( /youtube/api-samples/blob/master/python/like_video.py )
81+
82+ Method: youtube.videos.rate<br >
83+ Description: This sample calls the API's <code >videos.rate</code > method to set a positive rating for a video.
84+
4485### [ Post a channel bulletin] ( /youtube/api-samples/blob/master/python/channel_bulletin.py )
4586
4687Method: youtube.activities.insert<br >
4788Description: This sample calls the API's <code >activities.insert</code > method to post a bulletin to the channel
4889associated with the request.
4990
91+ ### [ Remove a watermark image from a channel] ( /youtube/api-samples/blob/master/python/unset_watermark.py )
92+
93+ Method: youtube.watermarks.unset<br >
94+ Description: This sample calls the API's <code >watermarks.unset</code > method to remove the watermark
95+ image for a channel. The request must be authorized by the channel that owns the video.
96+
97+ ### [ Retrieve my uploads] ( /youtube/api-samples/blob/master/python/my_uploads.py )
98+
99+ Method: youtube.playlistItems.list<br >
100+ Description: This sample calls the API's <code >playlistItems.list</code > method to retrieve a list of videos uploaded
101+ to the channel associated with the request. The code also calls the <code >channels.list</code > method with the
102+ <code >mine</code > parameter set to <code >true</code > to retrieve the playlist ID that identifies the channel's uploaded
103+ videos.
104+
105+ ### [ Search by keyword] ( /youtube/api-samples/blob/master/python/search.py )
106+
107+ Method: youtube.search.list<br >
108+ Description: This sample calls the API's <code >search.list</code > method to retrieve search results associated with
109+ a particular keyword.
110+
111+ ### [ Search by location] ( /youtube/api-samples/blob/master/python/geolocation_search.py )
112+
113+ Method: youtube.search.list, youtube.videos.list<br >
114+ Description: This sample calls the API's <code >search.list</code > method with the <code >type</code >,
115+ <code >q</code >, <code >location</code >, and <code >locationRadius</code > parameters to retrieve search results
116+ matching the provided keyword within the radius centered at a particular location. Using the video ids from
117+ the search result, the sample calls the API's <code >videos.list</code > method to retrieve location details
118+ of each video.
119+
50120### [ Set and retrieve localized channel metadata] ( /youtube/api-samples/blob/master/python/channel_localizations.py )
51121
52122Method: youtube.channels.update, youtube.channels.list<br >
@@ -76,83 +146,6 @@ to retrieve localized metadata in that language.</li>
76146<code >part</code > parameter value to retrieve all of the localized metadata for that channel section.</li >
77147</ul >
78148
79- ### [ Create and manage comments] ( /youtube/api-samples/blob/master/python/comment_handling.py )
80-
81- Method: youtube.commentThreads.list, youtube.comments.insert, youtube.comments.list, youtube.comments.update,
82- youtube.comments.setModerationStatus, youtube.comments.markAsSpam, youtube.comments.delete<br >
83- Description: This sample demonstrates how to use the following API methods to create and manage comments:<br >
84- <ul >
85- <li >It calls the <code >commentThreads.list</code > method with the <code >videoId</code > parameter set to retrieve comments
86- for a video.</li >
87- <li >It calls the <code >comments.insert</code > method with the <code >parentId</code > parameter set to reply to an existing
88- comment.</li >
89- <li >It calls the <code >comments.list</code > method with the <code >parentId</code > parameter to retrieve the comments in the
90- thread.</li >
91- <li >It calls the <code >comments.update</code > method with comment in the request body to update a comment.</li >
92- <li >It calls the <code >comments.setModerationStatus</code > method to set the moderation status of the comment, the
93- <code >comments.markAsSpam</code > method to mark the comment as spam, and the <code >comments.delete</code > method to
94- delete the comment, using the <code >id</code > parameter to identify the comment.</li ></ul >
95-
96- ### [ Create and manage comment threads] ( /youtube/api-samples/blob/master/python/comment_threads.py )
97-
98- Method: youtube.commentThreads.insert, youtube.commentThreads.list, youtube.commentThreads.update<br >
99- Description: This sample demonstrates how to use the following API methods to create and manage top-level comments:<br >
100- <ul >
101- <li >It calls the <code >commentThreads.insert</code > method once with the <code >channelId</code > parameter to create a
102- channel comment and once with the <code >videoId</code > parameter to create a video comment.</li >
103- <li >It calls the <code >commentThreads.list</code > method once with the <code >channelId</code > parameter to retrieve
104- channel comments and once with the <code >videoId</code > parameter to retrieve video comments.</li >
105- <li >It calls the <code >commentThreads.update</code > method once to update a video comment and then again to update a
106- channel comment. In each case, the request body contains the <code >comment</code > resource being updated.</li >
107- </ul >
108-
109- ### [ Create a broadcast] ( /youtube/api-samples/blob/master/python/create_broadcast.py )
110-
111- Method: youtube.liveBroadcasts.bind,youtube.liveBroadcasts.insert,youtube.liveStreams.insert<br >
112- Description: This sample calls the API's <code >liveBroadcasts.insert</code > method to create a broadcast.
113-
114- ### [ Create a reporting job] ( /youtube/api-samples/blob/master/python/create_reporting_job.py )
115-
116- Method: youtubeReporting.reportTypes.list, youtubeReporting.jobs.create<br >
117- Description: This sample demonstrates how to create a reporting job. It calls the <code >reportTypes.list</code > method
118- to retrieve a list of available report types. It then calls the <code >jobs.create</code > method to create a new reporting
119- job.
120-
121- ### [ Search by geolocation] ( /youtube/api-samples/blob/master/python/geolocation_search.py )
122-
123- Method: youtube.search.list, youtube.videos.list<br >
124- Description: This sample calls the API's <code >search.list</code > method with the <code >type</code >,
125- <code >q</code >, <code >location</code >, and <code >locationRadius</code > parameters to retrieve search results
126- matching the provided keyword within the radius centered at a particular location. Using the video ids from
127- the search result, the sample calls the API's <code >videos.list</code > method to retrieve location details
128- of each video.
129-
130- ### [ Like a video] ( /youtube/api-samples/blob/master/python/like_video.py )
131-
132- Method: youtube.videos.rate<br >
133- Description: This sample calls the API's <code >videos.rate</code > method to set a positive rating for a video.
134-
135- ### [ Retrieve a channel's broadcasts] ( /youtube/api-samples/blob/master/python/list_broadcasts.py )
136-
137- Method: youtube.liveBroadcasts.list<br >
138- Description: This sample calls the API's <code >liveBroadcasts.list</code > method to retrieve a list of broadcasts for
139- the channel associated with the request. By default, the request retrieves all broadcasts for the channel, but you can
140- also specify a value for the <code >--broadcast-status</code > option to only retrieve broadcasts with a particular status.
141-
142- ### [ Retrieve a channel's live video streams] ( /youtube/api-samples/blob/master/python/list_streams.py )
143-
144- Method: youtube.liveStreams.list<br >
145- Description: This sample calls the API's <code >liveStreams.list</code > method to retrieve a list of video stream settings
146- that a channel can use to broadcast live events on YouTube.
147-
148- ### [ Retrieve my uploads] ( /youtube/api-samples/blob/master/python/my_uploads.py )
149-
150- Method: youtube.playlistItems.list<br >
151- Description: This sample calls the API's <code >playlistItems.list</code > method to retrieve a list of videos uploaded
152- to the channel associated with the request. The code also calls the <code >channels.list</code > method with the
153- <code >mine</code > parameter set to <code >true</code > to retrieve the playlist ID that identifies the channel's uploaded
154- videos.
155-
156149### [ Set and retrieve localized playlist metadata] ( /youtube/api-samples/blob/master/python/playlist_localizations.py )
157150
158151Method: youtube.playlists.update, youtube.playlists.list<br >
@@ -167,31 +160,19 @@ retrieve localized metadata in that language.</li>
167160parameter value to retrieve all of the localized metadata for that playlist.</li >
168161</ul >
169162
170- ### [ Create a playlist] ( /youtube/api-samples/blob/master/python/playlist_updates.py )
171-
172- Method: youtube.playlists.insert<br >
173- Description: This sample calls the API's <code >playlists.insert</code > method to create a private playlist owned by the
174- channel authorizing the request.
175-
176- ### [ Retrieve reports] ( /youtube/api-samples/blob/master/python/retrieve_reports.py )
177-
178- Method: youtubeReporting.jobs.list, youtubeReporting.reports.list<br >
179- Description: This sample demonstrates how to retrieve reports created by a specific job. It calls the
180- <code >jobs.list</code > method to retrieve reporting jobs. It then calls the <code >reports.list</code > method with the
181- <code >jobId</code > parameter set to a specific job id to retrieve reports created by that job. Finally, the sample
182- prints out the download URL for each report.
183-
184- ### [ Search by keyword] ( /youtube/api-samples/blob/master/python/search.py )
185-
186- Method: youtube.search.list<br >
187- Description: This sample calls the API's <code >search.list</code > method to retrieve search results associated with
188- a particular keyword.
189-
190- ### [ Upload a watermark image and set it for a channel] ( /youtube/api-samples/blob/master/python/set_watermark.py )
163+ ### [ Set and retrieve localized video metadata] ( /youtube/api-samples/blob/master/python/video_localizations.py )
191164
192- Method: youtube.watermarks.set<br >
193- Description: This sample calls the API's <code >watermarks.set</code > method to upload an image and set it as the
194- watermark image for a channel. The request must be authorized by the channel that owns the video.
165+ Method: youtube.videos.update, youtube.videos.list<br >
166+ Description: This sample demonstrates how to use the following API methods to set and retrieve localized metadata
167+ for a video:<br >
168+ <ul >
169+ <li >It calls the <code >videos.update</code > method to update the default language of a video's metadata and to add
170+ a localized version of this metadata in a selected language.</li >
171+ <li >It calls the <code >videos.list</code > method with the <code >hl</code > parameter set to a specific language to
172+ retrieve localized metadata in that language.</li >
173+ <li >It calls the <code >videos.list</code > method and includes <code >localizations</code > in the <code >part</code >
174+ parameter value to retrieve all of the localized metadata for that video.</li >
175+ </ul >
195176
196177### [ Shuffle existing channel sections] ( /youtube/api-samples/blob/master/python/shuffle_channel_sections.py )
197178
@@ -201,12 +182,6 @@ sections. Then it shuffles the list and calls <code>channelSections.update</code
201182More information on channel sections is available in the
202183<a href =" https://support.google.com/youtube/answer/3027787 " >YouTube Help Center</a >.
203184
204- ### [ Remove a watermark image from a channel] ( /youtube/api-samples/blob/master/python/unset_watermark.py )
205-
206- Method: youtube.watermarks.unset<br >
207- Description: This sample calls the API's <code >watermarks.unset</code > method to remove the watermark
208- image for a channel. The request must be authorized by the channel that owns the video.
209-
210185### [ Update a video] ( /youtube/api-samples/blob/master/python/update_video.py )
211186
212187Method: youtube.videos.update<br >
@@ -219,31 +194,41 @@ Method: youtube.channelBanners.insert, youtube.channels.update<br>
219194Description: This sample calls the API's <code >channelBanners.insert</code > method to upload an image. With the
220195returned URL, the sample calls <code >channels.update</code > method to update the channel's banner to that image.
221196
197+ ### [ Upload a video] ( /youtube/api-samples/blob/master/python/upload_video.py )
198+
199+ Method: youtube.videos.insert<br >
200+ Description: This sample calls the API's <code >videos.insert</code > method to upload a video to the channel associated
201+ with the request.
202+
222203### [ Upload a video thumbnail image] ( /youtube/api-samples/blob/master/python/upload_thumbnail.py )
223204
224205Method: youtube.thumbnails.set<br >
225206Description: This sample calls the API's <code >thumbnails.set</code > method to upload an image and set it as the
226207thumbnail image for a video. The request must be authorized by the channel that owns the video.
227208
228- ### [ Upload a video ] ( /youtube/api-samples/blob/master/python/upload_video .py )
209+ ### [ Upload a watermark image and set it for a channel ] ( /youtube/api-samples/blob/master/python/set_watermark .py )
229210
230- Method: youtube.videos.insert <br >
231- Description: This sample calls the API's <code >videos.insert </code > method to upload a video to the channel associated
232- with the request.
211+ Method: youtube.watermarks.set <br >
212+ Description: This sample calls the API's <code >watermarks.set </code > method to upload an image and set it as the
213+ watermark image for a channel. The request must be authorized by the channel that owns the video .
233214
234- ### [ Set and retrieve localized video metadata ] ( /youtube/api-samples/blob/master/python/video_localizations .py )
215+ ### [ Create a broadcast ] ( /youtube/api-samples/blob/master/python/create_broadcast .py )
235216
236- Method: youtube.videos.update, youtube.videos.list<br >
237- Description: This sample demonstrates how to use the following API methods to set and retrieve localized metadata
238- for a video:<br >
239- <ul >
240- <li >It calls the <code >videos.update</code > method to update the default language of a video's metadata and to add
241- a localized version of this metadata in a selected language.</li >
242- <li >It calls the <code >videos.list</code > method with the <code >hl</code > parameter set to a specific language to
243- retrieve localized metadata in that language.</li >
244- <li >It calls the <code >videos.list</code > method and includes <code >localizations</code > in the <code >part</code >
245- parameter value to retrieve all of the localized metadata for that video.</li >
246- </ul >
217+ Method: youtube.liveBroadcasts.bind,youtube.liveBroadcasts.insert,youtube.liveStreams.insert<br >
218+ Description: This sample calls the API's <code >liveBroadcasts.insert</code > method to create a broadcast.
219+
220+ ### [ Retrieve a channel's broadcasts] ( /youtube/api-samples/blob/master/python/list_broadcasts.py )
221+
222+ Method: youtube.liveBroadcasts.list<br >
223+ Description: This sample calls the API's <code >liveBroadcasts.list</code > method to retrieve a list of broadcasts for
224+ the channel associated with the request. By default, the request retrieves all broadcasts for the channel, but you can
225+ also specify a value for the <code >--broadcast-status</code > option to only retrieve broadcasts with a particular status.
226+
227+ ### [ Retrieve a channel's live video streams] ( /youtube/api-samples/blob/master/python/list_streams.py )
228+
229+ Method: youtube.liveStreams.list<br >
230+ Description: This sample calls the API's <code >liveStreams.list</code > method to retrieve a list of video stream settings
231+ that a channel can use to broadcast live events on YouTube.
247232
248233### [ Retrieve top 10 videos by viewcount] ( /youtube/api-samples/blob/master/python/yt_analytics_report.py )
249234
@@ -252,3 +237,18 @@ Description: This sample calls the API's <code>reports.query</code> method to re
252237By default, the report retrieves the top 10 videos based on viewcounts, and it returns several metrics for those
253238videos, sorting the results in reverse order by viewcount. By setting command line parameters, you can use the
254239same code to retrieve other reports as well.
240+
241+ ### [ Create a reporting job] ( /youtube/api-samples/blob/master/python/create_reporting_job.py )
242+
243+ Method: youtubeReporting.reportTypes.list, youtubeReporting.jobs.create<br >
244+ Description: This sample demonstrates how to create a reporting job. It calls the <code >reportTypes.list</code > method
245+ to retrieve a list of available report types. It then calls the <code >jobs.create</code > method to create a new reporting
246+ job.
247+
248+ ### [ Retrieve reports] ( /youtube/api-samples/blob/master/python/retrieve_reports.py )
249+
250+ Method: youtubeReporting.jobs.list, youtubeReporting.reports.list<br >
251+ Description: This sample demonstrates how to retrieve reports created by a specific job. It calls the
252+ <code >jobs.list</code > method to retrieve reporting jobs. It then calls the <code >reports.list</code > method with the
253+ <code >jobId</code > parameter set to a specific job id to retrieve reports created by that job. Finally, the sample
254+ prints out the download URL for each report.
0 commit comments