Package com.google.api.ads.dfp.axis.v201311

Examples of com.google.api.ads.dfp.axis.v201311.CreativeSet


    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Get the creative set.
    CreativeSet creativeSet = creativeSetService.getCreativeSet(creativeSetId);

    // Add the companion creative to the creative set.
    creativeSet.setCompanionCreativeIds(
        Longs.concat(creativeSet.getCompanionCreativeIds(), new long[] {companionCreativeId}));

    // Update the creative set on the server.
    CreativeSet updatedCreativeSet = creativeSetService.updateCreativeSet(creativeSet);

    System.out.printf("A creative set with ID \"%d\", master creative ID \"%d\", "
        + "and companion creative IDs [%s] was updated.", updatedCreativeSet.getId(),
        updatedCreativeSet.getMasterCreativeId(),
        Longs.join(",", updatedCreativeSet.getCompanionCreativeIds()));
  }
View Full Code Here


      long masterCreativeId, long companionCreativeId) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    CreativeSet creativeSet = new CreativeSet();
    creativeSet.setName("Creative set #" + new Random().nextInt(Integer.MAX_VALUE));
    creativeSet.setMasterCreativeId(masterCreativeId);
    creativeSet.setCompanionCreativeIds(new long[] {companionCreativeId});

    // Create the creative set on the server.
    CreativeSet createdCreativeSet = creativeSetService.createCreativeSet(creativeSet);

    System.out.printf("A creative set with ID \"%d\", master creative ID \"%d\", "
        + "and companion creative IDs [%s] was created.\n", createdCreativeSet.getId(),
        createdCreativeSet.getMasterCreativeId(),
        Longs.join(",", createdCreativeSet.getCompanionCreativeIds()));
  }
View Full Code Here

    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Get the creative set.
    CreativeSet creativeSet = creativeSetService.getCreativeSet(creativeSetId);

    // Add the companion creative to the creative set.
    creativeSet.setCompanionCreativeIds(
        Longs.concat(creativeSet.getCompanionCreativeIds(), new long[] {companionCreativeId}));

    // Update the creative set on the server.
    CreativeSet updatedCreativeSet = creativeSetService.updateCreativeSet(creativeSet);

    System.out.printf("A creative set with ID \"%d\", master creative ID \"%d\", "
        + "and companion creative IDs [%s] was updated.", updatedCreativeSet.getId(),
        updatedCreativeSet.getMasterCreativeId(),
        Longs.join(",", updatedCreativeSet.getCompanionCreativeIds()));
  }
View Full Code Here

      long masterCreativeId, long companionCreativeId) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    CreativeSet creativeSet = new CreativeSet();
    creativeSet.setName("Creative set #" + new Random().nextInt(Integer.MAX_VALUE));
    creativeSet.setMasterCreativeId(masterCreativeId);
    creativeSet.setCompanionCreativeIds(new long[] {companionCreativeId});

    // Create the creative set on the server.
    CreativeSet createdCreativeSet = creativeSetService.createCreativeSet(creativeSet);

    System.out.printf("A creative set with ID \"%d\", master creative ID \"%d\", "
        + "and companion creative IDs [%s] was created.\n", createdCreativeSet.getId(),
        createdCreativeSet.getMasterCreativeId(),
        Longs.join(",", createdCreativeSet.getCompanionCreativeIds()));
  }
View Full Code Here

      long masterCreativeId, long companionCreativeId) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    CreativeSet creativeSet = new CreativeSet();
    creativeSet.setName("Creative set #" + new Random().nextInt(Integer.MAX_VALUE));
    creativeSet.setMasterCreativeId(masterCreativeId);
    creativeSet.setCompanionCreativeIds(new long[] {companionCreativeId});

    // Create the creative set on the server.
    CreativeSet createdCreativeSet = creativeSetService.createCreativeSet(creativeSet);

    System.out.printf("A creative set with ID \"%d\", master creative ID \"%d\", "
        + "and companion creative IDs [%s] was created.\n", createdCreativeSet.getId(),
        createdCreativeSet.getMasterCreativeId(),
        Longs.join(",", createdCreativeSet.getCompanionCreativeIds()));
  }
View Full Code Here

    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Get the creative set.
    CreativeSet creativeSet = creativeSetService.getCreativeSet(creativeSetId);

    // Add the companion creative to the creative set.
    creativeSet.setCompanionCreativeIds(
        Longs.concat(creativeSet.getCompanionCreativeIds(), new long[] {companionCreativeId}));

    // Update the creative set on the server.
    CreativeSet updatedCreativeSet = creativeSetService.updateCreativeSet(creativeSet);

    System.out.printf("A creative set with ID \"%d\", master creative ID \"%d\", "
        + "and companion creative IDs [%s] was updated.", updatedCreativeSet.getId(),
        updatedCreativeSet.getMasterCreativeId(),
        Longs.join(",", updatedCreativeSet.getCompanionCreativeIds()));
  }
View Full Code Here

    // Get the ActivityGroupService.
    ActivityGroupServiceInterface activityGroupService =
        dfpServices.get(session, ActivityGroupServiceInterface.class);

    // Get the activity group.
    ActivityGroup activityGroup = activityGroupService.getActivityGroup(activityGroupId);

    // Update the companies.
    activityGroup.setCompanyIds(
        Longs.concat(activityGroup.getCompanyIds(), new long[] {advertiserCompanyId}));

    // Update the activity group on the server.
    ActivityGroup[] activityGroups =
        activityGroupService.updateActivityGroups(new ActivityGroup[] {activityGroup});
View Full Code Here

    // Get the ActivityGroupService.
    ActivityGroupServiceInterface activityGroupService =
        dfpServices.get(session, ActivityGroupServiceInterface.class);

    // Create a short-term activity group.
    ActivityGroup shortTermActivityGroup = new ActivityGroup();
    shortTermActivityGroup.setName(
        "Short-term activity group #" + new Random().nextInt(Integer.MAX_VALUE));
    shortTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
    shortTermActivityGroup.setClicksLookback(1);
    shortTermActivityGroup.setImpressionsLookback(1);

    // Create a long-term activity group.
    ActivityGroup longTermActivityGroup = new ActivityGroup();
    longTermActivityGroup.setName(
        "Long-term activity group #" + new Random().nextInt(Integer.MAX_VALUE));
    longTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
    longTermActivityGroup.setClicksLookback(30);
    longTermActivityGroup.setImpressionsLookback(30);

    // Create the activity groups on the server.
    ActivityGroup[] activityGroups = activityGroupService.createActivityGroups(
        new ActivityGroup[] {shortTermActivityGroup, longTermActivityGroup});
View Full Code Here

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get activity groups by statement.
      ActivityGroupPage page =
          activityGroupService.getActivityGroupsByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (ActivityGroup activityGroup : page.getResults()) {
          System.out.printf(
              "%d) Activity group with ID \"%d\" and name \"%s\" was found.\n", i++,
              activityGroup.getId(), activityGroup.getName());
        }
      }
View Full Code Here

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get activity groups by statement.
      ActivityGroupPage page =
          activityGroupService.getActivityGroupsByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (ActivityGroup activityGroup : page.getResults()) {
          System.out.printf(
              "%d) Activity group with ID \"%d\" and name \"%s\" was found.\n", i++,
              activityGroup.getId(), activityGroup.getName());
        }
      }
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.axis.v201311.CreativeSet

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.