Package com.google.api.adwords.v201306.cm

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


          user.getService(AdWordsService.V201306.CAMPAIGN_CRITERION_SERVICE);

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

      // Create keyword.
      Keyword keyword = new Keyword();
      keyword.setText("jupiter cruise");
      keyword.setMatchType(KeywordMatchType.BROAD);

      // Create negative campaign criterion.
      NegativeCampaignCriterion negativeCampaignCriterion = new NegativeCampaignCriterion();
      negativeCampaignCriterion.setCampaignId(campaignId);
      negativeCampaignCriterion.setCriterion(keyword);
View Full Code Here


      budget.setPeriod(BudgetBudgetPeriod.DAILY);
      budget.setAmount(new Money(null, 50000000L));
      budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
      goodCampaign.setBudget(budget);

      KeywordMatchSetting keywordMatch = new KeywordMatchSetting();
      keywordMatch.setOptIn(Boolean.TRUE);
      goodCampaign.setSettings(new Setting[] {keywordMatch});
     
      // Create operations.
      CampaignOperation operation = new CampaignOperation();
      operation.setOperand(goodCampaign);
View Full Code Here

      CampaignEstimateRequest campaignEstimateRequest = new CampaignEstimateRequest();
      campaignEstimateRequest.setAdGroupEstimateRequests(
          adGroupEstimateRequests.toArray(new AdGroupEstimateRequest[]{}));
      Location unitedStates = new Location();
      unitedStates.setId(2840L);
      Language english = new Language();
      english.setId(1000L);
      campaignEstimateRequest.setCriteria(new Criterion[]{unitedStates, english});
      campaignEstimateRequests.add(campaignEstimateRequest);

      // Create selector.
      TrafficEstimatorSelector selector = new TrafficEstimatorSelector();
View Full Code Here

      List<CampaignEstimateRequest> campaignEstimateRequests =
        new ArrayList<CampaignEstimateRequest>();
      CampaignEstimateRequest campaignEstimateRequest = new CampaignEstimateRequest();
      campaignEstimateRequest.setAdGroupEstimateRequests(
          adGroupEstimateRequests.toArray(new AdGroupEstimateRequest[]{}));
      Location unitedStates = new Location();
      unitedStates.setId(2840L);
      Language english = new Language();
      english.setId(1000L);
      campaignEstimateRequest.setCriteria(new Criterion[]{unitedStates, english});
      campaignEstimateRequests.add(campaignEstimateRequest);
View Full Code Here

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

      // Create locations. The IDs can be found in the documentation or
      // retrieved with the LocationCriterionService.
      Location california = new Location();
      california.setId(21137L);
      Location mexico = new Location();
      mexico.setId(2484L);

      // Create languages. The IDs can be found in the documentation or
      // retrieved with the ConstantDataService.
      Language english = new Language();
      english.setId(1000L);
View Full Code Here

      // Create campaign.
      Campaign goodCampaign = new Campaign();
      goodCampaign.setName("Campaign #" + System.currentTimeMillis());
      goodCampaign.setStatus(CampaignStatus.PAUSED);
      BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration();
      ManualCpcBiddingScheme manualCpc = new ManualCpcBiddingScheme();
      manualCpc.setEnhancedCpcEnabled(false);
      biddingConfig.setBiddingScheme(manualCpc);
      goodCampaign.setBiddingStrategyConfiguration(biddingConfig);

      // Create budget.
      Budget budget = new Budget();
View Full Code Here

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

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

      // Display videos.
      if (page.getEntries() != null) {
        for (Media video : page.getEntries()) {
          System.out.println("Video with id '" + video.getMediaId()
              + "' and name '" + video.getName() + "' was found.");
        }
      } else {
        System.out.println("No videos were found.");
View Full Code Here

      // Get AdWordsUser from "~/adwords.properties".
      AdWordsUser user = new AdWordsUser();

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

      // Create image.
      Image image = new Image();
      image.setData(ImageUtils.getImageDataFromUrl("http://goo.gl/HJM3L"));
      image.setType(MediaMediaType.IMAGE);

      Media[] media = new Media[] {image};

      // Upload image.
      Media[] result = mediaService.upload(media);

      // Display images.
      if (result != null) {
        image = (Image) result[0];
        Map<MediaSize, Dimensions> dimensions = MapUtils.toMap(image.getDimensions());
View Full Code Here

      // Get AdWordsUser from "~/adwords.properties".
      AdWordsUser user = new AdWordsUser();

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

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

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

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

      // Display videos.
      if (page.getEntries() != null) {
        for (Media video : page.getEntries()) {
          System.out.println("Video with id '" + video.getMediaId()
View Full Code Here

      List<AdGroupEstimateRequest> adGroupEstimateRequests =
          new ArrayList<AdGroupEstimateRequest>();
      AdGroupEstimateRequest adGroupEstimateRequest = new AdGroupEstimateRequest();
      adGroupEstimateRequest.setKeywordEstimateRequests(
          keywordEstimateRequests.toArray(new KeywordEstimateRequest[]{}));
      adGroupEstimateRequest.setMaxCpc(new Money(null, 1000000L));
      adGroupEstimateRequests.add(adGroupEstimateRequest);

      // Create campaign estimate requests.
      List<CampaignEstimateRequest> campaignEstimateRequests =
        new ArrayList<CampaignEstimateRequest>();
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201306.cm.Location

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.