I want to be able to get the labels attached to a google adwords ad via the Java api.
I can get the ads:
final AdGroupAdPage page = service.get(selector.build());
if (page.getEntries() == null)
return;
for (AdGroupAd ad : page.getEntries())
ads.add((TextAd)ad.getAd());
But there's no method to get label(s) from an Ad.
I can list all the labels:
Selector selector = new SelectorBuilder()
.fields(LabelField.LabelName)
.fields(LabelField.LabelId)
.fields(LabelField.LabelStatus)
.build();
LabelPage page = labelService.get(selector);
if (page.getEntries() != null) {
for (Label label : page.getEntries()) {
System.out.println("Label id " + label.getId() + ", label name " + label.getName() + ", label status " + label.getStatus());
}
}
But I can't get the Ad ids they belong too.