Package com.google.api.ads.dfp.v201208

Examples of com.google.api.ads.dfp.v201208.Date


      SuggestedAdUnitServiceInterface suggestedAdUnitService =
          user.getService(DfpService.V201208.SUGGESTED_AD_UNIT_SERVICE);

      // Create statement to select all suggested ad units with 50 or more
      // requests.
      Statement filterStatement =
          new StatementBuilder("WHERE numRequests >= :numRequests").putValue("numRequests", 50L)
              .toStatement();

      // Get suggested ad units by statement.
      SuggestedAdUnitPage page =
View Full Code Here


      // Get the InventoryService.
      InventoryServiceInterface inventoryService =
          user.getService(DfpService.V201208.INVENTORY_SERVICE);

      // Create a statement to get all ad units.
      Statement filterStatement = new Statement("LIMIT 500", null);

      // Get ad units by statement.
      AdUnitPage page = inventoryService.getAdUnitsByStatement(filterStatement);

      if (page.getResults() != null) {
View Full Code Here

      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) {
View Full Code Here

      SuggestedAdUnitServiceInterface suggestedAdUnitService =
          user.getService(DfpService.V201208.SUGGESTED_AD_UNIT_SERVICE);

      // Create a statement to only select suggested ad units that have more
      // than 50 requests.
      Statement filterStatement =
          new StatementBuilder("WHERE numRequests > :numRequests LIMIT 500")
              .putValue("numRequests", 50).toStatement();

      // Get suggested ad units by statement.
      SuggestedAdUnitPage page =
View Full Code Here

      // Get the effective root ad unit ID of the network.
      String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

      // Create a statement to select the children of the effective root ad
      // unit.
      Statement filterStatement = new StatementBuilder("WHERE parentId = :id LIMIT 500")
          .putValue("id", effectiveRootAdUnitId).toStatement();

      // Get ad units by statement.
      AdUnitPage page = inventoryService.getAdUnitsByStatement(filterStatement);
View Full Code Here

      SuggestedAdUnitServiceInterface suggestedAdUnitService =
          user.getService(DfpService.V201208.SUGGESTED_AD_UNIT_SERVICE);

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

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

        // Get suggested ad units by statement.
        page = suggestedAdUnitService.getSuggestedAdUnitsByStatement(filterStatement);

        if (page.getResults() != null) {
View Full Code Here

      CompanyServiceInterface companyService =
          user.getService(DfpService.V201208.COMPANY_SERVICE);

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

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

        // Get companies by statement.
        page = companyService.getCompaniesByStatement(filterStatement);

        if (page.getResults() != null) {
View Full Code Here

      // Get the TeamService.
      TeamServiceInterface teamService = user.getService(DfpService.V201208.TEAM_SERVICE);

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

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

        // Get teams by statement.
        page = teamService.getTeamsByStatement(filterStatement);

        if (page.getResults() != null) {
View Full Code Here

      // Set the ID of the suggested ad unit to get.
      String suggestedAdUnitId = "INSERT_SUGGESTED_AD_UNIT_ID_HERE";

      // Get the suggested ad unit.
      SuggestedAdUnit suggestedAdUnit =
          suggestedAdUnitService.getSuggestedAdUnit(suggestedAdUnitId);

      if (suggestedAdUnit != null) {
        System.out.println("Suggested ad unit with ID \"" + suggestedAdUnit.getId()
            + "\", and number of requests \"" + suggestedAdUnit.getNumRequests()
            + "\" was found.");
      } else {
        System.out.println("No suggested ad unit found for this ID.");
      }
    } catch (Exception e) {
View Full Code Here

      Statement filterStatement =
          new StatementBuilder("WHERE numRequests >= :numRequests").putValue("numRequests", 50L)
              .toStatement();

      // Get suggested ad units by statement.
      SuggestedAdUnitPage page =
          suggestedAdUnitService.getSuggestedAdUnitsByStatement(filterStatement);

      if (page.getResults() != null) {
        int i = page.getStartIndex();

        for (SuggestedAdUnit suggestedAdUnit : page.getResults()) {
          System.out.println(i + ") Suggested ad unit with ID \"" + suggestedAdUnit.getId()
              + "\" and number of requests  \"" + suggestedAdUnit.getNumRequests()
              + "\" will be approved.");
          i++;
        }

        System.out.println("Number of suggested ad units to be approved: "
            + page.getTotalResultSetSize());

        // Create action.
        ApproveSuggestedAdUnit action = new ApproveSuggestedAdUnit();

        // Perform action.
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201208.Date

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.