Examples of VideoTargetingGroupServiceInterface


Examples of com.google.api.ads.adwords.axis.v201402.video.VideoTargetingGroupServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session,
      Long campaignId, Long targetingGroupId) throws Exception {
    // Get the VideoTargetingGroupService.
    VideoTargetingGroupServiceInterface videoTargetingGroupService =
        adWordsServices.get(session, VideoTargetingGroupServiceInterface.class);

    TargetingGroup targetingGroup = new TargetingGroup();
    targetingGroup.setId(targetingGroupId);
    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);
    trueViewBid.setValue(videoBid);
    targetingGroup.setBidsByFormat(
        new BidsByFormat(new VideoAdDisplayFormat_VideoBidMapEntry[] {trueViewBid}));
   
    TargetingGroupOperation operation = new TargetingGroupOperation();
    operation.setOperator(Operator.SET);
    operation.setOperand(targetingGroup);

    TargetingGroupReturnValue result =
        videoTargetingGroupService.mutate(new TargetingGroupOperation[] {operation});
   
    for (TargetingGroup targetingGroupResult : result.getValue()) {
      System.out.printf("Targeting group with campaign id %d, "
          + "and targeting group id %d was updated.%n",
          targetingGroupResult.getCampaignId(),
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.video.VideoTargetingGroupServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long campaignId)
          throws Exception {
    // Get the VideoTargetingGroupService.
    VideoTargetingGroupServiceInterface videoTargetingGroupService =
        adWordsServices.get(session, VideoTargetingGroupServiceInterface.class);

    int offset = 0;

    // Create selector.
    TargetingGroupSelector selector = new TargetingGroupSelector();
    selector.setCampaignIds(new long[] {campaignId});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    TargetingGroupPage page;
    do {
      // Get all targeting groups for this account.
      page = videoTargetingGroupService.get(selector);

      // Display targeting groups.
      if (page.getEntries() != null) {
        for (TargetingGroup targetingGroup : page.getEntries()) {
          System.out.printf("Targeting group id %d, campaign id '%d', "
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.video.VideoTargetingGroupServiceInterface

  }

  public static void runExample(AdWordsServices adWordsServices,
      AdWordsSession session, Long campaignId) throws Exception {
    // Get the VideoTargetingGroupService.
    VideoTargetingGroupServiceInterface videoTargetingGroupService =
        adWordsServices.get(session, VideoTargetingGroupServiceInterface.class);

    TargetingGroup targetingGroup = new TargetingGroup();
    targetingGroup.setCampaignId(campaignId);
    targetingGroup.setName("My Targeting Group #" + System.currentTimeMillis());

    TargetingGroupOperation operation = new TargetingGroupOperation();
    operation.setOperand(targetingGroup);
    operation.setOperator(Operator.ADD);

    TargetingGroupReturnValue result =
        videoTargetingGroupService.mutate(new TargetingGroupOperation[] {operation});

    for (TargetingGroup targetingGroupResult : result.getValue()) {
      System.out.printf("Targeting group with campaign id %d,"
          + " and targeting group id %d was added.%n",
          targetingGroupResult.getCampaignId(), targetingGroupResult.getId());
View Full Code Here

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

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session,
      Long campaignId, Long targetingGroupId) throws Exception {
    // Get the VideoTargetingGroupService.
    VideoTargetingGroupServiceInterface videoTargetingGroupService =
        adWordsServices.get(session, VideoTargetingGroupServiceInterface.class);

    TargetingGroup targetingGroup = new TargetingGroup();
    targetingGroup.setId(targetingGroupId);
    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);
    trueViewBid.setValue(videoBid);
    targetingGroup.setBidsByFormat(
        new BidsByFormat(new VideoAdDisplayFormat_VideoBidMapEntry[] {trueViewBid}));
   
    TargetingGroupOperation operation = new TargetingGroupOperation();
    operation.setOperator(Operator.SET);
    operation.setOperand(targetingGroup);

    TargetingGroupReturnValue result =
        videoTargetingGroupService.mutate(new TargetingGroupOperation[] {operation});
   
    for (TargetingGroup targetingGroupResult : result.getValue()) {
      System.out.printf("Targeting group with campaign id %d, "
          + "and targeting group id %d was updated.%n",
          targetingGroupResult.getCampaignId(),
View Full Code Here

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

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long campaignId)
          throws Exception {
    // Get the VideoTargetingGroupService.
    VideoTargetingGroupServiceInterface videoTargetingGroupService =
        adWordsServices.get(session, VideoTargetingGroupServiceInterface.class);

    int offset = 0;

    // Create selector.
    TargetingGroupSelector selector = new TargetingGroupSelector();
    selector.setCampaignIds(new long[] {campaignId});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    TargetingGroupPage page;
    do {
      // Get all targeting groups for this account.
      page = videoTargetingGroupService.get(selector);

      // Display targeting groups.
      if (page.getEntries() != null) {
        for (TargetingGroup targetingGroup : page.getEntries()) {
          System.out.printf("Targeting group id %d, campaign id '%d', "
View Full Code Here

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

  }

  public static void runExample(AdWordsServices adWordsServices,
      AdWordsSession session, Long campaignId) throws Exception {
    // Get the VideoTargetingGroupService.
    VideoTargetingGroupServiceInterface videoTargetingGroupService =
        adWordsServices.get(session, VideoTargetingGroupServiceInterface.class);

    TargetingGroup targetingGroup = new TargetingGroup();
    targetingGroup.setCampaignId(campaignId);
    targetingGroup.setName("My Targeting Group #" + System.currentTimeMillis());

    TargetingGroupOperation operation = new TargetingGroupOperation();
    operation.setOperand(targetingGroup);
    operation.setOperator(Operator.ADD);

    TargetingGroupReturnValue result =
        videoTargetingGroupService.mutate(new TargetingGroupOperation[] {operation});

    for (TargetingGroup targetingGroupResult : result.getValue()) {
      System.out.printf("Targeting group with campaign id %d,"
          + " and targeting group id %d was added.%n",
          targetingGroupResult.getCampaignId(), targetingGroupResult.getId());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.