Show / Hide Table of Contents

Class MediaResource

The "media" collection of methods.

Inheritance
object
MediaResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Chromewebstore.v2
Assembly: Google.Apis.Chromewebstore.v2.dll
Syntax
public class MediaResource

Constructors

MediaResource(IClientService)

Constructs a new resource.

Declaration
public MediaResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Upload(UploadItemPackageRequest, string)

Upload a new package to an existing item.

Declaration
public virtual MediaResource.UploadRequest Upload(UploadItemPackageRequest body, string name)
Parameters
Type Name Description
UploadItemPackageRequest body

The body of the request.

string name

Required. Name of the item to upload the new package to in the form publishers/{publisherId}/items/{itemId}

Returns
Type Description
MediaResource.UploadRequest

Upload(UploadItemPackageRequest, string, Stream, string)

Upload a new package to an existing item.

Declaration
public virtual MediaResource.UploadMediaUpload Upload(UploadItemPackageRequest body, string name, Stream stream, string contentType)
Parameters
Type Name Description
UploadItemPackageRequest body

The body of the request.

string name

Required. Name of the item to upload the new package to in the form publishers/{publisherId}/items/{itemId}

Stream stream

The stream to upload. See remarks for further information.

string contentType

The content type of the stream to upload.

Returns
Type Description
MediaResource.UploadMediaUpload
Remarks

Considerations regarding stream:

  • If stream is seekable, then the stream position will be reset to 0 before reading commences. If stream is not seekable, then it will be read from its current position
  • Caller is responsible for maintaining the stream open until the upload is completed
  • Caller is responsible for closing the stream
In this article
Back to top Generated by DocFX