Class AdvertisersResource.AssetsResource
The "assets" collection of methods.
Inherited Members
Namespace: Google.Apis.DisplayVideo.v4
Assembly: Google.Apis.DisplayVideo.v4.dll
Syntax
public class AdvertisersResource.AssetsResource
Constructors
AssetsResource(IClientService)
Constructs a new resource.
Declaration
public AssetsResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Upload(CreateAssetRequest, long)
Uploads an asset. Returns the ID of the newly uploaded asset if successful. The asset file size should be no more than 10 MB for images, 200 MB for ZIP files, and 1 GB for videos. Must be used within the multipart media upload process. Examples using provided client libraries can be found in our Creating Creatives guide.
Declaration
public virtual AdvertisersResource.AssetsResource.UploadRequest Upload(CreateAssetRequest body, long advertiserId)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAssetRequest | body | The body of the request. |
| long | advertiserId | Required. The ID of the advertiser this asset belongs to. |
Returns
| Type | Description |
|---|---|
| AdvertisersResource.AssetsResource.UploadRequest |
Upload(CreateAssetRequest, long, Stream, string)
Uploads an asset. Returns the ID of the newly uploaded asset if successful. The asset file size should be no more than 10 MB for images, 200 MB for ZIP files, and 1 GB for videos. Must be used within the multipart media upload process. Examples using provided client libraries can be found in our Creating Creatives guide.
Declaration
public virtual AdvertisersResource.AssetsResource.UploadMediaUpload Upload(CreateAssetRequest body, long advertiserId, Stream stream, string contentType)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAssetRequest | body | The body of the request. |
| long | advertiserId | Required. The ID of the advertiser this asset belongs to. |
| Stream | stream | The stream to upload. See remarks for further information. |
| string | contentType | The content type of the stream to upload. |
Returns
| Type | Description |
|---|---|
| AdvertisersResource.AssetsResource.UploadMediaUpload |
Remarks
Considerations regarding stream:
-
If
streamis seekable, then the stream position will be reset to0before reading commences. Ifstreamis not seekable, then it will be read from its current position -
Caller is responsible for maintaining the
streamopen until the upload is completed - Caller is responsible for closing the
stream