Examples of CreativeSetServiceInterface


Examples of com.google.api.ads.dfp.axis.v201302.CreativeSetServiceInterface

  public static void runExample(
      DfpServices dfpServices, DfpSession session, long creativeSetId, long companionCreativeId)
      throws Exception {
    // 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

Examples of com.google.api.ads.dfp.axis.v201302.CreativeSetServiceInterface

  private static final String COMPANION_CREATIVE_ID = "INSERT_COMPANION_CREATIVE_ID_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session,
      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

Examples of com.google.api.ads.dfp.axis.v201302.CreativeSetServiceInterface

*/
public class GetAllCreativeSets {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Create a statement to get all creativeSets.
    StatementBuilder statementBuilder = new StatementBuilder()
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT);

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

    do {
      // Get creative sets by statement.
      CreativeSetPage page =
          creativeSetService.getCreativeSetsByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
View Full Code Here

Examples of com.google.api.ads.dfp.axis.v201302.CreativeSetServiceInterface

  private static final String MASTER_CREATIVE_ID = "INSERT_MASTER_CREATIVE_ID_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session,
      long masterCreativeId) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Create a statement to only select creative sets that have the
    // given master creative.
    StatementBuilder statementBuilder = new StatementBuilder()
        .where("masterCreativeId = :masterCreativeId")
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
        .withBindVariableValue("masterCreativeId", masterCreativeId);

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

    do {
      // Get creative sets by statement.
      CreativeSetPage page =
          creativeSetService.getCreativeSetsByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
View Full Code Here

Examples of com.google.api.ads.dfp.axis.v201306.CreativeSetServiceInterface

  public static void runExample(
      DfpServices dfpServices, DfpSession session, long creativeSetId, long companionCreativeId)
      throws Exception {
    // 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

Examples of com.google.api.ads.dfp.axis.v201306.CreativeSetServiceInterface

  private static final String COMPANION_CREATIVE_ID = "INSERT_COMPANION_CREATIVE_ID_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session,
      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

Examples of com.google.api.ads.dfp.axis.v201306.CreativeSetServiceInterface

*/
public class GetAllCreativeSets {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Create a statement to get all creativeSets.
    StatementBuilder statementBuilder = new StatementBuilder()
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT);

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

    do {
      // Get creative sets by statement.
      CreativeSetPage page =
          creativeSetService.getCreativeSetsByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
View Full Code Here

Examples of com.google.api.ads.dfp.axis.v201306.CreativeSetServiceInterface

  private static final String MASTER_CREATIVE_ID = "INSERT_MASTER_CREATIVE_ID_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session,
      long masterCreativeId) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Create a statement to only select creative sets that have the
    // given master creative.
    StatementBuilder statementBuilder = new StatementBuilder()
        .where("masterCreativeId = :masterCreativeId")
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
        .withBindVariableValue("masterCreativeId", masterCreativeId);

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

    do {
      // Get creative sets by statement.
      CreativeSetPage page =
          creativeSetService.getCreativeSetsByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
View Full Code Here

Examples of com.google.api.ads.dfp.axis.v201308.CreativeSetServiceInterface

  private static final String COMPANION_CREATIVE_ID = "INSERT_COMPANION_CREATIVE_ID_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session,
      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

Examples of com.google.api.ads.dfp.axis.v201308.CreativeSetServiceInterface

*/
public class GetAllCreativeSets {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the CreativeSetService.
    CreativeSetServiceInterface creativeSetService =
        dfpServices.get(session, CreativeSetServiceInterface.class);

    // Create a statement to get all creativeSets.
    StatementBuilder statementBuilder = new StatementBuilder()
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT);

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

    do {
      // Get creative sets by statement.
      CreativeSetPage page =
          creativeSetService.getCreativeSetsByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
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.