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

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


      // Get the LocationCriterionService.
      LocationCriterionServiceInterface locationCriterionService =
          user.getService(AdWordsService.V201306.LOCATION_CRITERION_SERVICE);

      String[] locationNames = new String[] {"Paris", "Quebec", "Spain", "Deutschland"};
      Selector selector = new Selector();
      selector.setFields(new String[] {
          "Id",
          "LocationName",
          "CanonicalName",
          "DisplayType",
          "ParentLocations",
          "Reach",
          "TargetingStatus"});

      selector.setPredicates(new Predicate[] {
          // Location names must match exactly, only EQUALS and IN are
          // supported.
          new Predicate("LocationName", PredicateOperator.IN, locationNames),
          // Set the locale of the returned location names.
          new Predicate("Locale", PredicateOperator.EQUALS, new String[] {"en"})});
View Full Code Here


          user.getService(AdWordsService.V201306.ADGROUP_CRITERION_SERVICE);

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

      // Create selector.
      Selector selector = new Selector();
      selector.setFields(new String[] {"Id", "AdGroupId"});
      selector.setOrdering(new OrderBy[] {new OrderBy("AdGroupId", SortOrder.ASCENDING)});

      // Create predicates.
      Predicate adGroupIdPredicate =
          new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
      selector.setPredicates(new Predicate[] {adGroupIdPredicate});

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

      // Display ad group criteria.
View Full Code Here

      // Get the ConversionTrackerService.
      ConversionTrackerServiceInterface service =
          user.getService(AdWordsService.V201306.CONVERSION_TRACKER_SERVICE);

      // Create selector.
      Selector selector = new Selector();
      selector.setFields(new String[] {"Name", "Status", "Category"});
      selector.setOrdering(new OrderBy[] {new OrderBy("Name", SortOrder.ASCENDING)});

      // Get all conversions.
      ConversionTrackerPage page = service.get(selector);

      // Display conversions.
View Full Code Here

          user.getService(AdWordsService.V201306.CAMPAIGN_AD_EXTENSION_SERVICE);

      Long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_HERE");

      // Create selector.
      Selector selector = new Selector();
      selector.setFields(new String[] {"AdExtensionId", "CampaignId"});
      selector.setOrdering(new OrderBy[] {new OrderBy("AdExtensionId", SortOrder.ASCENDING)});

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

      // Get all campaign ad extensions.
      CampaignAdExtensionPage page = campaignAdExtensionService.get(selector);

      // Display campaign ad extensions.
View Full Code Here

      // Get the MediaService.
      MediaServiceInterface mediaService =
          user.getService(AdWordsService.V201306.MEDIA_SERVICE);

      // Create selector.
      Selector selector = new Selector();
      selector.setFields(new String[] {"MediaId", "Width", "Height", "MimeType"});
      selector.setOrdering(new OrderBy[] {new OrderBy("MediaId", SortOrder.ASCENDING)});

      // Create predicates.
      Predicate typePredicate =
          new Predicate("Type", PredicateOperator.IN, new String[] {"IMAGE"});
      selector.setPredicates(new Predicate[] {typePredicate});

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

      // Display images.
View Full Code Here

        // Create predicate and selector.
        Predicate predicate = new Predicate();
        predicate.setField("Id");
        predicate.setOperator(PredicateOperator.IN);
        predicate.setValues(conversionIds.toArray(new String[0]));
        Selector selector = new Selector();
        selector.setFields(new String[] {"Id"});
        selector.setPredicates(new Predicate[] {predicate});

        // Get all conversion trackers.
        Map<Long, AdWordsConversionTracker> conversionTrackers =
            new HashMap<Long, AdWordsConversionTracker>();
        ConversionTrackerPage page = conversionTrackerService.get(selector);
View Full Code Here

        user.getService(AdWordsService.V201306.ADGROUP_BID_MODIFIER_SERVICE);

    int offset = 0;

    // Create selector.
    Selector selector = new Selector();
    selector.setFields(new String[] {"CampaignId", "AdGroupId", "BidModifier", "Id"});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    AdGroupBidModifierPage page = bidModifierService.get(selector);
    if (page.getEntries() != null) {
      for (AdGroupBidModifier bidModifierResult : page.getEntries()) {
        String bidModifierValue =
View Full Code Here

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

      // Create selector.
      Selector selector = new Selector();
      selector.setFields(new String[] {"AdGroupId", "CriterionId", "StartDate", "EndDate",
          "Bid", "LocalClicks", "LocalCost", "MarginalCpc", "LocalImpressions"});

      // Create predicates.
      Predicate adGroupIdPredicate =
          new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
      Predicate criterionIdPredicate =
          new Predicate("CriterionId", PredicateOperator.IN, new String[] {criterionId.toString()});
      selector.setPredicates(new Predicate[] {adGroupIdPredicate, criterionIdPredicate});

      // Get bid landscape for ad group criteria.
      CriterionBidLandscapePage page = dataService.getCriterionBidLandscape(selector);

      // Display bid landscapes.
View Full Code Here

    // Get the CampaignService.
    CampaignServiceInterface campaignService =
        user.getService(AdWordsService.V201306.CAMPAIGN_SERVICE);

    // Get all campaigns using proxy.
    campaignService.get(new Selector());
  }
View Full Code Here

  private static void makeApiRequest(AdWordsUser user) throws ServiceException, RemoteException,
      ApiException {
    // Service will use the auth token which was set by user.setAuthToken().
    CampaignServiceInterface campaignService =
        user.getService(AdWordsService.V201306.CAMPAIGN_SERVICE);
    campaignService.get(new Selector());
    System.out.println("Service call was successful.");
  }
View Full Code Here

TOP

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

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.