Package com.google.api.ads.adwords.axis.v201309.cm

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


    Predicate approvalStatusPredicate = new Predicate(
        "AdGroupCreativeApprovalStatus", PredicateOperator.IN, new String[] {"DISAPPROVED"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, approvalStatusPredicate});

    // Get all disapproved ads.
    AdGroupAdPage page = adGroupAdService.get(selector);

    // Display ads.
    if (page.getEntries() != null && page.getEntries().length > 0) {
      for (AdGroupAd adGroupAd : page.getEntries()) {
        System.out.println("Ad with id \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
            + adGroupAd.getAd().getAdType() + "\" was disapproved for the following reasons:");
        for (String reason : adGroupAd.getAd().getDisapprovalReasons()) {
          System.out.println("  \"" + reason + "\"");
        }
View Full Code Here


    String query = String.format("SELECT Id, DisapprovalReasons "
        + "WHERE AdGroupId = %d AND AdGroupCreativeApprovalStatus = DISAPPROVED ORDER BY Id",
        adGroupId);

    // Get all disapproved ads.
    AdGroupAdPage page = adGroupAdService.query(query);

    // Display ads.
    if (page.getEntries() != null && page.getEntries().length > 0) {
      for (AdGroupAd adGroupAd : page.getEntries()) {
        System.out.println("Ad with id \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
            + adGroupAd.getAd().getAdType() + "\" was disapproved for the following reasons:");
        for (String reason : adGroupAd.getAd().getDisapprovalReasons()) {
          System.out.println("  \"" + reason + "\"");
        }
View Full Code Here

        new Predicate("AdType", PredicateOperator.EQUALS, new String[] {"THIRD_PARTY_REDIRECT_AD"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, statusPredicate, adTypePredicate});

    while (morePages) {
      // Get all ads.
      AdGroupAdPage page = adGroupAdService.get(selector);

      // Display ads.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupAd adGroupAd : page.getEntries()) {
          System.out.println("Ad with id  \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
              + adGroupAd.getAd().getAdType() + "\" was found.");
        }
      } else {
        System.out.println("No ads were found.");
      }

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

        new Predicate("AdType", PredicateOperator.EQUALS, new String[] {"TEXT_AD"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, statusPredicate, adTypePredicate});

    while (morePages) {
      // Get all ads.
      AdGroupAdPage page = adGroupAdService.get(selector);

      // Display ads.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupAd adGroupAd : page.getEntries()) {
          System.out.println("Ad with id  \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
              + adGroupAd.getAd().getAdType() + "\" was found.");
        }
      } else {
        System.out.println("No ads were found.");
      }

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

        appStore});

    clickToDownloadAppAd.setTemplateElements(new TemplateElement[] {adData});

    // Create the AdGroupAd.
    AdGroupAd clickToDownloadAppAdGroupAd = new AdGroupAd();
    clickToDownloadAppAdGroupAd.setAdGroupId(adGroupId);
    clickToDownloadAppAdGroupAd.setAd(clickToDownloadAppAd);

    // Optional: Set the status.
    clickToDownloadAppAdGroupAd.setStatus(AdGroupAdStatus.PAUSED);

    // Create the operation.
    AdGroupAdOperation operation = new AdGroupAdOperation();
    operation.setOperator(Operator.ADD);
    operation.setOperand(clickToDownloadAppAdGroupAd);
View Full Code Here

    // Optional: Set the status.
    clickToDownloadAppAdGroupAd.setStatus(AdGroupAdStatus.PAUSED);

    // Create the operation.
    AdGroupAdOperation operation = new AdGroupAdOperation();
    operation.setOperator(Operator.ADD);
    operation.setOperand(clickToDownloadAppAdGroupAd);

    // Create the ads.
    AdGroupAdReturnValue result = adGroupAdService.mutate(new AdGroupAdOperation[] {operation});

    for (AdGroupAd adGroupAd : result.getValue()) {
View Full Code Here

        new Predicate("AdType", PredicateOperator.EQUALS, new String[] {"TEXT_AD"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, statusPredicate, adTypePredicate});

    while (morePages) {
      // Get all ads.
      AdGroupAdPage page = adGroupAdService.get(selector);

      // Display ads.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupAd adGroupAd : page.getEntries()) {
          System.out.println("Ad with id  \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
              + adGroupAd.getAd().getAdType() + "\" was found.");
        }
      } else {
        System.out.println("No ads were found.");
      }

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

    Predicate approvalStatusPredicate = new Predicate(
        "AdGroupCreativeApprovalStatus", PredicateOperator.IN, new String[] {"DISAPPROVED"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, approvalStatusPredicate});

    // Get all disapproved ads.
    AdGroupAdPage page = adGroupAdService.get(selector);

    // Display ads.
    if (page.getEntries() != null && page.getEntries().length > 0) {
      for (AdGroupAd adGroupAd : page.getEntries()) {
        System.out.println("Ad with id \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
            + adGroupAd.getAd().getAdType() + "\" was disapproved for the following reasons:");
        for (String reason : adGroupAd.getDisapprovalReasons()) {
          System.out.println("  \"" + reason + "\"");
        }
View Full Code Here

    String query = String.format("SELECT Id, AdGroupAdDisapprovalReasons "
        + "WHERE AdGroupId = %d AND AdGroupCreativeApprovalStatus = DISAPPROVED ORDER BY Id",
        adGroupId);

    // Get all disapproved ads.
    AdGroupAdPage page = adGroupAdService.query(query);

    // Display ads.
    if (page.getEntries() != null && page.getEntries().length > 0) {
      for (AdGroupAd adGroupAd : page.getEntries()) {
        System.out.println("Ad with id \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
            + adGroupAd.getAd().getAdType() + "\" was disapproved for the following reasons:");
        for (String reason : adGroupAd.getDisapprovalReasons()) {
          System.out.println("  \"" + reason + "\"");
        }
View Full Code Here

        new Predicate("AdType", PredicateOperator.EQUALS, new String[] {"THIRD_PARTY_REDIRECT_AD"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, statusPredicate, adTypePredicate});

    while (morePages) {
      // Get all ads.
      AdGroupAdPage page = adGroupAdService.get(selector);

      // Display ads.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupAd adGroupAd : page.getEntries()) {
          System.out.println("Ad with id  \"" + adGroupAd.getAd().getId() + "\"" + " and type \""
              + adGroupAd.getAd().getAdType() + "\" was found.");
        }
      } else {
        System.out.println("No ads were found.");
      }

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

TOP

Related Classes of com.google.api.ads.adwords.axis.v201309.cm.AdGroupAdPage

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.