1<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 Data API v3</a> . <a href="youtube_v3.captions.html">captions</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(id, onBehalfOf=None, onBehalfOfContentOwner=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Deletes a resource.</p> 83<p class="toc_element"> 84 <code><a href="#download">download(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Downloads a caption track.</p> 86<p class="toc_element"> 87 <code><a href="#download_media">download_media(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Downloads a caption track.</p> 89<p class="toc_element"> 90 <code><a href="#insert">insert(part, body=None, media_body=None, media_mime_type=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Inserts a new resource into this collection.</p> 92<p class="toc_element"> 93 <code><a href="#list">list(part, videoId, id=None, onBehalfOf=None, onBehalfOfContentOwner=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Retrieves a list of resources, possibly filtered.</p> 95<p class="toc_element"> 96 <code><a href="#update">update(part, body=None, media_body=None, media_mime_type=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Updates an existing resource.</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="close">close()</code> 101 <pre>Close httplib2 connections.</pre> 102</div> 103 104<div class="method"> 105 <code class="details" id="delete">delete(id, onBehalfOf=None, onBehalfOfContentOwner=None, x__xgafv=None)</code> 106 <pre>Deletes a resource. 107 108Args: 109 id: string, A parameter (required) 110 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of 111 onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. 112 x__xgafv: string, V1 error format. 113 Allowed values 114 1 - v1 error format 115 2 - v2 error format 116</pre> 117</div> 118 119<div class="method"> 120 <code class="details" id="download">download(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None, x__xgafv=None)</code> 121 <pre>Downloads a caption track. 122 123Args: 124 id: string, The ID of the caption track to download, required for One Platform. (required) 125 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of 126 onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. 127 tfmt: string, Convert the captions into this format. Supported options are sbv, srt, and vtt. 128 tlang: string, tlang is the language code; machine translate the captions into this language. 129 x__xgafv: string, V1 error format. 130 Allowed values 131 1 - v1 error format 132 2 - v2 error format 133</pre> 134</div> 135 136<div class="method"> 137 <code class="details" id="download_media">download_media(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None, x__xgafv=None)</code> 138 <pre>Downloads a caption track. 139 140Args: 141 id: string, The ID of the caption track to download, required for One Platform. (required) 142 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of 143 onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. 144 tfmt: string, Convert the captions into this format. Supported options are sbv, srt, and vtt. 145 tlang: string, tlang is the language code; machine translate the captions into this language. 146 x__xgafv: string, V1 error format. 147 Allowed values 148 1 - v1 error format 149 2 - v2 error format 150</pre> 151</div> 152 153<div class="method"> 154 <code class="details" id="insert">insert(part, body=None, media_body=None, media_mime_type=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, x__xgafv=None)</code> 155 <pre>Inserts a new resource into this collection. 156 157Args: 158 part: string, The *part* parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet. (required) (repeated) 159 body: object, The request body. 160 The object takes the form of: 161 162{ # A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video. 163 "etag": "A String", # Etag of this resource. 164 "id": "A String", # The ID that YouTube uses to uniquely identify the caption track. 165 "kind": "youtube#caption", # Identifies what kind of resource this is. Value: the fixed string "youtube#caption". 166 "snippet": { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption. 167 "audioTrackType": "A String", # The type of audio track associated with the caption track. 168 "failureReason": "A String", # The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. 169 "isAutoSynced": True or False, # Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. 170 "isCC": True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. 171 "isDraft": True or False, # Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update 172 "isEasyReader": True or False, # Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false. 173 "isLarge": True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false. 174 "language": "A String", # The language of the caption track. The property value is a BCP-47 language tag. 175 "lastUpdated": "A String", # The date and time when the caption track was last updated. 176 "name": "A String", # The name of the caption track. The name is intended to be visible to the user as an option during playback. 177 "status": "A String", # The caption track's status. 178 "trackKind": "A String", # The caption track's type. 179 "videoId": "A String", # The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert 180 }, 181} 182 183 media_body: string, The filename of the media request body, or an instance of a MediaUpload object. 184 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. 185 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of 186 onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. 187 sync: boolean, Extra parameter to allow automatically syncing the uploaded caption/transcript with the audio. 188 x__xgafv: string, V1 error format. 189 Allowed values 190 1 - v1 error format 191 2 - v2 error format 192 193Returns: 194 An object of the form: 195 196 { # A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video. 197 "etag": "A String", # Etag of this resource. 198 "id": "A String", # The ID that YouTube uses to uniquely identify the caption track. 199 "kind": "youtube#caption", # Identifies what kind of resource this is. Value: the fixed string "youtube#caption". 200 "snippet": { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption. 201 "audioTrackType": "A String", # The type of audio track associated with the caption track. 202 "failureReason": "A String", # The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. 203 "isAutoSynced": True or False, # Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. 204 "isCC": True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. 205 "isDraft": True or False, # Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update 206 "isEasyReader": True or False, # Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false. 207 "isLarge": True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false. 208 "language": "A String", # The language of the caption track. The property value is a BCP-47 language tag. 209 "lastUpdated": "A String", # The date and time when the caption track was last updated. 210 "name": "A String", # The name of the caption track. The name is intended to be visible to the user as an option during playback. 211 "status": "A String", # The caption track's status. 212 "trackKind": "A String", # The caption track's type. 213 "videoId": "A String", # The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert 214 }, 215}</pre> 216</div> 217 218<div class="method"> 219 <code class="details" id="list">list(part, videoId, id=None, onBehalfOf=None, onBehalfOfContentOwner=None, x__xgafv=None)</code> 220 <pre>Retrieves a list of resources, possibly filtered. 221 222Args: 223 part: string, The *part* parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet. (required) (repeated) 224 videoId: string, Returns the captions for the specified video. (required) 225 id: string, Returns the captions with the given IDs for Stubby or Apiary. (repeated) 226 onBehalfOf: string, ID of the Google+ Page for the channel that the request is on behalf of. 227 onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. 228 x__xgafv: string, V1 error format. 229 Allowed values 230 1 - v1 error format 231 2 - v2 error format 232 233Returns: 234 An object of the form: 235 236 { 237 "etag": "A String", # Etag of this resource. 238 "eventId": "A String", # Serialized EventId of the request which produced this response. 239 "items": [ # A list of captions that match the request criteria. 240 { # A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video. 241 "etag": "A String", # Etag of this resource. 242 "id": "A String", # The ID that YouTube uses to uniquely identify the caption track. 243 "kind": "youtube#caption", # Identifies what kind of resource this is. Value: the fixed string "youtube#caption". 244 "snippet": { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption. 245 "audioTrackType": "A String", # The type of audio track associated with the caption track. 246 "failureReason": "A String", # The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. 247 "isAutoSynced": True or False, # Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. 248 "isCC": True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. 249 "isDraft": True or False, # Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update 250 "isEasyReader": True or False, # Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false. 251 "isLarge": True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false. 252 "language": "A String", # The language of the caption track. The property value is a BCP-47 language tag. 253 "lastUpdated": "A String", # The date and time when the caption track was last updated. 254 "name": "A String", # The name of the caption track. The name is intended to be visible to the user as an option during playback. 255 "status": "A String", # The caption track's status. 256 "trackKind": "A String", # The caption track's type. 257 "videoId": "A String", # The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert 258 }, 259 }, 260 ], 261 "kind": "youtube#captionListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#captionListResponse". 262 "visitorId": "A String", # The visitorId identifies the visitor. 263}</pre> 264</div> 265 266<div class="method"> 267 <code class="details" id="update">update(part, body=None, media_body=None, media_mime_type=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, x__xgafv=None)</code> 268 <pre>Updates an existing resource. 269 270Args: 271 part: string, The *part* parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet. (required) (repeated) 272 body: object, The request body. 273 The object takes the form of: 274 275{ # A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video. 276 "etag": "A String", # Etag of this resource. 277 "id": "A String", # The ID that YouTube uses to uniquely identify the caption track. 278 "kind": "youtube#caption", # Identifies what kind of resource this is. Value: the fixed string "youtube#caption". 279 "snippet": { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption. 280 "audioTrackType": "A String", # The type of audio track associated with the caption track. 281 "failureReason": "A String", # The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. 282 "isAutoSynced": True or False, # Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. 283 "isCC": True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. 284 "isDraft": True or False, # Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update 285 "isEasyReader": True or False, # Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false. 286 "isLarge": True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false. 287 "language": "A String", # The language of the caption track. The property value is a BCP-47 language tag. 288 "lastUpdated": "A String", # The date and time when the caption track was last updated. 289 "name": "A String", # The name of the caption track. The name is intended to be visible to the user as an option during playback. 290 "status": "A String", # The caption track's status. 291 "trackKind": "A String", # The caption track's type. 292 "videoId": "A String", # The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert 293 }, 294} 295 296 media_body: string, The filename of the media request body, or an instance of a MediaUpload object. 297 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. 298 onBehalfOf: string, ID of the Google+ Page for the channel that the request is on behalf of. 299 onBehalfOfContentOwner: string, *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. 300 sync: boolean, Extra parameter to allow automatically syncing the uploaded caption/transcript with the audio. 301 x__xgafv: string, V1 error format. 302 Allowed values 303 1 - v1 error format 304 2 - v2 error format 305 306Returns: 307 An object of the form: 308 309 { # A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video. 310 "etag": "A String", # Etag of this resource. 311 "id": "A String", # The ID that YouTube uses to uniquely identify the caption track. 312 "kind": "youtube#caption", # Identifies what kind of resource this is. Value: the fixed string "youtube#caption". 313 "snippet": { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption. 314 "audioTrackType": "A String", # The type of audio track associated with the caption track. 315 "failureReason": "A String", # The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. 316 "isAutoSynced": True or False, # Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. 317 "isCC": True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. 318 "isDraft": True or False, # Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update 319 "isEasyReader": True or False, # Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false. 320 "isLarge": True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false. 321 "language": "A String", # The language of the caption track. The property value is a BCP-47 language tag. 322 "lastUpdated": "A String", # The date and time when the caption track was last updated. 323 "name": "A String", # The name of the caption track. The name is intended to be visible to the user as an option during playback. 324 "status": "A String", # The caption track's status. 325 "trackKind": "A String", # The caption track's type. 326 "videoId": "A String", # The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert 327 }, 328}</pre> 329</div> 330 331</body></html>