AdsApp.MediaBundleAssetBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builds new media bundle assets.
Typical usage:
var assetBundleUrl = "http://www.example.com/example.zip";
var assetBundleBlob = UrlFetchApp.fetch(assetBundleUrl).getBlob();
var assetOperation = AdsApp.adAssets().newMediaBundleAssetBuilder()
.withName("name")
.withData(assetBundleBlob)
.build();
var bundleAsset = assetOperation.getResult();
Methods:
build()
Creates a bundle asset. Returns an
AssetOperation
that can be
used to get the new bundle asset (or access any associated errors if the
creation failed).
Return values:
withData(data)
Sets new bundle asset's data to the specified value. This field is
required.
Arguments:
Name | Type | Description |
data |
Blob.Blob |
The data for the asset bundle. |
Return values:
withName(name)
Sets new bundle asset's name to the specified value. This field is
required.
Arguments:
Name | Type | Description |
name |
String |
The name for the asset bundle. |
Return values:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[[["Creates new media bundle assets to be used in Google Ads."],["Requires providing a name and the asset bundle data (as a Blob) for creation."],["Uses a builder pattern to construct the asset with `withName` and `withData` methods."],["The `build` method initiates the asset creation and returns an `AssetOperation` to access the result."]]],[]]