Package com.google.api.ads.dfp.v201306

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


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

      // Create a statement to order teams by name.
      Statement filterStatement =
          new StatementBuilder("ORDER BY name LIMIT 500")
              .toStatement();

      // Get teams by statement.
      TeamPage page = teamService.getTeamsByStatement(filterStatement);
View Full Code Here


   * @throws RemoteException if the soap request fails
   */
  private static void performOperations(CompanyServiceInterface companyService,
      UserServiceInterface userService, InventoryServiceInterface inventoryService,
      CreativeServiceInterface creativeService) throws RemoteException {
    companyService.getCompaniesByStatement(new Statement("LIMIT 500", null));
    userService.getUsersByStatement(new Statement("LIMIT 500", null));
    inventoryService.getAdUnitsByStatement(new Statement("LIMIT 500", null));

    // Call twice to creative service.
    creativeService.getCreativesByStatement(new Statement("LIMIT 500", null));
    creativeService.getCreativesByStatement(new Statement("LIMIT 500", null));
  }
View Full Code Here

      CreativeWrapperServiceInterface creativeWrapperService =
          user.getService(DfpService.V201306.CREATIVE_WRAPPER_SERVICE);

      // Create a statement to select only active creative wrappers.
      String statementText = "WHERE status = :status LIMIT 500";
      Statement filterStatement =
          new StatementBuilder(statementText)
              .putValue("status", CreativeWrapperStatus.ACTIVE.toString()).toStatement();

      // Set defaults for page and offset.
      CreativeWrapperPage page = new CreativeWrapperPage();
      int offset = 0;

      do {
        // Create a statement to get all active creative wrappers.
        filterStatement.setQuery(statementText + " OFFSET " + offset);

        // Get creative wrappers by statement.
        page = creativeWrapperService.getCreativeWrappersByStatement(filterStatement);

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

      // Get the TeamService.
      TeamServiceInterface teamService = user.getService(DfpService.V201306.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

  private static void makeApiRequest(DfpUser user) throws ServiceException, RemoteException,
      ApiException {
    // Service will use the auth token which was set by user.setAuthToken().
    CompanyServiceInterface companyService =
        user.getService(DfpService.V201306.COMPANY_SERVICE);
    companyService.getCompaniesByStatement(new Statement("LIMIT 1", null));
    System.out.println("Service call was successful.");
  }
View Full Code Here

      // Set the line item to get LICAs by.
      Long lineItemId = Long.parseLong("INSERT_LINE_ITEM_ID_HERE");

      // Create a statement to only select LICAs for the given lineItem ID.
      Statement filterStatement =
          new StatementBuilder("WHERE lineItemId = :lineItemId LIMIT 500")
              .putValue("lineItemId", lineItemId).toStatement();

      // Get LICAs by statement.
      LineItemCreativeAssociationPage page =
View Full Code Here

      CustomFieldServiceInterface customFieldService =
          user.getService(DfpService.V201306.CUSTOM_FIELD_SERVICE);

      // Sets defaults for page and filter.
      CustomFieldPage page = new CustomFieldPage();
      Statement filterStatement = new Statement();
      int offset = 0;

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

        // Get custom fields by statement.
        page = customFieldService.getCustomFieldsByStatement(filterStatement);

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

      // Get the CustomTargetingService.
      CustomTargetingServiceInterface customTargetingService =
          user.getService(DfpService.V201306.CUSTOM_TARGETING_SERVICE);

      // Create a statement to only select predefined custom targeting keys.
      Statement filterStatement = new StatementBuilder("WHERE type = :type LIMIT 500").putValue(
          "type", CustomTargetingKeyType.PREDEFINED.toString()).toStatement();

      // Get custom targeting keys by statement.
      CustomTargetingKeyPage page =
          customTargetingService.getCustomTargetingKeysByStatement(filterStatement);
View Full Code Here

      // Set the ID of the ad unit to add to the teams.
      String adUnitId = "INSERT_AD_UNIT_ID_HERE";

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

      // Get the LineItemCreativeAssociationService.
      LineItemCreativeAssociationServiceInterface licaService =
          user.getService(DfpService.V201306.LINEITEMCREATIVEASSOCIATION_SERVICE);

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

      // Get LICAs by statement.
      LineItemCreativeAssociationPage page =
          licaService.getLineItemCreativeAssociationsByStatement(filterStatement);
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201306.Statement

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.