Show / Hide Table of Contents

Class CaptionsResource.DownloadRequest

Downloads a caption track.

Inheritance
System.Object
ClientServiceRequest
ClientServiceRequest<System.String>
YouTubeBaseServiceRequest<System.String>
CaptionsResource.DownloadRequest
Implements
IClientServiceRequest<System.String>
IClientServiceRequest
Inherited Members
YouTubeBaseServiceRequest<String>.Xgafv
YouTubeBaseServiceRequest<String>.AccessToken
YouTubeBaseServiceRequest<String>.Alt
YouTubeBaseServiceRequest<String>.Callback
YouTubeBaseServiceRequest<String>.Fields
YouTubeBaseServiceRequest<String>.Key
YouTubeBaseServiceRequest<String>.OauthToken
YouTubeBaseServiceRequest<String>.PrettyPrint
YouTubeBaseServiceRequest<String>.QuotaUser
YouTubeBaseServiceRequest<String>.UploadType
YouTubeBaseServiceRequest<String>.UploadProtocol
ClientServiceRequest<String>.Execute()
ClientServiceRequest<String>.ExecuteAsStream()
ClientServiceRequest<String>.ExecuteAsync()
ClientServiceRequest<String>.ExecuteAsync(CancellationToken)
ClientServiceRequest<String>.ExecuteAsStreamAsync()
ClientServiceRequest<String>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<String>.CreateRequest(Nullable<Boolean>)
ClientServiceRequest<String>.GenerateRequestUri()
ClientServiceRequest<String>.GetBody()
ClientServiceRequest<String>.GetDefaultETagAction(String)
ClientServiceRequest<String>.ETagAction
ClientServiceRequest<String>.ModifyRequest
ClientServiceRequest<String>.RequestParameters
ClientServiceRequest<String>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
ClientServiceRequest.Credential
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.YouTube.v3
Assembly: Google.Apis.YouTube.v3.dll
Syntax
public class DownloadRequest : YouTubeBaseServiceRequest<string>, IClientServiceRequest<string>, IClientServiceRequest

Constructors

DownloadRequest(IClientService, String)

Constructs a new Download request.

Declaration
public DownloadRequest(IClientService service, string id)
Parameters
Type Name Description
IClientService service
System.String id

Properties

HttpMethod

Gets the HTTP method.

Declaration
public override string HttpMethod { get; }
Property Value
Type Description
System.String
Overrides
Google.Apis.Requests.ClientServiceRequest<System.String>.HttpMethod

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
System.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
System.String
Overrides
Google.Apis.Requests.ClientServiceRequest<System.String>.MethodName

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
System.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
System.String

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
System.String
Overrides
Google.Apis.Requests.ClientServiceRequest<System.String>.RestPath

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
System.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
System.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
System.IO.Stream stream

DownloadAsync(Stream)

Asynchronously download the media into the given stream.

Declaration
public virtual Task<IDownloadProgress> DownloadAsync(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream
Returns
Type Description
System.Threading.Tasks.Task<IDownloadProgress>

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
System.IO.Stream stream
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IDownloadProgress>

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
System.IO.Stream stream
System.Net.Http.Headers.RangeHeaderValue range
Returns
Type Description
IDownloadProgress

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(CancellationToken))
Parameters
Type Name Description
System.IO.Stream stream
System.Net.Http.Headers.RangeHeaderValue range
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IDownloadProgress>

DownloadWithStatus(Stream)

Synchronously download the media into the given stream.

Declaration
public virtual IDownloadProgress DownloadWithStatus(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream
Returns
Type Description
IDownloadProgress

The final status of the download; including whether the download succeeded or failed.

InitParameters()

Initializes Download parameter list.

Declaration
protected override void InitParameters()
Overrides
Google.Apis.YouTube.v3.YouTubeBaseServiceRequest<System.String>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
Back to top