Class FilesResource.ExportRequest
Exports a Google Doc to the requested MIME type and returns the exported content. Please note that
the exported content is limited to 10MB.
Inheritance
System.Object
FilesResource.ExportRequest
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.Drive.v3.dll
Syntax
public class ExportRequest : DriveBaseServiceRequest<string>, IClientServiceRequest<string>, IClientServiceRequest
Constructors
ExportRequest(IClientService, String, String)
Constructs a new Export request.
Declaration
public ExportRequest(IClientService service, string fileId, string mimeType)
Parameters
| Type |
Name |
Description |
| IClientService |
service |
|
| System.String |
fileId |
|
| System.String |
mimeType |
|
Properties
FileId
Declaration
[RequestParameter("fileId", RequestParameterType.Path)]
public virtual string FileId { get; }
Property Value
| Type |
Description |
| System.String |
|
HttpMethod
Declaration
public override string HttpMethod { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
Google.Apis.Requests.ClientServiceRequest<System.String>.HttpMethod
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
MimeType
The MIME type of the format requested for this export.
Declaration
[RequestParameter("mimeType", RequestParameterType.Query)]
public virtual string MimeType { get; }
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
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 Export parameter list.
Declaration
protected override void InitParameters()
Overrides
Google.Apis.Drive.v3.DriveBaseServiceRequest<System.String>.InitParameters()
Implements