Examples of TeamPage


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

      // Get the TeamService.
      TeamServiceInterface teamService = user.getService(DfpService.V201311.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) {
          int i = page.getStartIndex();
          for (Team team : page.getResults()) {
            System.out.println(i + ") Team with ID \"" + team.getId()
                + "\", name \"" + team.getName() + "\" 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

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

      // Create a statement to select first 5 teams that aren't built-in.
      Statement filterStatement = new StatementBuilder("WHERE id > 0 LIMIT 5").toStatement();

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

      if (page.getResults() != null) {
        Team[] teams = page.getResults();

        // Update each local team object by adding the ad unit to it.
        for (Team team : teams) {
          // Don't add ad unit if the team has all inventory already.
          if (!team.getHasAllInventory()) {
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.