Package com.google.api.ads.adwords.axis.v201406.video

Examples of com.google.api.ads.adwords.axis.v201406.video.TargetingGroupOperation


    VideoAdOperation operation = new VideoAdOperation();
    operation.setOperand(ad);
    operation.setOperator(Operator.SET);

    VideoAdReturnValue result = videoAdService.mutate(new VideoAdOperation[] {operation});
   
    for (VideoAd videoAdResult : result.getValue()) {
      System.out.printf("Video ad with id %d was updated.%n",
          videoAdResult.getId());
    }
  }
View Full Code Here


  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long videoAdId)
          throws Exception {
    // Get the VideoCampaignService.
    VideoAdServiceInterface videoAdService =
        adWordsServices.get(session, VideoAdServiceInterface.class);

    VideoAdDisplayFormat_VideoAdStatusMapEntry trueViewStatus =
        new VideoAdDisplayFormat_VideoAdStatusMapEntry();
   
    trueViewStatus.setKey(VideoAdDisplayFormat.TRUE_VIEW_IN_DISPLAY);
    trueViewStatus.setValue(VideoAdStatus.PAUSED);

    VideoAd ad = new VideoAd();
    ad.setId(videoAdId);
    ad.setStatusByFormat(new VideoAdDisplayFormat_VideoAdStatusMapEntry[] {trueViewStatus});

    VideoAdOperation operation = new VideoAdOperation();
    operation.setOperand(ad);
    operation.setOperator(Operator.SET);

    VideoAdReturnValue result = videoAdService.mutate(new VideoAdOperation[] {operation});
   
    for (VideoAd videoAdResult : result.getValue()) {
      System.out.printf("Video ad with id %d was updated.%n",
          videoAdResult.getId());
    }
View Full Code Here

    targetingGroup.setCampaignId(campaignId);
   
    Money amount = new Money();
    amount.setMicroAmount(200000L);
   
    VideoBid videoBid = new VideoBid();
    videoBid.setAmount(amount);
   
    VideoAdDisplayFormat_VideoBidMapEntry trueViewBid =
        new VideoAdDisplayFormat_VideoBidMapEntry();
   
    trueViewBid.setKey(VideoAdDisplayFormat.TRUE_VIEW_IN_DISPLAY);
View Full Code Here

    // Get the VideoService.
    VideoServiceInterface videoService =
        adWordsServices.get(session, VideoServiceInterface.class);

    // Create the call to action.
    VideoCallToAction videoCallToAction = new VideoCallToAction();
    videoCallToAction.setId(videoId);
   
    CallToAction callToAction = new CallToAction();
    CallToActionCreative callToActionCreative = new CallToActionCreative();
    callToActionCreative.setHeadline("Mars cruise");
    callToActionCreative.setDisplayUrl("www.example.com/mars");
    callToActionCreative.setDestinationUrl("www.example.com/mars");
    callToAction.setCreative(callToActionCreative);
    videoCallToAction.setCallToAction(callToAction);

    VideoCallToActionOperation operation = new VideoCallToActionOperation();
    operation.setOperand(videoCallToAction);
   
    // Use SET to add a new Call to Action, or to overwrite an existing one.
View Full Code Here

    callToActionCreative.setDisplayUrl("www.example.com/mars");
    callToActionCreative.setDestinationUrl("www.example.com/mars");
    callToAction.setCreative(callToActionCreative);
    videoCallToAction.setCallToAction(callToAction);

    VideoCallToActionOperation operation = new VideoCallToActionOperation();
    operation.setOperand(videoCallToAction);
   
    // Use SET to add a new Call to Action, or to overwrite an existing one.
    operation.setOperator(Operator.SET);

    VideoCallToActionOperation[] operations = new VideoCallToActionOperation[] {operation};

    // Add video call to action.
    VideoReturnValue result = videoService.mutateCallToAction(operations);
View Full Code Here

    // Get the VideoCampaignService.
    VideoCampaignServiceInterface videoCampaignService =
        adWordsServices.get(session, VideoCampaignServiceInterface.class);

    // Create video campaign.
    VideoCampaign videoCampaign = new VideoCampaign();
    videoCampaign.setName("Interplanetary Cruise #"
        + System.currentTimeMillis());
    videoCampaign.setStatus(VideoCampaignStatus.PAUSED);
    VideoAdNetworks networks = new VideoAdNetworks();
    networks.setNetworks(new VideoAdNetwork[] {
        VideoAdNetwork.GOOGLE_DISPLAY_NETWORK,
        VideoAdNetwork.YOUTUBE_WATCH});
    videoCampaign.setNetworks(networks);

    // You can optionally provide these field(s).
    videoCampaign.setStartDate(new DateTime().plusDays(1).toString("yyyyMMdd"));
    videoCampaign.setBudgetId(budgetId);

    // Create operations.
    VideoCampaignOperation operation = new VideoCampaignOperation();
    operation.setOperand(videoCampaign);
    operation.setOperator(Operator.ADD);
View Full Code Here

      AdWordsSession session, Long campaignId) throws Exception {
    // Get the VideoCampaignCriterionService.
    VideoCampaignCriterionServiceInterface videoCampaignCriterionService =
        adWordsServices.get(session, VideoCampaignCriterionServiceInterface.class);
   
    VideoCampaignCriterion criterion = new VideoCampaignCriterion();
    criterion.setCampaignId(campaignId);
   
    // This creates an English language criterion
    // For a list of languages, see ConstantDataService
    LanguageVideoCriterion englishCriterion = new LanguageVideoCriterion();
    englishCriterion.setId(1001L);
    criterion.setCriterion(englishCriterion);
   
    VideoCampaignCriterionOperation operation =
        new VideoCampaignCriterionOperation();
    operation.setOperand(criterion);
    operation.setOperator(Operator.ADD);
View Full Code Here

    // For a list of languages, see ConstantDataService
    LanguageVideoCriterion englishCriterion = new LanguageVideoCriterion();
    englishCriterion.setId(1001L);
    criterion.setCriterion(englishCriterion);
   
    VideoCampaignCriterionOperation operation =
        new VideoCampaignCriterionOperation();
    operation.setOperand(criterion);
    operation.setOperator(Operator.ADD);
   
    VideoCampaignCriterionReturnValue result = videoCampaignCriterionService.mutate(
        new VideoCampaignCriterionOperation[] {operation});
   
    for (VideoCampaignCriterion videoCampaignCriterionResult : result.getValue()) {
View Full Code Here

    // Select only from active campaigns.
    selector.setCampaignStatuses(
        new VideoCampaignStatus[] {VideoCampaignStatus.ENABLED});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    VideoCampaignCriterionPage page;
    do {
      // Get all criteria for the campaign.
      page = videoCampaignCriterionService.get(selector);

      // Display criteria.
      if (page.getEntries() != null) {
        for (VideoCampaignCriterion videoCampaignCriterion : page.getEntries()) {
          String negative = (videoCampaignCriterion instanceof NegativeVideoCampaignCriterion)
              ? " (negative)"
              : "";
          System.out.printf("Video%s criterion ID '%d' of type '%s' was found.%n",
              negative,
              videoCampaignCriterion.getCriterion().getId(),
              videoCampaignCriterion.getCriterion().getBaseCriterionType());
        }
      } else {
        System.out.println("No criteria were found.");
      }

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

    VideoCampaignCriterionOperation operation =
        new VideoCampaignCriterionOperation();
    operation.setOperand(criterion);
    operation.setOperator(Operator.ADD);
   
    VideoCampaignCriterionReturnValue result = videoCampaignCriterionService.mutate(
        new VideoCampaignCriterionOperation[] {operation});
   
    for (VideoCampaignCriterion videoCampaignCriterionResult : result.getValue()) {
      System.out.printf("Video campaign criterion with campaign id %d, "
          + "criterion id %d, and type '%s' was added.%n",
          videoCampaignCriterionResult.getCampaignId(),
          videoCampaignCriterionResult.getCriterion().getId(),
          videoCampaignCriterionResult.getCriterion().getBaseCriterionType());
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201406.video.TargetingGroupOperation

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.