Hi All,
Is there a way to get campaign with all their elements (adGroup, ads) after
performing a Mutate action?
I asked this question, because a want to get AdGroup and Ads status after
updating campaign status.
I'm using Google AdWords API. You can find bellow my piece of code.
using (Google.Api.Ads.AdWords.v201809.CampaignService campaignService =
> (Google.Api.Ads.AdWords.v201809.CampaignService)user.GetService(AdWordsService.v201809.CampaignService))
> {
> Google.Api.Ads.AdWords.v201809.Campaign campaign = new
> Google.Api.Ads.AdWords.v201809.Campaign
> {
> id = campaignId,
> status = CampaignStatus.ENABLED
> };
> Google.Api.Ads.AdWords.v201809.CampaignOperation operation
> = new Google.Api.Ads.AdWords.v201809.CampaignOperation
> {
> operand = campaign,
> @operator = Operator.SET
> };
> try
> {
> CampaignReturnValue retVal =
> campaignService.mutate(new
> Google.Api.Ads.AdWords.v201809.CampaignOperation[]
> {
> operation
> });
> AddAPILog(SocialMedia.Google, "ActiveCampaign", "",
> campaign, retVal, "PUT", "ActiveCampaign", user.Config.OAuth2RefreshToken,
> null, true);
> return true;
> }
> catch (Exception e)
> {
> AddAPILog(SocialMedia.Google, "ActiveCampaign", "",
> campaign, "", "PUT", "ActiveCampaign", user.Config.OAuth2RefreshToken,
> null, true);
> return false;
> }
> }
Thanks,
Zied
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/ed542d99-3fc2-4571-b250-48246eb97223%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.