Hello Andras
Can you send me FULL php api code how import IPBLOCK to adwords?
I try it 2days but still some error.
Thanks for you answer
Martin

On Friday, April 17, 2015 at 8:41:42 PM UTC+2, Andras Kende wrote:
>
> Hello Nadine,
>
> It's working now with 'KeywordText'   :) 
>
>                     [criterion] => IpBlock Object
>                         (
>                             [ipAddress] => 11.11.11.11/32
>                             [id] => 38090986511
>                             [type] => IP_BLOCK
> Thank you !!!
>
> Andras
>
>
>
> On Friday, April 17, 2015 at 6:39:39 AM UTC-7, Nadine Sundquist (AdWords 
> API Team) wrote:
>>
>> Hello Andras,
>>
>> Try getting the IP address information out of *KeywordText*:
>>
>> $selector->fields = array('Id', 'CriteriaType', 'KeywordText');
>>
>> When retrieving information, you need to make sure to specify what you 
>> want in the selector.
>>
>> Best,
>> Nadine, AdWords API Team
>>
>> On Thursday, April 16, 2015 at 8:13:14 PM UTC-4, Andras Kende wrote:
>>>
>>> Hi Nadine,
>>>
>>> I'm getting the results of IP_BLOCK [id] but the [ipAddress] is empty :(
>>> See my code and results :
>>>
>>> <?php
>>> $path = dirname(__FILE__) . '/src';
>>> set_include_path(get_include_path() . PATH_SEPARATOR . $path);
>>> require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
>>> $user = new AdWordsUser();
>>> $user->SetClientCustomerId('111-222-3333');
>>> $campaignId = '123456789';
>>> $campaignCriterionService = 
>>> $user->GetService('CampaignCriterionService', 'v201502');
>>> $selector = new Selector();
>>> $selector->fields = array('Id', 'CriteriaType');
>>> $selector->predicates[] = new Predicate('CampaignId', 'IN', 
>>> array($campaignId));
>>> $selector->predicates[] = new Predicate('CriteriaType', 'IN', 
>>> array('IP_BLOCK'));
>>> $selector->paging = new Paging(0, 
>>> AdWordsConstants::RECOMMENDED_PAGE_SIZE);
>>> $page = $campaignCriterionService->get($selector);
>>> print_r($page);
>>> ?>
>>>
>>>
>>> CampaignCriterionPage Object
>>>
>>> (
>>>
>>>     [entries] => Array
>>>
>>>         (
>>>
>>>             [0] => NegativeCampaignCriterion Object
>>>
>>>                 (
>>>
>>>                     [campaignId] => 123456789
>>>
>>>                     [isNegative] => 1
>>>
>>>                     [criterion] => IpBlock Object
>>>
>>>                         (
>>>
>>>                             [ipAddress] => 
>>>
>>>                             [id] => 20471658932
>>>
>>>                             [type] => IP_BLOCK
>>>
>>>                             [CriterionType] => IpBlock
>>>
>>>                             [_parameterMap:Criterion:private] => Array
>>>
>>>                                 (
>>>
>>>                                     [Criterion.Type] => CriterionType
>>>
>>>                                 )
>>>
>>>                         )
>>>
>>>                     [bidModifier] => 
>>>
>>>                     [forwardCompatibilityMap] => 
>>>
>>>                     [CampaignCriterionType] => NegativeCampaignCriterion
>>>
>>>                     [_parameterMap:CampaignCriterion:private] => Array
>>>
>>>                         (
>>>
>>>                             [CampaignCriterion.Type] => 
>>> CampaignCriterionType
>>>
>>>                         )
>>>
>>>                 )
>>>
>>>
>>> Thank you,
>>>
>>> Andras
>>>
>>>
>>>
>>>
>>> On Thursday, April 16, 2015 at 9:01:23 AM UTC-7, Nadine Sundquist 
>>> (AdWords API Team) wrote:
>>>>
>>>> Hi Andras,
>>>>
>>>> In the PHP CampaignCriterionService, there is a get($selector) 
>>>> <https://github.com/uchikoba/YahooSponsoredSearchAPIClient_for_PHP/blob/master/V1/CampaignCriterionService.class.php#L607>
>>>>  function 
>>>> that will allow you to filter the list of CampaignCriterion based on 
>>>> fields 
>>>> such as *CriteriaType. *Check out how CampaignCriterionService 
>>>> selector fields 
>>>> <https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201502-CampaignCriterionService>
>>>>  
>>>> work.
>>>>
>>>> For an example of getting CampaignCriterion by type, we have a PHP 
>>>> example of getting campaign targeting criteria 
>>>> <https://github.com/googleads/googleads-php-lib/blob/52123a0fdf7b4e447c8893cd2b438e49d50a06cd/examples/AdWords/v201406/Targeting/GetCampaignTargetingCriteria.php>.
>>>>  
>>>> The type you would need would be IP_BLOCK.
>>>>
>>>> Cheers,
>>>> Nadine, AdWords API Team
>>>>
>>>> On Thursday, April 16, 2015 at 11:01:33 AM UTC-4, Andras Kende wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I just started testing Adwords API (php)
>>>>>
>>>>> So far I can use CampaignCriterionService for IP_BLOCK - ADD / REMOVE 
>>>>> to Manage IP exclusions in a Campaign
>>>>>
>>>>> But not finding any information how to get a list of excluded IP 
>>>>> Addresses 
>>>>> listed in IP exclusions..
>>>>>
>>>>> Thanks for any help !
>>>>>
>>>>> Andras
>>>>>
>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3110f278-328f-4e99-a555-804bd47ecbcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to