Class CaptionsResource.DownloadRequest
Downloads a caption track.
Inheritance
Inherited Members
Namespace: Google.Apis.YouTube.v3
Assembly: Google.Apis.YouTube.v3.dll
Syntax
public class CaptionsResource.DownloadRequest : YouTubeBaseServiceRequest<string>, IClientServiceRequest<string>, IClientServiceRequestConstructors
DownloadRequest(IClientService, string)
Constructs a new Download request.
Declaration
public DownloadRequest(IClientService service, string id)Parameters
| Type | Name | Description | 
|---|---|---|
| IClientService | service | |
| string | id | 
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
Id
The ID of the caption track to download, required for One Platform.
Declaration
[RequestParameter("id", RequestParameterType.Path)]
public virtual string Id { get; }Property Value
| Type | Description | 
|---|---|
| string | 
MediaDownloader
Gets the media downloader.
Declaration
public IMediaDownloader MediaDownloader { get; }Property Value
| Type | Description | 
|---|---|
| IMediaDownloader | 
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
OnBehalfOf
ID of the Google+ Page for the channel that the request is be on behalf of
Declaration
[RequestParameter("onBehalfOf", RequestParameterType.Query)]
public virtual string OnBehalfOf { get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
OnBehalfOfContentOwner
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.
Declaration
[RequestParameter("onBehalfOfContentOwner", RequestParameterType.Query)]
public virtual string OnBehalfOfContentOwner { get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
Tfmt
Convert the captions into this format. Supported options are sbv, srt, and vtt.
Declaration
[RequestParameter("tfmt", RequestParameterType.Query)]
public virtual string Tfmt { get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
Tlang
tlang is the language code; machine translate the captions into this language.
Declaration
[RequestParameter("tlang", RequestParameterType.Query)]
public virtual string Tlang { get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
Methods
Download(Stream)
Synchronously download the media into the given stream.
Warning: This method hides download errors; use DownloadWithStatus(Stream) instead.
Declaration
public virtual void Download(Stream stream)Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | 
Remarks
This method uses the MediaDownloader property to perform the download. Progress event handlers and other configuration may be performed using that property prior to calling this method.
DownloadAsync(Stream)
Asynchronously download the media into the given stream.
Declaration
public virtual Task<IDownloadProgress> DownloadAsync(Stream stream)Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | 
Returns
| Type | Description | 
|---|---|
| Task<IDownloadProgress> | 
Remarks
This method uses the MediaDownloader property to perform the download. Progress event handlers and other configuration may be performed using that property prior to calling this method.
DownloadAsync(Stream, CancellationToken)
Asynchronously download the media into the given stream.
Declaration
public virtual Task<IDownloadProgress> DownloadAsync(Stream stream, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | |
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<IDownloadProgress> | 
Remarks
This method uses the MediaDownloader property to perform the download. Progress event handlers and other configuration may be performed using that property prior to calling this method.
DownloadRange(Stream, RangeHeaderValue)
Synchronously download a range of the media into the given stream.
Declaration
public virtual IDownloadProgress DownloadRange(Stream stream, RangeHeaderValue range)Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | |
| RangeHeaderValue | range | 
Returns
| Type | Description | 
|---|---|
| IDownloadProgress | 
Remarks
This method uses the MediaDownloader property to perform the download. Progress event handlers and other configuration may be performed using that property prior to calling this method.
DownloadRangeAsync(Stream, RangeHeaderValue, CancellationToken)
Asynchronously download a range of the media into the given stream.
Declaration
public virtual Task<IDownloadProgress> DownloadRangeAsync(Stream stream, RangeHeaderValue range, CancellationToken cancellationToken = default)Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | |
| RangeHeaderValue | range | |
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<IDownloadProgress> | 
Remarks
This method uses the MediaDownloader property to perform the download. Progress event handlers and other configuration may be performed using that property prior to calling this method.
DownloadWithStatus(Stream)
Synchronously download the media into the given stream.
Declaration
public virtual IDownloadProgress DownloadWithStatus(Stream stream)Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | 
Returns
| Type | Description | 
|---|---|
| IDownloadProgress | The final status of the download; including whether the download succeeded or failed. | 
Remarks
This method uses the MediaDownloader property to perform the download. Progress event handlers and other configuration may be performed using that property prior to calling this method.
InitParameters()
Initializes Download parameter list.
Declaration
protected override void InitParameters()