Package com.google.api.ads.adwords.jaxws.utils.v201309

Examples of com.google.api.ads.adwords.jaxws.utils.v201309.SelectorBuilder


        adWordsServices.get(session, CampaignServiceInterface.class);

    int offset = 0;

    // Create selector.
    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder
        .fields("Id", "Name")
        .orderAscBy("Name")
        .offset(offset)
        .limit(PAGE_SIZE)
        .build();

    CampaignPage page = null;
    do {
      // Get all campaigns.
      page = campaignService.get(selector);

      // Display campaigns.
      if (page.getEntries() != null) {
        for (Campaign campaign : page.getEntries()) {
          System.out.println("Campaign with name \"" + campaign.getName() + "\" and id \""
              + campaign.getId() + "\" was found.");
        }
      } else {
        System.out.println("No campaigns were found.");
      }

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


        adWordsServices.get(session, MediaServiceInterface.class);

    int offset = 0;

    // Create selector.
    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder
        .fields("MediaId", "Width", "Height", "MimeType")
        .orderAscBy("MediaId")
        .offset(offset)
        .limit(PAGE_SIZE)
        .in("Type", "IMAGE", "VIDEO")
        .build();

    MediaPage page = null;

    do {
      // Get all images.
      page = mediaService.get(selector);

      // Display images.
      if (page != null && page.getEntries() != null) {
        for (Media media : page.getEntries()) {
          Map<MediaSize, Dimensions> dimensions = Maps.toMap(media.getDimensions());
          System.out.printf("Media with ID %d, dimensions %s, and MIME type '%s' was found.%n",
              media.getMediaId(), toString(dimensions.get(MediaSize.FULL)), media.getMediaType());
        }
      } else {
        System.out.println("No images/videos were found.");
      }
      offset += PAGE_SIZE;
      selector = builder.increaseOffsetBy(PAGE_SIZE).build();
    } while (offset < page.getTotalNumEntries());
  }
View Full Code Here

    int offset = 0;
    boolean morePages = true;

    // Create selector.
    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder
        .fields("Id", "Name")
        .orderAscBy("Name")
        .offset(offset)
        .limit(PAGE_SIZE)
        .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

    // Get the ServicedAccountService.
    ManagedCustomerServiceInterface managedCustomerService =
        adWordsServices.get(session, ManagedCustomerServiceInterface.class);

    // Create selector.
    Selector selector = new SelectorBuilder()
        .fields("Login", "CustomerId", "Name")
        .build();

    // Get results.
    ManagedCustomerPage page = managedCustomerService.get(selector);
View Full Code Here

    // Get the AdGroupBidModifierService.
    AdGroupBidModifierServiceInterface adGroupBidModifierService =
        adWordsServices.get(session, AdGroupBidModifierServiceInterface.class);

    // Create selector.
    Selector selector = new SelectorBuilder()
        .fields("CampaignId", "AdGroupId", "BidModifier", "Id")
        .offset(0)
        .limit(PAGE_SIZE)
        .build();
View Full Code Here

    // Get the DataService.
    DataServiceInterface dataService =
        adWordsServices.get(session, DataServiceInterface.class);

    // Create selector.
    Selector selector = new SelectorBuilder()
        .fields(
            "AdGroupId",
            "CriterionId",
            "StartDate",
            "EndDate",
View Full Code Here

    PromotionServiceInterface promotionService =
        adWordsServices.get(session, PromotionServiceInterface.class);

    int offset = 0;

    Selector selector = new SelectorBuilder()
        .fields("PromotionId",
            "Name",
            "Status",
            "DestinationUrl",
            "StreetAddressVisible",
View Full Code Here

    int offset = 0;

    // To get all express businesses owned by the current customer,
    // simply skip the call to SelectorBuilder.equals below
    Selector selector = new SelectorBuilder()
        .fields("Id", "Name", "Website", "Address", "GeoPoint", "Status")
        .equals("Status", ExpressBusinessStatus.ACTIVE.getValue())
        .offset(offset)
        .limit(PAGE_SIZE)
        .build();
View Full Code Here

    ExpressBusinessServiceInterface businessService =
        adWordsServices.get(session, ExpressBusinessServiceInterface.class);

    // Get the business for the businessId. We will need its geo point to create
    // a Proximity criterion for the new Promotion.
    Selector businessSelector = new SelectorBuilder()
        .fields("Id", "GeoPoint")
        .equals("Id", String.valueOf(businessId))
        .build();

    ExpressBusiness business = businessService.get(businessSelector).getEntries(0);
View Full Code Here

      AdWordsSession session, String productServiceSuggestion, String localeText) throws Exception {
    ProductServiceServiceInterface service =
        adWordsServices.get(session, ProductServiceServiceInterface.class);

    int offset = 0;
    Selector selector = new SelectorBuilder()
        .fields("ProductServiceText")
        .equals("ProductServiceText", productServiceSuggestion)
        .equals("Locale", localeText)
        .offset(offset)
        .limit(PAGE_SIZE)
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.jaxws.utils.v201309.SelectorBuilder

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.