| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, h1, h2, h3, div, span, p, pre, a { |
| 5 |
margin: 0; |
| 6 |
padding: 0; |
| 7 |
border: 0; |
| 8 |
font-weight: inherit; |
| 9 |
font-style: inherit; |
| 10 |
font-size: 100%; |
| 11 |
font-family: inherit; |
| 12 |
vertical-align: baseline; |
| 13 |
} |
| 14 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<h1><a href="displayvideo_v4.html">Display & Video 360 API</a> . <a href="displayvideo_v4.advertisers.html">advertisers</a> . <a href="displayvideo_v4.advertisers.adAssets.html">adAssets</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#bulkCreate">bulkCreate(advertiserId, body=None, x__xgafv=None)</a></code></p> |
| 79 |
<p class="firstline">Creates multiple ad assets in a single request. Returns the newly-created ad assets if successful. Only supports the creation of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#close">close()</a></code></p> |
| 82 |
<p class="firstline">Close httplib2 connections.</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#create">create(advertiserId, body=None, x__xgafv=None)</a></code></p> |
| 85 |
<p class="firstline">Creates an ad asset. Returns the newly-created ad asset if successful. Only supports the creation of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`.</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#get">get(advertiserId, adAssetId, x__xgafv=None)</a></code></p> |
| 88 |
<p class="firstline">Gets an ad asset. Only supports the retrieval of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`.</p> |
| 89 |
<p class="toc_element"> |
| 90 |
<code><a href="#list">list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
| 91 |
<p class="firstline">Lists ad assets under an advertiser ID. Only supports the retrieval of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`.</p> |
| 92 |
<p class="toc_element"> |
| 93 |
<code><a href="#list_next">list_next()</a></code></p> |
| 94 |
<p class="firstline">Retrieves the next page of results.</p> |
| 95 |
<p class="toc_element"> |
| 96 |
<code><a href="#upload">upload(advertiserId, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</a></code></p> |
| 97 |
<p class="firstline">Uploads and creates an ad asset. Returns the ID of the newly-created ad asset if successful. Only supports the uploading of assets with the AdAssetType `AD_ASSET_TYPE_IMAGE`.</p> |
| 98 |
<h3>Method Details</h3> |
| 99 |
<div class="method"> |
| 100 |
<code class="details" id="bulkCreate">bulkCreate(advertiserId, body=None, x__xgafv=None)</code> |
| 101 |
<pre>Creates multiple ad assets in a single request. Returns the newly-created ad assets if successful. Only supports the creation of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`. |
| 102 |
|
| 103 |
Args: |
| 104 |
advertiserId: string, Required. The ID of the advertiser these ad assets belong to. (required) |
| 105 |
body: object, The request body. |
| 106 |
The object takes the form of: |
| 107 |
|
| 108 |
{ # A request message for BulkCreateAdAssets. |
| 109 |
"adAssets": [ # Required. Ad assets to create. Only supports assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`. |
| 110 |
{ # A single ad asset. |
| 111 |
"adAssetId": "A String", # Output only. The ID of the ad asset. Referred to as the asset ID when assigned to an ad. |
| 112 |
"adAssetType": "A String", # Required. The type of the ad asset. |
| 113 |
"entityStatus": "A String", # Output only. The entity status of the ad asset. |
| 114 |
"name": "A String", # Identifier. The resource name of the ad asset. |
| 115 |
"youtubeVideoAsset": { # Data for a YouTube video ad asset. # Youtube video asset data. |
| 116 |
"youtubeVideoId": "A String", # Required. The YouTube video id of the asset. This is the 11 char string value used in the YouTube video URL. |
| 117 |
}, |
| 118 |
}, |
| 119 |
], |
| 120 |
} |
| 121 |
|
| 122 |
x__xgafv: string, V1 error format. |
| 123 |
Allowed values |
| 124 |
1 - v1 error format |
| 125 |
2 - v2 error format |
| 126 |
|
| 127 |
Returns: |
| 128 |
An object of the form: |
| 129 |
|
| 130 |
{ # A response message for BulkCreateAdAssets. |
| 131 |
"adAssets": [ # The created ad assets. |
| 132 |
{ # A single ad asset. |
| 133 |
"adAssetId": "A String", # Output only. The ID of the ad asset. Referred to as the asset ID when assigned to an ad. |
| 134 |
"adAssetType": "A String", # Required. The type of the ad asset. |
| 135 |
"entityStatus": "A String", # Output only. The entity status of the ad asset. |
| 136 |
"name": "A String", # Identifier. The resource name of the ad asset. |
| 137 |
"youtubeVideoAsset": { # Data for a YouTube video ad asset. # Youtube video asset data. |
| 138 |
"youtubeVideoId": "A String", # Required. The YouTube video id of the asset. This is the 11 char string value used in the YouTube video URL. |
| 139 |
}, |
| 140 |
}, |
| 141 |
], |
| 142 |
}</pre> |
| 143 |
</div> |
| 144 |
|
| 145 |
<div class="method"> |
| 146 |
<code class="details" id="close">close()</code> |
| 147 |
<pre>Close httplib2 connections.</pre> |
| 148 |
</div> |
| 149 |
|
| 150 |
<div class="method"> |
| 151 |
<code class="details" id="create">create(advertiserId, body=None, x__xgafv=None)</code> |
| 152 |
<pre>Creates an ad asset. Returns the newly-created ad asset if successful. Only supports the creation of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`. |
| 153 |
|
| 154 |
Args: |
| 155 |
advertiserId: string, Required. The ID of the advertiser this ad asset belongs to. (required) |
| 156 |
body: object, The request body. |
| 157 |
The object takes the form of: |
| 158 |
|
| 159 |
{ # A request message for CreateAdAsset. |
| 160 |
"adAsset": { # A single ad asset. # Required. The ad asset to create. Only supports assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`. |
| 161 |
"adAssetId": "A String", # Output only. The ID of the ad asset. Referred to as the asset ID when assigned to an ad. |
| 162 |
"adAssetType": "A String", # Required. The type of the ad asset. |
| 163 |
"entityStatus": "A String", # Output only. The entity status of the ad asset. |
| 164 |
"name": "A String", # Identifier. The resource name of the ad asset. |
| 165 |
"youtubeVideoAsset": { # Data for a YouTube video ad asset. # Youtube video asset data. |
| 166 |
"youtubeVideoId": "A String", # Required. The YouTube video id of the asset. This is the 11 char string value used in the YouTube video URL. |
| 167 |
}, |
| 168 |
}, |
| 169 |
} |
| 170 |
|
| 171 |
x__xgafv: string, V1 error format. |
| 172 |
Allowed values |
| 173 |
1 - v1 error format |
| 174 |
2 - v2 error format |
| 175 |
|
| 176 |
Returns: |
| 177 |
An object of the form: |
| 178 |
|
| 179 |
{ # A single ad asset. |
| 180 |
"adAssetId": "A String", # Output only. The ID of the ad asset. Referred to as the asset ID when assigned to an ad. |
| 181 |
"adAssetType": "A String", # Required. The type of the ad asset. |
| 182 |
"entityStatus": "A String", # Output only. The entity status of the ad asset. |
| 183 |
"name": "A String", # Identifier. The resource name of the ad asset. |
| 184 |
"youtubeVideoAsset": { # Data for a YouTube video ad asset. # Youtube video asset data. |
| 185 |
"youtubeVideoId": "A String", # Required. The YouTube video id of the asset. This is the 11 char string value used in the YouTube video URL. |
| 186 |
}, |
| 187 |
}</pre> |
| 188 |
</div> |
| 189 |
|
| 190 |
<div class="method"> |
| 191 |
<code class="details" id="get">get(advertiserId, adAssetId, x__xgafv=None)</code> |
| 192 |
<pre>Gets an ad asset. Only supports the retrieval of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`. |
| 193 |
|
| 194 |
Args: |
| 195 |
advertiserId: string, Required. The ID of the advertiser this ad asset belongs to. (required) |
| 196 |
adAssetId: string, Required. The ID of the ad asset to fetch. Only supports assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO` (required) |
| 197 |
x__xgafv: string, V1 error format. |
| 198 |
Allowed values |
| 199 |
1 - v1 error format |
| 200 |
2 - v2 error format |
| 201 |
|
| 202 |
Returns: |
| 203 |
An object of the form: |
| 204 |
|
| 205 |
{ # A single ad asset. |
| 206 |
"adAssetId": "A String", # Output only. The ID of the ad asset. Referred to as the asset ID when assigned to an ad. |
| 207 |
"adAssetType": "A String", # Required. The type of the ad asset. |
| 208 |
"entityStatus": "A String", # Output only. The entity status of the ad asset. |
| 209 |
"name": "A String", # Identifier. The resource name of the ad asset. |
| 210 |
"youtubeVideoAsset": { # Data for a YouTube video ad asset. # Youtube video asset data. |
| 211 |
"youtubeVideoId": "A String", # Required. The YouTube video id of the asset. This is the 11 char string value used in the YouTube video URL. |
| 212 |
}, |
| 213 |
}</pre> |
| 214 |
</div> |
| 215 |
|
| 216 |
<div class="method"> |
| 217 |
<code class="details" id="list">list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code> |
| 218 |
<pre>Lists ad assets under an advertiser ID. Only supports the retrieval of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`. |
| 219 |
|
| 220 |
Args: |
| 221 |
advertiserId: string, Required. The ID of the advertiser the ad assets belong to. (required) |
| 222 |
filter: string, Optional. Allows filtering of the results by ad asset fields. Supported syntax: * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `youtubeVideoAsset.youtubeVideoId` * `entityStatus` Examples: * All active YouTube video ad assets under an advertiser: `entityStatus=ENTITY_STATUS_ACTIVE` |
| 223 |
orderBy: string, Optional. Field by which to sort the list. Acceptable values are: * `entityStatus` * `youtubeVideoAsset.youtubeVideoId` * `adAssetId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix "desc" should be added to the field name. Example: `adAssetId desc`. |
| 224 |
pageSize: integer, Optional. Requested page size. Must be between `1` and `5000`. If unspecified will default to `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. |
| 225 |
pageToken: string, Optional. A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListAdAssets` method. If not specified, the first page of results will be returned. |
| 226 |
x__xgafv: string, V1 error format. |
| 227 |
Allowed values |
| 228 |
1 - v1 error format |
| 229 |
2 - v2 error format |
| 230 |
|
| 231 |
Returns: |
| 232 |
An object of the form: |
| 233 |
|
| 234 |
{ # A response message for ListAdAssets. |
| 235 |
"adAssets": [ # The list of ad assets. The list will only contain assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`. This list will be absent if empty. |
| 236 |
{ # A single ad asset. |
| 237 |
"adAssetId": "A String", # Output only. The ID of the ad asset. Referred to as the asset ID when assigned to an ad. |
| 238 |
"adAssetType": "A String", # Required. The type of the ad asset. |
| 239 |
"entityStatus": "A String", # Output only. The entity status of the ad asset. |
| 240 |
"name": "A String", # Identifier. The resource name of the ad asset. |
| 241 |
"youtubeVideoAsset": { # Data for a YouTube video ad asset. # Youtube video asset data. |
| 242 |
"youtubeVideoId": "A String", # Required. The YouTube video id of the asset. This is the 11 char string value used in the YouTube video URL. |
| 243 |
}, |
| 244 |
}, |
| 245 |
], |
| 246 |
"nextPageToken": "A String", # A token to retrieve the next page of results. Pass this value in the page_token field in the subsequent call to `ListAdAssets` method to retrieve the next page of results. |
| 247 |
}</pre> |
| 248 |
</div> |
| 249 |
|
| 250 |
<div class="method"> |
| 251 |
<code class="details" id="list_next">list_next()</code> |
| 252 |
<pre>Retrieves the next page of results. |
| 253 |
|
| 254 |
Args: |
| 255 |
previous_request: The request for the previous page. (required) |
| 256 |
previous_response: The response from the request for the previous page. (required) |
| 257 |
|
| 258 |
Returns: |
| 259 |
A request object that you can call 'execute()' on to request the next |
| 260 |
page. Returns None if there are no more items in the collection. |
| 261 |
</pre> |
| 262 |
</div> |
| 263 |
|
| 264 |
<div class="method"> |
| 265 |
<code class="details" id="upload">upload(advertiserId, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</code> |
| 266 |
<pre>Uploads and creates an ad asset. Returns the ID of the newly-created ad asset if successful. Only supports the uploading of assets with the AdAssetType `AD_ASSET_TYPE_IMAGE`. |
| 267 |
|
| 268 |
Args: |
| 269 |
advertiserId: string, Required. The ID of the advertiser this ad asset belongs to. (required) |
| 270 |
body: object, The request body. |
| 271 |
The object takes the form of: |
| 272 |
|
| 273 |
{ # A request message for UploadAdAsset. |
| 274 |
"adAssetType": "A String", # Required. The type of the ad asset. Only `AD_ASSET_TYPE_IMAGE` is supported. |
| 275 |
"filename": "A String", # Required. The filename of the ad asset, including the file extension. The filename must be UTF-8 encoded with a maximum size of 240 bytes. |
| 276 |
} |
| 277 |
|
| 278 |
media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
| 279 |
media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. |
| 280 |
x__xgafv: string, V1 error format. |
| 281 |
Allowed values |
| 282 |
1 - v1 error format |
| 283 |
2 - v2 error format |
| 284 |
|
| 285 |
Returns: |
| 286 |
An object of the form: |
| 287 |
|
| 288 |
{ # A response message for UploadAdAsset. |
| 289 |
"adAsset": { # A single ad asset. # The created ad asset. |
| 290 |
"adAssetId": "A String", # Output only. The ID of the ad asset. Referred to as the asset ID when assigned to an ad. |
| 291 |
"adAssetType": "A String", # Required. The type of the ad asset. |
| 292 |
"entityStatus": "A String", # Output only. The entity status of the ad asset. |
| 293 |
"name": "A String", # Identifier. The resource name of the ad asset. |
| 294 |
"youtubeVideoAsset": { # Data for a YouTube video ad asset. # Youtube video asset data. |
| 295 |
"youtubeVideoId": "A String", # Required. The YouTube video id of the asset. This is the 11 char string value used in the YouTube video URL. |
| 296 |
}, |
| 297 |
}, |
| 298 |
}</pre> |
| 299 |
</div> |
| 300 |
|
| 301 |
</body></html> |