Hey is there a link to a python version of this snippet?

On Friday, January 27, 2017 at 1:20:29 PM UTC-6, Shwetha Vastrad (AdWords 
API Team) wrote:
>
> Hi,
>
> To add an Audience to your AdGroups or Campaigns, you need to add a 
> criterion of type CriterionUserList 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupCriterionService.CriterionUserList>
>  using AdGroupCriterionService 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupCriterionService>
>  or CampaignCriterionService 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService>
>  respectively. 
> You need to pass the ID of your user list in the userListId 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupCriterionService.CriterionUserList#userlistid>
>  field. 
> I'm afraid the library doesn't have an example to demonstrate this. The 
> following code snippet adds an Audience to an AdGroup. 
>
>     CriterionUserList userList = new CriterionUserList();
>     userList.setUserListId(userListId);
>
>     BiddableAdGroupCriterion criterion = new BiddableAdGroupCriterion();
>     criterion.setAdGroupId(adGroupId);
>     criterion.setCriterion(userList);
>
>     AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
>     operation.setOperand(criterion);
>     operation.setOperator(Operator.ADD);
>
>     AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation
> [] {operation};
>     AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(
> operations);
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/29e54dfc-b8a5-48aa-a7a0-7acf23df3eb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Re: Adding a l... prajwal
    • Re: Addin... 'Nadine Sundquist (AdWords API Team)' via AdWords API Forum

Reply via email to