AdsApp.Asset
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads asset. An asset can be an image, text, or video.
Assets are deduplicated within a given customer account, so assets may be
shared between different ads.
Methods:
Member | Type | Description |
getDimensions() |
AdsApp.Dimensions |
Returns image dimension info if this asset is an image, or
null otherwise. |
getEntityType() |
String |
Returns the type of this entity as a String , in this case,
"Asset" . |
getId() |
String |
Returns the ID of the asset. |
getImageUrl() |
String |
Returns the image URL if this asset is an image, or null
otherwise. |
getName() |
String |
Returns the name of the asset object, or null if the asset was
created without a name. |
getResourceName() |
String |
Returns the resource name of the asset. |
getText() |
String |
Returns asset text if this is a text asset, or null otherwise. |
getType() |
String |
Returns the asset object's type. |
getYouTubeVideoId() |
String |
Returns the YouTube video ID if this asset is a YouTube video, or
null otherwise. |
getDimensions()
Returns image dimension info if this asset is an image, or
null
otherwise.
Return values:
Type | Description |
AdsApp.Dimensions |
Image dimension info if this asset is an image, or
null otherwise. |
getEntityType()
Returns the type of this entity as a
String
, in this case,
"Asset"
.
Return values:
Type | Description |
String |
Type of this entity: "Asset" . |
getId()
Returns the ID of the asset.
Return values:
Type | Description |
String |
The ID of the asset. |
getImageUrl()
Returns the image URL if this asset is an image, or
null
otherwise.
Return values:
Type | Description |
String |
The image URL if this asset is an image, or null
otherwise. |
getName()
Returns the name of the asset object, or
null
if the asset was
created without a name.
Return values:
Type | Description |
String |
The name of the asset object, or null if the asset was
created without a name. |
getResourceName()
Returns the resource name of the asset.
Return values:
Type | Description |
String |
The resource name of the asset. |
getText()
Returns asset text if this is a text asset, or
null
otherwise.
Return values:
Type | Description |
String |
Asset text if this is a text asset, or null otherwise. |
getType()
Returns the asset object's type. This is one of
IMAGE
,
MEDIA_BUNDLE
,
TEXT
, or
YOUTUBE_VIDEO
.
Return values:
Type | Description |
String |
The asset type. |
getYouTubeVideoId()
Returns the YouTube video ID if this asset is a YouTube video, or
null
otherwise.
Return values:
Type | Description |
String |
The YouTube video ID if this asset is a YouTube video, or
null otherwise. |