Table of Contents

Class FilesResource.WatchRequest

Namespace
Google.Apis.Drive.v3
Assembly
Google.Apis.Drive.v3.dll

Subscribes to changes to a file

public class FilesResource.WatchRequest : DriveBaseServiceRequest<Channel>
Inheritance
FilesResource.WatchRequest
Inherited Members

Constructors

WatchRequest(IClientService, Channel, string)

Constructs a new Watch request.

public WatchRequest(IClientService service, Channel body, string fileId)

Parameters

service IClientService
body Channel
fileId string

Properties

AcknowledgeAbuse

Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.

public virtual bool? AcknowledgeAbuse { get; set; }

Property Value

bool?

FileId

The ID of the file.

public virtual string FileId { get; }

Property Value

string

HttpMethod

Gets the HTTP method.

public override string HttpMethod { get; }

Property Value

string

MediaDownloader

Gets the media downloader.

public IMediaDownloader MediaDownloader { get; }

Property Value

IMediaDownloader

MethodName

Gets the method name.

public override string MethodName { get; }

Property Value

string

RestPath

Gets the REST path.

public override string RestPath { get; }

Property Value

string

SupportsAllDrives

Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.

public virtual bool? SupportsAllDrives { get; set; }

Property Value

bool?

SupportsTeamDrives

Deprecated use supportsAllDrives instead.

public virtual bool? SupportsTeamDrives { get; set; }

Property Value

bool?

Methods

Download(Stream)

Synchronously download the media into the given stream.

Warning: This method hides download errors; use DownloadWithStatus(Stream) instead.

public virtual void Download(Stream stream)

Parameters

stream Stream

DownloadAsync(Stream)

Asynchronously download the media into the given stream.

public virtual Task<IDownloadProgress> DownloadAsync(Stream stream)

Parameters

stream Stream

Returns

Task<IDownloadProgress>

DownloadAsync(Stream, CancellationToken)

Asynchronously download the media into the given stream.

public virtual Task<IDownloadProgress> DownloadAsync(Stream stream, CancellationToken cancellationToken)

Parameters

stream Stream
cancellationToken CancellationToken

Returns

Task<IDownloadProgress>

DownloadWithStatus(Stream)

Synchronously download the media into the given stream.

public virtual IDownloadProgress DownloadWithStatus(Stream stream)

Parameters

stream Stream

Returns

IDownloadProgress

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

GetBody()

Returns the body of the request.

protected override object GetBody()

Returns

object

InitParameters()

Initializes Watch parameter list.

protected override void InitParameters()