I have found a little complex solution. First I use AdGroupService to get all adGroup Ids then use AdGroupAdService to get all ads belonging to some adGroup Id like GetTextAds.java in the example code. If page.getTotalNumEntries() == 0, namely we don't have any ads, so I can add some ads in the adGroup.
I was hoping I could get the ad group information from the AdGroupAd interface but seems I cannot. On Tuesday, February 17, 2015 at 9:54:45 AM UTC+8, Eitan Shay wrote: > > Hi Danial, > > Can you please tell me how to use AdGroupService to get the adGroups that > don't have any ads in it. > I know AdGroupService is meant to manage ad groups but I cannot get ads > information in the ad group through the AdGroup interface. > Can you give more details? > > Thanks a lot! > > On Monday, February 16, 2015 at 10:44:06 PM UTC+8, Danial Klimkin wrote: >> >> Hello Eitan, >> >> >> Please use the AdGroupService >> <https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupService> >> >> to manage Ad groups. >> >> >> -Danial, AdWords API Team. >> >> >> On Monday, February 16, 2015 at 9:31:15 AM UTC+3, Eitan Shay wrote: >>> >>> Hi, >>> >>> I am using the GetTextAds class in example code but I cannot get the >>> adGroups without any ads in it. >>> When using AdGroupAdService, I can only get the adGroups that have >>> adGroup and TextAd both. >>> >>> But I want to add some text ads to those adGroups without ads in it. >>> Is there a way to do it? >>> >>> Thanks a lot! >>> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/1aa1c165-c312-4d09-bf25-4fbd986a398c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
