Hi Joshua, Pete is correct, you need to need to pass in an empty selector. Here is an example using the PHP client library:
http://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v200909/GetAllCampaigns.php Also, ensure that the selector element has the correct namespace or else it won't be recognized by the API server. Best, - Eric Koleda, AdWords API Team On Mar 23, 3:18 pm, "Joshua J. Kugler" <[email protected]> wrote: > On Tuesday 23 March 2010, Pete Lavetsky (AdWords API Guru) elucidated > thus: > > > I just create a new instance of a CampaignSelector and pass it in. > > > public List<Campaign> getAllCampaigns() throws Exception { > > return get( new CampaignSelector() ); > > } > > > I don't know if you can approximate the same with PHP tho ... > > Yeah, I tried that too, and it threw the same error. Thanks for the > tip, though. > > j > > > > > > > > > On Mar 23, 3:04 pm, "Joshua J. Kugler" <[email protected]> wrote: > > > The documentation for CampaignService.get() says: > > > > Parameters > > > selector CampaignSelector filter to run campaigns through. If > > > selector is empty, all campaigns are returned. > > > > But if I execute: > > > CampaignService.get() > > > or > > > CampaignService.get({}) > > > > I get: Server raised fault: '[RequiredError.REQUIRED @ selector]' > > > > OK, so let's specify a selector. The docs for type CampaignSelector > > > say: > > > > ids: The list of possible campaigns to be selected. ***An empty > > > list indicates all account campaigns as possibly being selected.*** > > > This field must contain distinct elements. This field must not > > > contain null elements. > > > > campaignStatuses: Only campaigns having these statuses are > > > selected. ***An empty list indicates all campaign statuses as being > > > selected.*** This field must contain distinct elements. This field > > > must not contain null elements. > > > > statsSelector: ***Indicates if stats should be returned; null will > > > not return stats.*** > > > > paging: The starting index and number of results to return. > > > > So, with this selector: > > > > selector = { > > > 'ids': [], > > > 'campaignStatuses':[], > > > 'statsSelector': None, > > > 'paging':{ > > > 'startIndex':0, > > > 'numberResults':999999999 > > > } > > > > } > > > > I still get: Server raised fault: '[RequiredError.REQUIRED @ > > > selector]' Same error message if I leave out statsSelector > > > completely, or set it to {} > > > > What, exactly, is required? It would be nice if the server fault > > > told me what was missing. :) > > > > Thanks! > > > > j > > > > -- > > > Joshua Kugler > > > Part-Time System Admin/Programmerhttp://www.eeinternet.com > > > PGP Key:http://pgp.mit.edu/ID 0x73B13B6A > > -- > Joshua Kugler > Part-Time System Admin/Programmerhttp://www.eeinternet.com > PGP Key:http://pgp.mit.edu/ID 0x73B13B6A -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Have you migrated to v200909 yet? The v13 sunset is on April 22, 2010. 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 [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 To unsubscribe from this group, send email to adwords-api+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
