Thanks Joyce, 

Things worked for me :) 
If anyone needs help in ruby (ruby on rails) here is an example;

require 'adwords_api'
> config = YAML.load_file(Rails.root.join('config/adwords_api_test.yml'))
> API_VERSION = :v201607
> adwords = AdwordsApi::Api.new(config)
> campaign_criterion_srv = adwords.service(:CampaignCriterionService, 
> API_VERSION)
> selector = {
>   :fields => ['Id', 'CriteriaType', 'LocationName', 'RadiusDistanceUnits', 
> 'RadiusInUnits'],
>   :predicates => [
>     {:field => 'CriteriaType', :operator => 'IN', :values => ['LOCATION', 
> 'PROXIMITY']},
>     {:field => 'CampaignId', :operator => 'EQUALS', :values => 
> [716393970]},
>   ],
>   :paging => {
>     :start_index => 0,
>     :number_results => 100
>   }
> }
> campaign_criterion_srv.get(selector


On Wednesday, 28 December 2016 16:11:24 UTC+5, Joyce Lava wrote:
>
> Hi Sohair,
>
> Based on your code, you are using LocationCriterionService 
> <https://developers.google.com/adwords/api/docs/reference/v201609/LocationCriterionService>
>  instead 
> of CampaignCriterionService 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService>.
>  
> LocationCriterionService is normally used to get the locationCriterion 
> constants and not the targeted location of a campaign. From the sample SOAP 
> request and response I previously sent, I was using 
> CampaignCriterionService.get 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService#get>
>  operation 
> with criterion as Location 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.Location>
>  and Proximity 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.Proximity>.
>  
> That way, you can get the location and proximity targeting based on 
> CampaignId 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.CampaignCriterion#campaignid>.
>  
> You may want to double check the SOAP logs I sent, then let me know if you 
> encounter any issues after trying that on your end.
>
> Best,
> Joyce, 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/c31cac14-c84c-45bd-baa5-ab9794b6ae01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to