Joe Gregorio | d67010d | 2012-11-05 08:57:06 -0500 | [diff] [blame^] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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.videos.html">videos</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#delete">delete(id, onBehalfOfContentOwner=None)</a></code></p> |
| 79 | <p class="firstline">Delete a YouTube video.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#insert">insert(part, body=None, media_body=None, onBehalfOfContentOwner=None)</a></code></p> |
| 82 | <p class="firstline">Upload a video to YouTube.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#list">list(id, part, onBehalfOfContentOwner=None)</a></code></p> |
| 85 | <p class="firstline">Browse the YouTube video collection.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#update">update(part, body, onBehalfOfContentOwner=None)</a></code></p> |
| 88 | <p class="firstline">Update a video.</p> |
| 89 | <h3>Method Details</h3> |
| 90 | <div class="method"> |
| 91 | <code class="details" id="delete">delete(id, onBehalfOfContentOwner=None)</code> |
| 92 | <pre>Delete a YouTube video. |
| 93 | |
| 94 | Args: |
| 95 | id: string, YouTube ID of the video to be deleted. (required) |
| 96 | onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner. |
| 97 | </pre> |
| 98 | </div> |
| 99 | |
| 100 | <div class="method"> |
| 101 | <code class="details" id="insert">insert(part, body=None, media_body=None, onBehalfOfContentOwner=None)</code> |
| 102 | <pre>Upload a video to YouTube. |
| 103 | |
| 104 | Args: |
| 105 | part: string, One or more parts to return on the current request. (required) |
| 106 | body: object, The request body. |
| 107 | The object takes the form of: |
| 108 | |
| 109 | { # A video resource represents a single YouTube video. |
| 110 | "status": { # The status of a video details the video's upload status and privacy status. # Status of the video upload, privacy status. |
| 111 | "privacyStatus": "A String", # Privacy of the video. |
| 112 | "uploadStatus": "A String", # Status of the video upload. |
| 113 | "rejectionReason": "A String", # Present only if the uploadStatus indicates a rejected upload. |
| 114 | "failureReason": "A String", # Present only if the uploadStatus indicates a failed upload. |
| 115 | }, |
| 116 | "topicDetails": { # Freebase topic information related to the video. # Topics related to the video |
| 117 | "topicIds": [ # List of topic ids for this video * |
| 118 | "A String", |
| 119 | ], |
| 120 | }, |
| 121 | "kind": "youtube#video", # The type of this API resource. |
| 122 | "statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # Statistics about the video: number of views, ratings. |
| 123 | "commentCount": "A String", # Number of comments for this video. |
| 124 | "viewCount": "A String", # Number of times the video was viewed. |
| 125 | "favoriteCount": "A String", # Number of times the video was added to a user's favorites list. |
| 126 | "dislikeCount": "A String", # Number of times the video was disliked. |
| 127 | "likeCount": "A String", # Number of times the video was liked. |
| 128 | }, |
| 129 | "contentDetails": { # Details about the media content of a YouTube video. # Information about the video content, media file. |
| 130 | "duration": "A String", # Duration of the video. |
| 131 | "regionRestriction": { # Region restriction of the video. |
| 132 | "blocked": [ # List of blocked region codes. |
| 133 | "A String", |
| 134 | ], |
| 135 | "allowed": [ # List of allowed region codes. |
| 136 | "A String", |
| 137 | ], |
| 138 | }, |
| 139 | }, |
| 140 | "snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails. |
| 141 | "thumbnails": { # Video thumbnails. |
| 142 | "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name. |
| 143 | "url": "A String", # The URL for the thumbnail. |
| 144 | }, |
| 145 | }, |
| 146 | "tags": [ # Textual tags associated with the video. |
| 147 | "A String", |
| 148 | ], |
| 149 | "channelId": "A String", # Channel publishing the video. |
| 150 | "publishedAt": "A String", # Date and time the video was published at. |
| 151 | "title": "A String", # Title of the video. |
| 152 | "categoryId": "A String", # Video category the video belongs to. |
| 153 | "description": "A String", # Description of the video. |
| 154 | }, |
| 155 | "player": { # Player to be used for a video playback. # Information used to play the video. |
| 156 | "embedHtml": "A String", # Iframe embed for the video. |
| 157 | }, |
| 158 | "etag": "A String", # The eTag of the video. |
| 159 | "id": "A String", # The unique id of the video. |
| 160 | } |
| 161 | |
| 162 | media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
| 163 | onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner. |
| 164 | |
| 165 | Returns: |
| 166 | An object of the form: |
| 167 | |
| 168 | { # A video resource represents a single YouTube video. |
| 169 | "status": { # The status of a video details the video's upload status and privacy status. # Status of the video upload, privacy status. |
| 170 | "privacyStatus": "A String", # Privacy of the video. |
| 171 | "uploadStatus": "A String", # Status of the video upload. |
| 172 | "rejectionReason": "A String", # Present only if the uploadStatus indicates a rejected upload. |
| 173 | "failureReason": "A String", # Present only if the uploadStatus indicates a failed upload. |
| 174 | }, |
| 175 | "topicDetails": { # Freebase topic information related to the video. # Topics related to the video |
| 176 | "topicIds": [ # List of topic ids for this video * |
| 177 | "A String", |
| 178 | ], |
| 179 | }, |
| 180 | "kind": "youtube#video", # The type of this API resource. |
| 181 | "statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # Statistics about the video: number of views, ratings. |
| 182 | "commentCount": "A String", # Number of comments for this video. |
| 183 | "viewCount": "A String", # Number of times the video was viewed. |
| 184 | "favoriteCount": "A String", # Number of times the video was added to a user's favorites list. |
| 185 | "dislikeCount": "A String", # Number of times the video was disliked. |
| 186 | "likeCount": "A String", # Number of times the video was liked. |
| 187 | }, |
| 188 | "contentDetails": { # Details about the media content of a YouTube video. # Information about the video content, media file. |
| 189 | "duration": "A String", # Duration of the video. |
| 190 | "regionRestriction": { # Region restriction of the video. |
| 191 | "blocked": [ # List of blocked region codes. |
| 192 | "A String", |
| 193 | ], |
| 194 | "allowed": [ # List of allowed region codes. |
| 195 | "A String", |
| 196 | ], |
| 197 | }, |
| 198 | }, |
| 199 | "snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails. |
| 200 | "thumbnails": { # Video thumbnails. |
| 201 | "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name. |
| 202 | "url": "A String", # The URL for the thumbnail. |
| 203 | }, |
| 204 | }, |
| 205 | "tags": [ # Textual tags associated with the video. |
| 206 | "A String", |
| 207 | ], |
| 208 | "channelId": "A String", # Channel publishing the video. |
| 209 | "publishedAt": "A String", # Date and time the video was published at. |
| 210 | "title": "A String", # Title of the video. |
| 211 | "categoryId": "A String", # Video category the video belongs to. |
| 212 | "description": "A String", # Description of the video. |
| 213 | }, |
| 214 | "player": { # Player to be used for a video playback. # Information used to play the video. |
| 215 | "embedHtml": "A String", # Iframe embed for the video. |
| 216 | }, |
| 217 | "etag": "A String", # The eTag of the video. |
| 218 | "id": "A String", # The unique id of the video. |
| 219 | }</pre> |
| 220 | </div> |
| 221 | |
| 222 | <div class="method"> |
| 223 | <code class="details" id="list">list(id, part, onBehalfOfContentOwner=None)</code> |
| 224 | <pre>Browse the YouTube video collection. |
| 225 | |
| 226 | Args: |
| 227 | id: string, YouTube IDs of the videos to be returned. (required) |
| 228 | part: string, Video parts to include in the returned response. Valid values are: id, snippet, contentDetails, player, statistics, status and topicDetails. (required) |
| 229 | onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner. |
| 230 | |
| 231 | Returns: |
| 232 | An object of the form: |
| 233 | |
| 234 | { # A paginated list of videos returned as the response to a youtube.videos.list call. |
| 235 | "items": [ # List of videos matching the request criteria. |
| 236 | { # A video resource represents a single YouTube video. |
| 237 | "status": { # The status of a video details the video's upload status and privacy status. # Status of the video upload, privacy status. |
| 238 | "privacyStatus": "A String", # Privacy of the video. |
| 239 | "uploadStatus": "A String", # Status of the video upload. |
| 240 | "rejectionReason": "A String", # Present only if the uploadStatus indicates a rejected upload. |
| 241 | "failureReason": "A String", # Present only if the uploadStatus indicates a failed upload. |
| 242 | }, |
| 243 | "topicDetails": { # Freebase topic information related to the video. # Topics related to the video |
| 244 | "topicIds": [ # List of topic ids for this video * |
| 245 | "A String", |
| 246 | ], |
| 247 | }, |
| 248 | "kind": "youtube#video", # The type of this API resource. |
| 249 | "statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # Statistics about the video: number of views, ratings. |
| 250 | "commentCount": "A String", # Number of comments for this video. |
| 251 | "viewCount": "A String", # Number of times the video was viewed. |
| 252 | "favoriteCount": "A String", # Number of times the video was added to a user's favorites list. |
| 253 | "dislikeCount": "A String", # Number of times the video was disliked. |
| 254 | "likeCount": "A String", # Number of times the video was liked. |
| 255 | }, |
| 256 | "contentDetails": { # Details about the media content of a YouTube video. # Information about the video content, media file. |
| 257 | "duration": "A String", # Duration of the video. |
| 258 | "regionRestriction": { # Region restriction of the video. |
| 259 | "blocked": [ # List of blocked region codes. |
| 260 | "A String", |
| 261 | ], |
| 262 | "allowed": [ # List of allowed region codes. |
| 263 | "A String", |
| 264 | ], |
| 265 | }, |
| 266 | }, |
| 267 | "snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails. |
| 268 | "thumbnails": { # Video thumbnails. |
| 269 | "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name. |
| 270 | "url": "A String", # The URL for the thumbnail. |
| 271 | }, |
| 272 | }, |
| 273 | "tags": [ # Textual tags associated with the video. |
| 274 | "A String", |
| 275 | ], |
| 276 | "channelId": "A String", # Channel publishing the video. |
| 277 | "publishedAt": "A String", # Date and time the video was published at. |
| 278 | "title": "A String", # Title of the video. |
| 279 | "categoryId": "A String", # Video category the video belongs to. |
| 280 | "description": "A String", # Description of the video. |
| 281 | }, |
| 282 | "player": { # Player to be used for a video playback. # Information used to play the video. |
| 283 | "embedHtml": "A String", # Iframe embed for the video. |
| 284 | }, |
| 285 | "etag": "A String", # The eTag of the video. |
| 286 | "id": "A String", # The unique id of the video. |
| 287 | }, |
| 288 | ], |
| 289 | "kind": "youtube#videoListResponse", # The type of this API response. |
| 290 | "etag": "A String", # The eTag of the response. |
| 291 | }</pre> |
| 292 | </div> |
| 293 | |
| 294 | <div class="method"> |
| 295 | <code class="details" id="update">update(part, body, onBehalfOfContentOwner=None)</code> |
| 296 | <pre>Update a video. |
| 297 | |
| 298 | Args: |
| 299 | part: string, One or more parts to return on the current request. (required) |
| 300 | body: object, The request body. (required) |
| 301 | The object takes the form of: |
| 302 | |
| 303 | { # A video resource represents a single YouTube video. |
| 304 | "status": { # The status of a video details the video's upload status and privacy status. # Status of the video upload, privacy status. |
| 305 | "privacyStatus": "A String", # Privacy of the video. |
| 306 | "uploadStatus": "A String", # Status of the video upload. |
| 307 | "rejectionReason": "A String", # Present only if the uploadStatus indicates a rejected upload. |
| 308 | "failureReason": "A String", # Present only if the uploadStatus indicates a failed upload. |
| 309 | }, |
| 310 | "topicDetails": { # Freebase topic information related to the video. # Topics related to the video |
| 311 | "topicIds": [ # List of topic ids for this video * |
| 312 | "A String", |
| 313 | ], |
| 314 | }, |
| 315 | "kind": "youtube#video", # The type of this API resource. |
| 316 | "statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # Statistics about the video: number of views, ratings. |
| 317 | "commentCount": "A String", # Number of comments for this video. |
| 318 | "viewCount": "A String", # Number of times the video was viewed. |
| 319 | "favoriteCount": "A String", # Number of times the video was added to a user's favorites list. |
| 320 | "dislikeCount": "A String", # Number of times the video was disliked. |
| 321 | "likeCount": "A String", # Number of times the video was liked. |
| 322 | }, |
| 323 | "contentDetails": { # Details about the media content of a YouTube video. # Information about the video content, media file. |
| 324 | "duration": "A String", # Duration of the video. |
| 325 | "regionRestriction": { # Region restriction of the video. |
| 326 | "blocked": [ # List of blocked region codes. |
| 327 | "A String", |
| 328 | ], |
| 329 | "allowed": [ # List of allowed region codes. |
| 330 | "A String", |
| 331 | ], |
| 332 | }, |
| 333 | }, |
| 334 | "snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails. |
| 335 | "thumbnails": { # Video thumbnails. |
| 336 | "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name. |
| 337 | "url": "A String", # The URL for the thumbnail. |
| 338 | }, |
| 339 | }, |
| 340 | "tags": [ # Textual tags associated with the video. |
| 341 | "A String", |
| 342 | ], |
| 343 | "channelId": "A String", # Channel publishing the video. |
| 344 | "publishedAt": "A String", # Date and time the video was published at. |
| 345 | "title": "A String", # Title of the video. |
| 346 | "categoryId": "A String", # Video category the video belongs to. |
| 347 | "description": "A String", # Description of the video. |
| 348 | }, |
| 349 | "player": { # Player to be used for a video playback. # Information used to play the video. |
| 350 | "embedHtml": "A String", # Iframe embed for the video. |
| 351 | }, |
| 352 | "etag": "A String", # The eTag of the video. |
| 353 | "id": "A String", # The unique id of the video. |
| 354 | } |
| 355 | |
| 356 | onBehalfOfContentOwner: string, The authenticated user acts on behalf of this content owner. |
| 357 | |
| 358 | Returns: |
| 359 | An object of the form: |
| 360 | |
| 361 | { # A video resource represents a single YouTube video. |
| 362 | "status": { # The status of a video details the video's upload status and privacy status. # Status of the video upload, privacy status. |
| 363 | "privacyStatus": "A String", # Privacy of the video. |
| 364 | "uploadStatus": "A String", # Status of the video upload. |
| 365 | "rejectionReason": "A String", # Present only if the uploadStatus indicates a rejected upload. |
| 366 | "failureReason": "A String", # Present only if the uploadStatus indicates a failed upload. |
| 367 | }, |
| 368 | "topicDetails": { # Freebase topic information related to the video. # Topics related to the video |
| 369 | "topicIds": [ # List of topic ids for this video * |
| 370 | "A String", |
| 371 | ], |
| 372 | }, |
| 373 | "kind": "youtube#video", # The type of this API resource. |
| 374 | "statistics": { # Statistics about the video, such as the number of times the video was viewed or liked. # Statistics about the video: number of views, ratings. |
| 375 | "commentCount": "A String", # Number of comments for this video. |
| 376 | "viewCount": "A String", # Number of times the video was viewed. |
| 377 | "favoriteCount": "A String", # Number of times the video was added to a user's favorites list. |
| 378 | "dislikeCount": "A String", # Number of times the video was disliked. |
| 379 | "likeCount": "A String", # Number of times the video was liked. |
| 380 | }, |
| 381 | "contentDetails": { # Details about the media content of a YouTube video. # Information about the video content, media file. |
| 382 | "duration": "A String", # Duration of the video. |
| 383 | "regionRestriction": { # Region restriction of the video. |
| 384 | "blocked": [ # List of blocked region codes. |
| 385 | "A String", |
| 386 | ], |
| 387 | "allowed": [ # List of allowed region codes. |
| 388 | "A String", |
| 389 | ], |
| 390 | }, |
| 391 | }, |
| 392 | "snippet": { # Basic details about a video, including title, description, uploader, thumbnails and category. # Basic details about the video: title, description, thumbnails. |
| 393 | "thumbnails": { # Video thumbnails. |
| 394 | "a_key": { # A thumbnail is an image representing a YouTube resource. # A map of thumbnails by their name. |
| 395 | "url": "A String", # The URL for the thumbnail. |
| 396 | }, |
| 397 | }, |
| 398 | "tags": [ # Textual tags associated with the video. |
| 399 | "A String", |
| 400 | ], |
| 401 | "channelId": "A String", # Channel publishing the video. |
| 402 | "publishedAt": "A String", # Date and time the video was published at. |
| 403 | "title": "A String", # Title of the video. |
| 404 | "categoryId": "A String", # Video category the video belongs to. |
| 405 | "description": "A String", # Description of the video. |
| 406 | }, |
| 407 | "player": { # Player to be used for a video playback. # Information used to play the video. |
| 408 | "embedHtml": "A String", # Iframe embed for the video. |
| 409 | }, |
| 410 | "etag": "A String", # The eTag of the video. |
| 411 | "id": "A String", # The unique id of the video. |
| 412 | }</pre> |
| 413 | </div> |
| 414 | |
| 415 | </body></html> |