Class StudioCreativeAssetsResource
The "studioCreativeAssets" collection of methods.
Inherited Members
Namespace: Google.Apis.Dfareporting.v5
Assembly: Google.Apis.Dfareporting.v5.dll
Syntax
public class StudioCreativeAssetsResource
Constructors
StudioCreativeAssetsResource(IClientService)
Constructs a new resource.
Declaration
public StudioCreativeAssetsResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Insert(DfareportingStudioCreativeAssetsInsertRequest)
Inserts a new studio creative asset. Requests to upload an asset file must be sent to the upload URI using
multipart media upload (or resumable media upload). For multipart
uploads (uploadType=multipart),
the request uses multipart/related and includes two parts: * Metadata: A JSON object representing
DfareportingStudioCreativeAssetsInsertRequest with studioAdvertiserId, and optional studioAccountId and
studioCreativeId. * Media: The binary data of the asset file, specifying the Content-Type of the
asset and a Content-Disposition header with name="media" and filename="" (for example,
Content-Disposition: form-data; name="media"; filename="asset.jpg").
Declaration
public virtual StudioCreativeAssetsResource.InsertRequest Insert(DfareportingStudioCreativeAssetsInsertRequest body)
Parameters
| Type | Name | Description |
|---|---|---|
| DfareportingStudioCreativeAssetsInsertRequest | body | The body of the request. |
Returns
| Type | Description |
|---|---|
| StudioCreativeAssetsResource.InsertRequest |
Insert(DfareportingStudioCreativeAssetsInsertRequest, Stream, string)
Inserts a new studio creative asset. Requests to upload an asset file must be sent to the upload URI using
multipart media upload (or resumable media upload). For multipart
uploads (uploadType=multipart),
the request uses multipart/related and includes two parts: * Metadata: A JSON object representing
DfareportingStudioCreativeAssetsInsertRequest with studioAdvertiserId, and optional studioAccountId and
studioCreativeId. * Media: The binary data of the asset file, specifying the Content-Type of the
asset and a Content-Disposition header with name="media" and filename="" (for example,
Content-Disposition: form-data; name="media"; filename="asset.jpg").
Declaration
public virtual StudioCreativeAssetsResource.InsertMediaUpload Insert(DfareportingStudioCreativeAssetsInsertRequest body, Stream stream, string contentType)
Parameters
| Type | Name | Description |
|---|---|---|
| DfareportingStudioCreativeAssetsInsertRequest | body | The body of the request. |
| Stream | stream | The stream to upload. See remarks for further information. |
| string | contentType | The content type of the stream to upload. |
Returns
| Type | Description |
|---|---|
| StudioCreativeAssetsResource.InsertMediaUpload |
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