Package com.google.api.ads.dfp.v201308

Examples of com.google.api.ads.dfp.v201308.CreativeTemplatePage


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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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


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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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

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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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

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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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

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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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

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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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

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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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

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

    do {
      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(statementBuilder.toStatement());

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

      // Get the CreativeTemplateService.
      CreativeTemplateServiceInterface creativeTemplateService =
          user.getService(DfpService.V201208.CREATIVE_TEMPLATE_SERVICE);

      // Set defaults for page and filterStatement.
      CreativeTemplatePage page = new CreativeTemplatePage();
      Statement filterStatement = new Statement();
      int offset = 0;

      do {
        // Create a statement to get all creative templates.
        filterStatement.setQuery("LIMIT 500 OFFSET " + offset);

        // Get creative templates by statement.
        page = creativeTemplateService.getCreativeTemplatesByStatement(filterStatement);

        if (page.getResults() != null) {
          int i = page.getStartIndex();
          for (CreativeTemplate creativeTemplate : page.getResults()) {
            System.out.println(i + ") Creative template with ID \"" + creativeTemplate.getId()
                + "\", name \"" + creativeTemplate.getName()
                + "\", and type \"" + creativeTemplate.getType() + "\" was found.");
            i++;
          }
        }

        offset += 500;
      } while (offset < page.getTotalResultSetSize());

      System.out.println("Number of results found: " + page.getTotalResultSetSize());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

      Statement filterStatement =
          new StatementBuilder("WHERE type = :creativeTemplateType LIMIT 500").putValue(
              "creativeTemplateType", CreativeTemplateType.SYSTEM_DEFINED.toString()).toStatement();

      // Get creative templates by statement.
      CreativeTemplatePage page =
          creativeTemplateService.getCreativeTemplatesByStatement(filterStatement);

      if (page.getResults() != null) {
        int i = page.getStartIndex();
        for (CreativeTemplate creativeTemplate : page.getResults()) {
          System.out.println(i + ") Creative template with ID \"" + creativeTemplate.getId()
              + "\", name \"" + creativeTemplate.getName()
              + "\", and type \"" + creativeTemplate.getType() + "\" was found.");
          i++;
        }
      }

      System.out.println("Number of results found: " + page.getTotalResultSetSize());
    } catch (Exception e) {
       e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201308.CreativeTemplatePage

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.