File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,21 @@ func (ac AdCreative) GetLandingPageURL() string {
292
292
return ""
293
293
}
294
294
295
+ // GetLinkCaption returns the link caption page URL of the creative.
296
+ func (ac AdCreative ) GetLinkCaption () string {
297
+ if ac .ObjectStorySpec == nil {
298
+ return ""
299
+ }
300
+
301
+ if ac .ObjectStorySpec .LinkData != nil {
302
+ return ac .ObjectStorySpec .LinkData .CallToAction .Value .LinkCaption
303
+ } else if ac .ObjectStorySpec .VideoData != nil && ac .ObjectStorySpec .VideoData .CallToAction != nil && ac .ObjectStorySpec .VideoData .CallToAction .Value != nil {
304
+ return ac .ObjectStorySpec .VideoData .CallToAction .Value .LinkCaption
305
+ }
306
+
307
+ return ""
308
+ }
309
+
295
310
// ObjectStorySpec contains the media of a creative.
296
311
type ObjectStorySpec struct {
297
312
PageID string `json:"page_id,omitempty"`
You can’t perform that action at this time.
0 commit comments