Hello everybody,
We are trying to pause/enable our AdWords campaigns with regards to the weather conditions.
In order to achieve that we retrieve our campaigns using the SelectorBuilder:
// Create selector.
SelectorBuilder builder = new SelectorBuilder();
Selector selector = builder
.fields(CampaignField.Id, CampaignField.Name)
.orderAscBy(CampaignField.Name)
//.offset(offset)
//.limit(PAGE_SIZE)
.build();
and then look in all of our campaigns for the one we want to pause/enable:
CampaignPage page = null;
do {
// Get all campaigns.
page = campaignService.get(selector);
// Display campaigns.
if (page.getEntries() != null) {
for (com.google.api.ads.adwords.axis.v201702.cm.Campaign campaign : page.getEntries())
{
if ( campaign.getId().longValue() == Long.parseLong(campaign_.getID_2()))
{
if ( activate ) {
campaign.setStatus(CampaignStatus.ENABLED);
}
It works but the problem is: the retrieved campaigns do NOT include the Youtube ones.
Can someone help us with that?
Truthfully yours,
Philippe