2

クライアント センター アカウントからすべての clientID を取得したいと考えています。私はこのコードを使用しています

              AdWordsUser user = new AdWordsUser(adwordsPropertyService.getEmail(), adwordsPropertyService.getPassword(),
                      null, adwordsPropertyService.getUseragent(), adwordsPropertyService.getDeveloperToken(),
                      adwordsPropertyService.getUseSandbox());

              InfoServiceInterface infoService = user.getService(AdWordsService.V201109.INFO_SERVICE);


              InfoSelector selector = new InfoSelector();
              selector.setApiUsageType(ApiUsageType.UNIT_COUNT_FOR_CLIENTS);
              String today = new SimpleDateFormat("yyyyMMdd").format(new Date());
              selector.setDateRange(new DateRange(today, today));
              selector.setIncludeSubAccounts(true);

              ApiUsageInfo apiUsageInfo = infoService.get(selector);
              for (ApiUsageRecord record : apiUsageInfo.getApiUsageRecords()) {
                      ......

しかし、apiUsageInfo.getApiUsageRecords は私の唯一の clientId を返します。何か提案はありますか?

4

2 に答える 2

1

clientCustomerIds のリストだけが必要な場合は、ServicedAccountService を試してください。これを行う方法を示すコード例を次に示します

次回は、AdWords API の公式フォーラム ( https://groups.google.com/forum/?fromgroups#!forum/adwords-api ) で質問することも検討してください。

于 2012-06-27T05:25:30.930 に答える