blob: 6f8b930418f446c449734a1f333e7a74b2be2a3f [file] [log] [blame]
Joe Gregoriod67010d2012-11-05 08:57:06 -05001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="youtube_v3.html">YouTube API</a> . <a href="youtube_v3.activities.html">activities</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#insert">insert(part, body, onBehalfOfContentOwner=None)</a></code></p>
79<p class="firstline">Post a channel bulletin.</p>
80<p class="toc_element">
81 <code><a href="#list">list(part, onBehalfOfContentOwner=None, pageToken=None, publishedBefore=None, channelId=None, mine=None, maxResults=None, home=None, publishedAfter=None)</a></code></p>
82<p class="firstline">Browse the YouTube channel activity collection.</p>
83<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
88 <code class="details" id="insert">insert(part, body, onBehalfOfContentOwner=None)</code>
89 <pre>Post a channel bulletin.
90
91Args:
92 part: string, One or more parts to return on the current request. (required)
93 body: object, The request body. (required)
94 The object takes the form of:
95
96{ # An activity resource contains information about an action that a channel has taken on YouTube.
97 "snippet": { # Basic details about an activity, including title, description, thumbnails, activity type and group. # Basic details about the activity: title, description, thumbnails.
98 "thumbnails": { # Activity thumbnails.
99 "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
100 "url": "A String", # The URL for the thumbnail.
101 },
102 },
103 "title": "A String", # Title of the activity.
104 "channelId": "A String", # Channel publishing the activity.
105 "publishedAt": "A String", # Date and time the activity was published at.
106 "type": "A String", # Type of the activity.
107 "groupId": "A String", # Id of the group that this activity is part of.
108 "description": "A String", # Description of the activity.
109 },
110 "contentDetails": { # Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc. # Type specific information about the activity.
111 "comment": { # Only present if the type is "comment".
112 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the commented resource.
113 "kind": "A String", # The kind of the referred resource.
114 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
115 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
116 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
117 },
118 },
119 "playlistItem": { # Only present if the type is "playlistItem".
120 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource added to the playlist.
121 "kind": "A String", # The kind of the referred resource.
122 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
123 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
124 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
125 },
126 "playlistId": "A String", # ID of the playlist the resource was added to.
127 },
128 "like": { # Only present if the type is "like".
129 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the rated resource.
130 "kind": "A String", # The kind of the referred resource.
131 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
132 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
133 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
134 },
135 },
136 "social": { # Only present if the type is "social".
137 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource this social activity is about.
138 "kind": "A String", # The kind of the referred resource.
139 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
140 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
141 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
142 },
143 "imageUrl": "A String", # Image of the post author.
144 "type": "A String", # Type of the social network.
145 "referenceUrl": "A String", # Url of the social post.
146 "author": "A String", # Author of the post.
147 },
148 "favorite": { # Only present if the type is "favorite".
149 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the favorited resource.
150 "kind": "A String", # The kind of the referred resource.
151 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
152 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
153 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
154 },
155 },
156 "upload": { # Only present if the type is "upload".
157 "videoId": "A String", # ID of the uploaded video.
158 },
159 "recommendation": { # Only set if the type is "recommendation".
160 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the recommended resource.
161 "kind": "A String", # The kind of the referred resource.
162 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
163 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
164 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
165 },
166 "reason": "A String", # Reason for which the video was recommended.
167 "seedResourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the video that caused this recommendation.
168 "kind": "A String", # The kind of the referred resource.
169 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
170 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
171 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
172 },
173 },
174 "bulletin": { # Only present if the type is "bulletin".
175 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource this bulletin is about.
176 "kind": "A String", # The kind of the referred resource.
177 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
178 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
179 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
180 },
181 },
182 "subscription": { # Only present if the type is "subscription".
183 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource subscribed to.
184 "kind": "A String", # The kind of the referred resource.
185 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
186 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
187 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
188 },
189 },
190 },
191 "kind": "youtube#activity", # The type of this API response.
192 "etag": "A String", # The eTag of the activity.
193 "id": "A String", # The unique ID of the activity.
194 }
195
196 onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
197
198Returns:
199 An object of the form:
200
201 { # An activity resource contains information about an action that a channel has taken on YouTube.
202 "snippet": { # Basic details about an activity, including title, description, thumbnails, activity type and group. # Basic details about the activity: title, description, thumbnails.
203 "thumbnails": { # Activity thumbnails.
204 "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
205 "url": "A String", # The URL for the thumbnail.
206 },
207 },
208 "title": "A String", # Title of the activity.
209 "channelId": "A String", # Channel publishing the activity.
210 "publishedAt": "A String", # Date and time the activity was published at.
211 "type": "A String", # Type of the activity.
212 "groupId": "A String", # Id of the group that this activity is part of.
213 "description": "A String", # Description of the activity.
214 },
215 "contentDetails": { # Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc. # Type specific information about the activity.
216 "comment": { # Only present if the type is "comment".
217 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the commented resource.
218 "kind": "A String", # The kind of the referred resource.
219 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
220 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
221 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
222 },
223 },
224 "playlistItem": { # Only present if the type is "playlistItem".
225 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource added to the playlist.
226 "kind": "A String", # The kind of the referred resource.
227 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
228 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
229 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
230 },
231 "playlistId": "A String", # ID of the playlist the resource was added to.
232 },
233 "like": { # Only present if the type is "like".
234 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the rated resource.
235 "kind": "A String", # The kind of the referred resource.
236 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
237 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
238 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
239 },
240 },
241 "social": { # Only present if the type is "social".
242 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource this social activity is about.
243 "kind": "A String", # The kind of the referred resource.
244 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
245 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
246 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
247 },
248 "imageUrl": "A String", # Image of the post author.
249 "type": "A String", # Type of the social network.
250 "referenceUrl": "A String", # Url of the social post.
251 "author": "A String", # Author of the post.
252 },
253 "favorite": { # Only present if the type is "favorite".
254 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the favorited resource.
255 "kind": "A String", # The kind of the referred resource.
256 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
257 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
258 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
259 },
260 },
261 "upload": { # Only present if the type is "upload".
262 "videoId": "A String", # ID of the uploaded video.
263 },
264 "recommendation": { # Only set if the type is "recommendation".
265 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the recommended resource.
266 "kind": "A String", # The kind of the referred resource.
267 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
268 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
269 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
270 },
271 "reason": "A String", # Reason for which the video was recommended.
272 "seedResourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the video that caused this recommendation.
273 "kind": "A String", # The kind of the referred resource.
274 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
275 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
276 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
277 },
278 },
279 "bulletin": { # Only present if the type is "bulletin".
280 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource this bulletin is about.
281 "kind": "A String", # The kind of the referred resource.
282 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
283 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
284 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
285 },
286 },
287 "subscription": { # Only present if the type is "subscription".
288 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource subscribed to.
289 "kind": "A String", # The kind of the referred resource.
290 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
291 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
292 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
293 },
294 },
295 },
296 "kind": "youtube#activity", # The type of this API response.
297 "etag": "A String", # The eTag of the activity.
298 "id": "A String", # The unique ID of the activity.
299 }</pre>
300</div>
301
302<div class="method">
303 <code class="details" id="list">list(part, onBehalfOfContentOwner=None, pageToken=None, publishedBefore=None, channelId=None, mine=None, maxResults=None, home=None, publishedAfter=None)</code>
304 <pre>Browse the YouTube channel activity collection.
305
306Args:
307 part: string, Activity parts to include in the returned response. Valid values are: id, snippet and contentDetails. (required)
308 onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner.
309 pageToken: string, Token for the page selection.
310 publishedBefore: string, Only return activities published before given date (exclusive).
311 channelId: string, YouTube ID of the channel.
312 mine: string, Flag indicating to return user's activities.
313 maxResults: integer, Maximum number of results to return
314 home: string, Flag indicating to return user's homepage feed.
315 publishedAfter: string, Only return activities published after given date (inclusive).
316
317Returns:
318 An object of the form:
319
320 { # A paginated list of activities returned as a response to youtube.activities.list calls.
321 "nextPageToken": "A String", # Token to the next page.
322 "kind": "youtube#activityListResponse", # The type of this API response.
323 "items": [ # List of activities matching the request criteria.
324 { # An activity resource contains information about an action that a channel has taken on YouTube.
325 "snippet": { # Basic details about an activity, including title, description, thumbnails, activity type and group. # Basic details about the activity: title, description, thumbnails.
326 "thumbnails": { # Activity thumbnails.
327 "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name.
328 "url": "A String", # The URL for the thumbnail.
329 },
330 },
331 "title": "A String", # Title of the activity.
332 "channelId": "A String", # Channel publishing the activity.
333 "publishedAt": "A String", # Date and time the activity was published at.
334 "type": "A String", # Type of the activity.
335 "groupId": "A String", # Id of the group that this activity is part of.
336 "description": "A String", # Description of the activity.
337 },
338 "contentDetails": { # Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc. # Type specific information about the activity.
339 "comment": { # Only present if the type is "comment".
340 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the commented resource.
341 "kind": "A String", # The kind of the referred resource.
342 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
343 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
344 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
345 },
346 },
347 "playlistItem": { # Only present if the type is "playlistItem".
348 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource added to the playlist.
349 "kind": "A String", # The kind of the referred resource.
350 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
351 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
352 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
353 },
354 "playlistId": "A String", # ID of the playlist the resource was added to.
355 },
356 "like": { # Only present if the type is "like".
357 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the rated resource.
358 "kind": "A String", # The kind of the referred resource.
359 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
360 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
361 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
362 },
363 },
364 "social": { # Only present if the type is "social".
365 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource this social activity is about.
366 "kind": "A String", # The kind of the referred resource.
367 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
368 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
369 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
370 },
371 "imageUrl": "A String", # Image of the post author.
372 "type": "A String", # Type of the social network.
373 "referenceUrl": "A String", # Url of the social post.
374 "author": "A String", # Author of the post.
375 },
376 "favorite": { # Only present if the type is "favorite".
377 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the favorited resource.
378 "kind": "A String", # The kind of the referred resource.
379 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
380 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
381 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
382 },
383 },
384 "upload": { # Only present if the type is "upload".
385 "videoId": "A String", # ID of the uploaded video.
386 },
387 "recommendation": { # Only set if the type is "recommendation".
388 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the recommended resource.
389 "kind": "A String", # The kind of the referred resource.
390 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
391 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
392 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
393 },
394 "reason": "A String", # Reason for which the video was recommended.
395 "seedResourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the video that caused this recommendation.
396 "kind": "A String", # The kind of the referred resource.
397 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
398 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
399 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
400 },
401 },
402 "bulletin": { # Only present if the type is "bulletin".
403 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource this bulletin is about.
404 "kind": "A String", # The kind of the referred resource.
405 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
406 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
407 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
408 },
409 },
410 "subscription": { # Only present if the type is "subscription".
411 "resourceId": { # A resource id is a generic reference that points to another YouTube resource. # ID of the resource subscribed to.
412 "kind": "A String", # The kind of the referred resource.
413 "channelId": "A String", # ID of the referred channel. Present only when type is "CHANNEL".
414 "playlistId": "A String", # ID of the referred playlist. Present only when type is "PLAYLIST".
415 "videoId": "A String", # ID of the referred video. Present only when type is "VIDEO".
416 },
417 },
418 },
419 "kind": "youtube#activity", # The type of this API response.
420 "etag": "A String", # The eTag of the activity.
421 "id": "A String", # The unique ID of the activity.
422 },
423 ],
424 "etag": "A String", # The eTag of the response.
425 "prevPageToken": "A String", # Token to the previous page.
426 "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. # Paging information for the list result.
427 "totalResults": 42, # The total number of results.
428 "resultsPerPage": 42, # The number of results to display for each page.
429 },
430 }</pre>
431</div>
432
433<div class="method">
434 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
435 <pre>Retrieves the next page of results.
436
437Args:
438 previous_request: The request for the previous page. (required)
439 previous_response: The response from the request for the previous page. (required)
440
441Returns:
442 A request object that you can call 'execute()' on to request the next
443 page. Returns None if there are no more items in the collection.
444 </pre>
445</div>
446
447</body></html>