Examples of CreativeSetServiceInterface


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

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201306.CREATIVE_SET_SERVICE);

      // Set the ID of the creatives to associate with this set.
      Long masterCreativeId = Long.parseLong("INSERT_MASTER_CREATIVE_ID_HERE");
      Long companionCreativeId = Long.parseLong("INSERT_COMPANION_CREATIVE_ID_HERE");

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

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

      if (creativeSet != null) {
        System.out.println("A creative set with ID \"" + creativeSet.getId()
            + "\", master creative ID \"" + creativeSet.getMasterCreativeId()
            + "\", and companion creative IDs {"
View Full Code Here

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

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201306.CREATIVE_SET_SERVICE);

      // Set the ID of the master creative to get creative sets for.
      Long masterCreativeId = Long.parseLong("INSERT_MASTER_CREATIVE_ID_HERE");

      // Create statement object to only select creative sets that have the
      // given master creative.
      Statement filterStatement =
          new StatementBuilder("WHERE masterCreativeId = :masterCreativeId LIMIT 500")
              .putValue("masterCreativeId", masterCreativeId).toStatement();

      // Get creative sets by statement.
      CreativeSetPage page = creativeSetService.getCreativeSetsByStatement(filterStatement);

      if (page.getResults() != null) {
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
          System.out.println(i + ") Creative set with ID \"" + creativeSet.getId()
View Full Code Here

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

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201308.CREATIVE_SET_SERVICE);

      // Set the ID of the creative set to get and the companion creative to
      // add.
      Long creativeSetId = Long.parseLong("INSERT_CREATIVE_SET_ID_HERE");
      Long companionCreativeId = Long.parseLong("INSERT_COMPANION_CREATIVE_ID_HERE");

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

      // Add the companion creative to the creative set.
      creativeSet.setCompanionCreativeIds(ArrayUtils.add(creativeSet.getCompanionCreativeIds(),
          companionCreativeId));

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

      // Display results.
      System.out.println("A creative set with ID \"" + creativeSet.getId()
          + "\", master creative ID \"" + creativeSet.getMasterCreativeId()
          + "\", and companion creative IDs {"
View Full Code Here

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

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201308.CREATIVE_SET_SERVICE);

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

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

        // Get creative sets by statement.
        page = creativeSetService.getCreativeSetsByStatement(filterStatement);

        if (page.getResults() != null) {
          int i = page.getStartIndex();
          for (CreativeSet creativeSet : page.getResults()) {
            System.out.println(i + ") Creative set with ID \"" + creativeSet.getId()
View Full Code Here

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

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201308.CREATIVE_SET_SERVICE);

      // Set the ID of the creatives to associate with this set.
      Long masterCreativeId = Long.parseLong("INSERT_MASTER_CREATIVE_ID_HERE");
      Long companionCreativeId = Long.parseLong("INSERT_COMPANION_CREATIVE_ID_HERE");

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

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

      if (creativeSet != null) {
        System.out.println("A creative set with ID \"" + creativeSet.getId()
            + "\", master creative ID \"" + creativeSet.getMasterCreativeId()
            + "\", and companion creative IDs {"
View Full Code Here

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

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201308.CREATIVE_SET_SERVICE);

      // Set the ID of the master creative to get creative sets for.
      Long masterCreativeId = Long.parseLong("INSERT_MASTER_CREATIVE_ID_HERE");

      // Create statement object to only select creative sets that have the
      // given master creative.
      Statement filterStatement =
          new StatementBuilder("WHERE masterCreativeId = :masterCreativeId LIMIT 500")
              .putValue("masterCreativeId", masterCreativeId).toStatement();

      // Get creative sets by statement.
      CreativeSetPage page = creativeSetService.getCreativeSetsByStatement(filterStatement);

      if (page.getResults() != null) {
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
          System.out.println(i + ") Creative set with ID \"" + creativeSet.getId()
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.CreativeSetServiceInterface

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201311.CREATIVE_SET_SERVICE);

      // Set the ID of the creative set to get and the companion creative to
      // add.
      Long creativeSetId = Long.parseLong("INSERT_CREATIVE_SET_ID_HERE");
      Long companionCreativeId = Long.parseLong("INSERT_COMPANION_CREATIVE_ID_HERE");

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

      // Add the companion creative to the creative set.
      creativeSet.setCompanionCreativeIds(ArrayUtils.add(creativeSet.getCompanionCreativeIds(),
          companionCreativeId));

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

      // Display results.
      System.out.println("A creative set with ID \"" + creativeSet.getId()
          + "\", master creative ID \"" + creativeSet.getMasterCreativeId()
          + "\", and companion creative IDs {"
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.CreativeSetServiceInterface

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201311.CREATIVE_SET_SERVICE);

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

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

        // Get creative sets by statement.
        page = creativeSetService.getCreativeSetsByStatement(filterStatement);

        if (page.getResults() != null) {
          int i = page.getStartIndex();
          for (CreativeSet creativeSet : page.getResults()) {
            System.out.println(i + ") Creative set with ID \"" + creativeSet.getId()
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.CreativeSetServiceInterface

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201311.CREATIVE_SET_SERVICE);

      // Set the ID of the creatives to associate with this set.
      Long masterCreativeId = Long.parseLong("INSERT_MASTER_CREATIVE_ID_HERE");
      Long companionCreativeId = Long.parseLong("INSERT_COMPANION_CREATIVE_ID_HERE");

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

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

      if (creativeSet != null) {
        System.out.println("A creative set with ID \"" + creativeSet.getId()
            + "\", master creative ID \"" + creativeSet.getMasterCreativeId()
            + "\", and companion creative IDs {"
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.CreativeSetServiceInterface

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CreativeSetService.
      CreativeSetServiceInterface creativeSetService =
          user.getService(DfpService.V201311.CREATIVE_SET_SERVICE);

      // Set the ID of the master creative to get creative sets for.
      Long masterCreativeId = Long.parseLong("INSERT_MASTER_CREATIVE_ID_HERE");

      // Create statement object to only select creative sets that have the
      // given master creative.
      Statement filterStatement =
          new StatementBuilder("WHERE masterCreativeId = :masterCreativeId LIMIT 500")
              .putValue("masterCreativeId", masterCreativeId).toStatement();

      // Get creative sets by statement.
      CreativeSetPage page = creativeSetService.getCreativeSetsByStatement(filterStatement);

      if (page.getResults() != null) {
        int i = page.getStartIndex();
        for (CreativeSet creativeSet : page.getResults()) {
          System.out.println(i + ") Creative set with ID \"" + creativeSet.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.