Re: Can not get BidModifier of Location?

2013-05-20 Thread Kevin Winter (AdWords API Team)
Hi Justin,
  It's not possible to modify the bid modifiers for that criterion type via 
the AdWords API at this time. One of the principles of our API design is to 
try to only return fields that you could send back in a mutate, which is 
why we don't return bid modifiers for Location targets that you may have 
set via the UI.

- Kevin Winter
AdWords API Team

On Friday, May 17, 2013 10:52:49 AM UTC-4, Justin wrote:

 Hi Api AdWords team,
 Currently i can not get the BidModifier of Location although I created 
 some Location with BidModifier on the AdWords. All BidModifiers of all 
 Location are null. Are there any problem with my Campaign? My test code is 
 below:

 CampaignCriterionServiceInterface campaignCriterionService = 
 getCampaignCriterionServiceInterface();

 Selector selector = new Selector();
 selector.setFields(new String[] {Id, CampaignId, 
 PlatformName, CriteriaType, BidModifier, DayOfWeek,
 StartHour, StartMinute, EndHour, EndMinute, 
 LocationName, DisplayType, TargetingStatus,
 ParentLocations, GeoPoint, RadiusDistanceUnits, 
 RadiusInUnits, Address});
 ListPredicate predicateList = new ArrayListPredicate();
 Predicate campaignPredicate = new Predicate();
 campaignPredicate.setField(CampaignId);
 campaignPredicate.setOperator(PredicateOperator.EQUALS);
 campaignPredicate.setValues(new 
 String[]{String.valueOf(campaignId)});
 predicateList.add(campaignPredicate);
 selector.setPredicates(predicateList.toArray(new 
 Predicate[predicateList.size()]));

 CampaignCriterion[] campaignCriterions = null;
 try {
 campaignCriterions = 
 campaignCriterionService.get(selector).getEntries();
 } catch (ApiException e) {

 } catch (RemoteException e) {

 }

 Regards,
 Justin



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
For more options, visit https://groups.google.com/groups/opt_out.




Can not get BidModifier of Location?

2013-05-17 Thread Justin
Hi Api AdWords team,
Currently i can not get the BidModifier of Location although I created some 
Location with BidModifier on the AdWords. All BidModifiers of all Location 
are null. Are there any problem with my Campaign? My test code is below:

CampaignCriterionServiceInterface campaignCriterionService = 
getCampaignCriterionServiceInterface();

Selector selector = new Selector();
selector.setFields(new String[] {Id, CampaignId, 
PlatformName, CriteriaType, BidModifier, DayOfWeek,
StartHour, StartMinute, EndHour, EndMinute, 
LocationName, DisplayType, TargetingStatus,
ParentLocations, GeoPoint, RadiusDistanceUnits, 
RadiusInUnits, Address});
ListPredicate predicateList = new ArrayListPredicate();
Predicate campaignPredicate = new Predicate();
campaignPredicate.setField(CampaignId);
campaignPredicate.setOperator(PredicateOperator.EQUALS);
campaignPredicate.setValues(new 
String[]{String.valueOf(campaignId)});
predicateList.add(campaignPredicate);
selector.setPredicates(predicateList.toArray(new 
Predicate[predicateList.size()]));

CampaignCriterion[] campaignCriterions = null;
try {
campaignCriterions = 
campaignCriterionService.get(selector).getEntries();
} catch (ApiException e) {

} catch (RemoteException e) {

}

Regards,
Justin

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
For more options, visit https://groups.google.com/groups/opt_out.