Examples of AdGroupPage


Examples of com.google.api.ads.adwords.axis.v201306.cm.AdGroupPage

        new Predicate("CampaignId", PredicateOperator.IN, new String[] {campaignId.toString()});
    selector.setPredicates(new Predicate[] {campaignIdPredicate});

    while (morePages) {
      // Get all ad groups.
      AdGroupPage page = adGroupService.get(selector);

      // Display ad groups.
      if (page.getEntries() != null) {
        for (AdGroup adGroup : page.getEntries()) {
          System.out.println("Ad group with name \"" + adGroup.getName() + "\" and id \""
              + adGroup.getId() + "\" was found.");
        }
      } else {
        System.out.println("No ad groups were found.");
      }

      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
      morePages = offset < page.getTotalNumEntries();
    }
  }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201309.cm.AdGroupPage

        new Predicate("CampaignId", PredicateOperator.IN, new String[] {campaignId.toString()});
    selector.setPredicates(new Predicate[] {campaignIdPredicate});

    while (morePages) {
      // Get all ad groups.
      AdGroupPage page = adGroupService.get(selector);

      // Display ad groups.
      if (page.getEntries() != null) {
        for (AdGroup adGroup : page.getEntries()) {
          System.out.println("Ad group with name \"" + adGroup.getName() + "\" and id \""
              + adGroup.getId() + "\" was found.");
        }
      } else {
        System.out.println("No ad groups were found.");
      }

      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
      morePages = offset < page.getTotalNumEntries();
    }
  }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.AdGroupPage

        .equals("CampaignId", campaignId.toString())
        .build();

    while (morePages) {
      // Get all ad groups.
      AdGroupPage page = adGroupService.get(selector);

      // Display ad groups.
      if (page.getEntries() != null) {
        for (AdGroup adGroup : page.getEntries()) {
          System.out.println("Ad group with name \"" + adGroup.getName() + "\" and id \""
              + adGroup.getId() + "\" was found.");
        }
      } else {
        System.out.println("No ad groups were found.");
      }

      offset += PAGE_SIZE;
      selector = builder.increaseOffsetBy(PAGE_SIZE).build();
      morePages = offset < page.getTotalNumEntries();
    }
  }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201406.cm.AdGroupPage

        .equals("CampaignId", campaignId.toString())
        .build();

    while (morePages) {
      // Get all ad groups.
      AdGroupPage page = adGroupService.get(selector);

      // Display ad groups.
      if (page.getEntries() != null) {
        for (AdGroup adGroup : page.getEntries()) {
          System.out.println("Ad group with name \"" + adGroup.getName() + "\" and id \""
              + adGroup.getId() + "\" was found.");
        }
      } else {
        System.out.println("No ad groups were found.");
      }

      offset += PAGE_SIZE;
      selector = builder.increaseOffsetBy(PAGE_SIZE).build();
      morePages = offset < page.getTotalNumEntries();
    }
  }
View Full Code Here

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

      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

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

    // Create the DateRange and AdGroupSelector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());

    selector.setStatsSelector(new StatsSelector(range, null));

    AdGroupPage page = adGroupService.get(selector);

    assertNotNull(page);
    assertEquals(new Integer(1), page.getTotalNumEntries());
    assertNotNull(page.getEntries(0).getStats());
  }
View Full Code Here

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

   * Test getting all ad groups in a campaign
   */
  public void testGetAllInCampaign() throws Exception{
    AdGroupSelector selector = new AdGroupSelector ();
    selector.setCampaignIds(new long[] {campaignId});
    AdGroupPage page = adGroupService.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
    assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >=1 );
  }
View Full Code Here

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

  /**
   * Test getting all ad groups.
   */
  public void testGetAll() throws Exception{
    AdGroupSelector selector = new AdGroupSelector();
    AdGroupPage page = adGroupService.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
    assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1);
  }
View Full Code Here

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

      Predicate campaignIdPredicate =
          new Predicate("CampaignId", PredicateOperator.IN, new String[] {campaignId.toString()});
      selector.setPredicates(new Predicate[] {campaignIdPredicate});

      // Get all ad groups.
      AdGroupPage page = adGroupService.get(selector);

      // Display ad groups.
      if (page.getEntries() != null) {
        for (AdGroup adGroup : page.getEntries()) {
          System.out.println("Ad group with name \"" + adGroup.getName()
              + "\" and id \"" + adGroup.getId() + "\" was found.");
        }
      } else {
        System.out.println("No ad groups were found.");
View Full Code Here

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

      Predicate campaignIdPredicate =
          new Predicate("CampaignId", PredicateOperator.IN, new String[] {campaignId.toString()});
      selector.setPredicates(new Predicate[] {campaignIdPredicate});

      // Get all ad groups.
      AdGroupPage page = adGroupService.get(selector);

      // Display ad groups.
      if (page.getEntries() != null) {
        for (AdGroup adGroup : page.getEntries()) {
          System.out.println("Ad group with name \"" + adGroup.getName()
              + "\" and id \"" + adGroup.getId() + "\" was found.");
        }
      } else {
        System.out.println("No ad groups were found.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.