Package com.google.api.adwords.v200909.cm

Examples of com.google.api.adwords.v200909.cm.AdGroupPage


        user.getService(AdWordsService.V200909.ADGROUP_CRITERION_SERVICE);

    Long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");

    // Create selector to get all criteria under ad group.
    AdGroupCriterionSelector selector = new AdGroupCriterionSelector();
    selector.setIdFilters(new AdGroupCriterionIdFilter[] {
        new AdGroupCriterionIdFilter(null, adGroupId, null)});

    Map<Keyword, KeywordTraffic> keywordTrafficMap = new HashMap<Keyword, KeywordTraffic>();

    // Get all keywords for ad group.
View Full Code Here


    // Get v13 traffic estimator service.
    TrafficEstimatorInterface trafficEstimatorService =
        user.getService(AdWordsService.V13.TRAFFIC_ESTIMATOR_SERVICE);

    // Get v200909 AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        user.getService(AdWordsService.V200909.ADGROUP_CRITERION_SERVICE);

    Long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");

    // Create selector to get all criteria under ad group.
    AdGroupCriterionSelector selector = new AdGroupCriterionSelector();
    selector.setIdFilters(new AdGroupCriterionIdFilter[] {
        new AdGroupCriterionIdFilter(null, adGroupId, null)});

    Map<Keyword, KeywordTraffic> keywordTrafficMap = new HashMap<Keyword, KeywordTraffic>();

    // Get all keywords for ad group.
    AdGroupCriterionPage page = adGroupCriterionService.get(selector);

    if (page.getEntries() != null) {
      for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
        if (adGroupCriterion.getCriterion() instanceof Keyword) {
          keywordTrafficMap.put((Keyword) adGroupCriterion.getCriterion(), null);
View Full Code Here

          adGroup.setBids(new ManualCPCAdGroupBids(null, new Bid(new Money("USD",
              generator.nextInt(10) * 50000L + 50000L)), null, null));
          adGroup.setCampaignId(campaign.getId());

          AdGroupReturnValue adGroupReturnValue =
              adGroupService.mutate(new AdGroupOperation[] {new AdGroupOperation(Operator.ADD,
                  null, adGroup)});
          adGroup = adGroupReturnValue.getValue()[0];
        }

        int numAds = generator.nextInt(10) + 1;
View Full Code Here

      campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});

      int numAdGrp = generator.nextInt(6) + 1;
      for (int j = 0; j < numAdGrp; j++) {
        AdGroupPage adGroupPage =
            adGroupService.get(new AdGroupSelector(campaign.getId(), null, null, null));
        AdGroup[] adGroups = adGroupPage.getEntries();
        AdGroup adGroup = null;
        if (adGroups != null && j < adGroups.length) {
          adGroup = adGroups[j];
        } else {
          adGroup = new AdGroup();
View Full Code Here

          adGroup.setName("AdGroup " + (j + 1));
          adGroup.setBids(new ManualCPCAdGroupBids(null, new Bid(new Money("USD",
              generator.nextInt(10) * 50000L + 50000L)), null, null));
          adGroup.setCampaignId(campaign.getId());

          AdGroupReturnValue adGroupReturnValue =
              adGroupService.mutate(new AdGroupOperation[] {new AdGroupOperation(Operator.ADD,
                  null, adGroup)});
          adGroup = adGroupReturnValue.getValue()[0];
        }

        int numAds = generator.nextInt(10) + 1;
        for (int k = 0; k < numAds; k++) {
          TextAd ad = new TextAd();
View Full Code Here

      campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});

      int numAdGrp = generator.nextInt(6) + 1;
      for (int j = 0; j < numAdGrp; j++) {
        AdGroupPage adGroupPage =
            adGroupService.get(new AdGroupSelector(campaign.getId(), null, null, null));
        AdGroup[] adGroups = adGroupPage.getEntries();
        AdGroup adGroup = null;
        if (adGroups != null && j < adGroups.length) {
          adGroup = adGroups[j];
        } else {
View Full Code Here

                testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
            AdGroupServiceInterface adGroupService =
                testUser.getService(AdWordsService.V200909.ADGROUP_SERVICE);

            campaignService.get(new CampaignSelector());
            adGroupService.get(new AdGroupSelector());

            ServiceAccountant campaignServiceAccountant =
                ServiceAccountantManager.getInstance().getServiceAccountant(campaignService);

            ServiceAccountant adGroupServiceAccountant =
View Full Code Here

        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    AdGroupServiceInterface adGroupService =
        testUser.getService(AdWordsService.V200909.ADGROUP_SERVICE);

    campaignService.get(new CampaignSelector());
    adGroupService.get(new AdGroupSelector());
  }
View Full Code Here

            AdWordsUser testUser = new AdWordsUser("test_data/test.properties");
            ServiceAccountantManager.getInstance().setAutoCreateAccountant(true);

            CampaignServiceInterface campaignService =
                testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
            AdGroupServiceInterface adGroupService =
                testUser.getService(AdWordsService.V200909.ADGROUP_SERVICE);

            campaignService.get(new CampaignSelector());
            adGroupService.get(new AdGroupSelector());

            ServiceAccountant campaignServiceAccountant =
                ServiceAccountantManager.getInstance().getServiceAccountant(campaignService);

            ServiceAccountant adGroupServiceAccountant =
View Full Code Here

  private void performOperations() throws Exception {
    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    AdGroupServiceInterface adGroupService =
        testUser.getService(AdWordsService.V200909.ADGROUP_SERVICE);

    campaignService.get(new CampaignSelector());
    adGroupService.get(new AdGroupSelector());
  }
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v200909.cm.AdGroupPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.