Hi,
Is this correct way to doing it?
I also wanted to confirm this will remove only userList Passed.
Thanks
$userListService = $adWordsServices->get($session,
AdwordsUserListService::class);
$mutateMembersOperations = [];
$mutateMembersOperation = new MutateMembersOperation();
$operand = new MutateMembersOperand();
$operand->setUserListId($listId);
$operand->setRemoveAll(true);
$mutateMembersOperation->setOperand($operand);
$mutateMembersOperations[] = $mutateMembersOperation;
$result = $userListService->mutateMembers($mutateMembersOperations);
On Monday, 3 September 2018 14:25:45 UTC+5:30, Dannison Yao (AdWords API
Team) wrote:
>
> Hi,
>
> Your code seems to be correct. You may use this sample code
> <https://developers.google.com/adwords/api/docs/samples/php/remarketing#create-and-populate-a-user-list>
> to
> pattern your existing code. You could run your code and confirm if there
> are indeed no errors. Should errors persist, feel free to write back with
> the error details or SOAP request and response logs for me to investigate
> further via *Reply privately to author*.
>
> Regards,
> Dannison
> AdWords API Team
>
> On Monday, September 3, 2018 at 1:53:22 PM UTC+8,
> [email protected] <javascript:> wrote:
>>
>> Thank you so much,
>> but what about the code? is it correct?
>>
>> понедельник, 3 сентября 2018 г., 6:20:27 UTC+3 пользователь Dannison Yao
>> (AdWords API Team) написал:
>>>
>>> Hi,
>>>
>>> For AdWordsUserListService, AdWords API only allows you to view the list
>>> but not its actual members, so it is not possible to see in the response
>>> the detailed information of the members that are being deleted. However, if
>>> you wish to know if this is possible in the AdWords UI, you may open your
>>> concern in the Advertiser's Community Forum
>>> <https://www.en.advertisercommunity.com/t5/Google-Ads/ct-p/google-ads#> as
>>> the product experts are better answering UI/product related concerns.
>>>
>>> If you wish to view the list of audience lists, you may view your lists
>>> by running the AdwordsUserListService.get()
>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService#get>
>>> .
>>>
>>> Regards,
>>> Dannison
>>> AdWords API Team
>>>
>>> On Friday, August 31, 2018 at 8:29:26 PM UTC+8,
>>> [email protected] wrote:
>>>>
>>>> Many thanks for the prompt response!
>>>>
>>>> I have already tried to solve this issue on my own:
>>>>
>>>> $adWordsServices = new AdWordsServices();
>>>>
>>>> $userListService = $adWordsServices->get(self::$session,
>>>> AdwordsUserListService::class);
>>>>
>>>> $mutateMembersOperations = [];
>>>> $mutateMembersOperation = new MutateMembersOperation();
>>>> $operand = new MutateMembersOperand($UserListId, true);
>>>>
>>>> $mutateMembersOperation->setOperand($operand);
>>>>
>>>> $mutateMembersOperations[] = $mutateMembersOperation;
>>>>
>>>> $result = $userListService->mutateMembers($mutateMembersOperations);
>>>>
>>>> var_dump($result);
>>>>
>>>>
>>>> errors like no, but I'm not sure that the list is cleared, because
>>>> detailed information can not be obtained.
>>>>
>>>> Help please with the code.
>>>>
>>>>
>>>> пятница, 31 августа 2018 г., 11:20:48 UTC+3 пользователь Dannison Yao
>>>> (AdWords API Team) написал:
>>>>>
>>>>> Hi,
>>>>>
>>>>> If you wish to delete all members of a userList, you could use the
>>>>> MutateMembersOperand
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService.MutateMembersOperand>
>>>>> and
>>>>> set the removeAll
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService.MutateMembersOperand#removeall>
>>>>> field
>>>>> to *TRUE *while using the REMOVE operator. However, if you wish to
>>>>> remove individual members in the list, you could use the
>>>>> AdwordsUserListService.mutateMembers()
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService#mutatemembers>
>>>>> to
>>>>> REMOVE a member using MutateMembersOperand.membersList
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService.MutateMembersOperand>
>>>>> in
>>>>> your userlist.
>>>>>
>>>>> Regards,
>>>>> Dannison
>>>>> AdWords API Team
>>>>>
>>>>> On Friday, August 31, 2018 at 2:02:30 PM UTC+8,
>>>>> [email protected] wrote:
>>>>>>
>>>>>> Hi,help me please...
>>>>>>
>>>>>> I can not find an api method that will allow me to clear the list at
>>>>>> a time.
>>>>>> Point removal (MutateMembersOperation -> operator -> REMOVE) is not
>>>>>> of interest, because I may not know the contents of the list.
>>>>>>
>>>>>>
>>>>>> Thank you in advance.
>>>>>>
>>>>>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/e0980956-fad9-4485-807b-90eb59113c44o%40googlegroups.com.