Class CaptionsResource.DownloadRequest
Downloads a caption track.
Inheritance
System.Object
CaptionsResource.DownloadRequest
Inherited Members
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()
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
Properties
HttpMethod
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 |
|
Gets the media downloader.
Declaration
public IMediaDownloader MediaDownloader { get; }
Property Value
MethodName
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
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
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
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
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
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