Package com.google.api.ads.dfp.v201302

Examples of com.google.api.ads.dfp.v201302.ActivityPage


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

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

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


      int totalResultSetSize = 0;
      statementBuilder.offset(0);

      do {
        // Get activities by statement.
        ActivityPage page =
            activityService.getActivitiesByStatement(statementBuilder.toStatement());

        if (page.getResults() != null) {
          totalResultSetSize = page.getTotalResultSetSize();
          for (Activity activity : page.getResults()) {
            System.out.printf(
                "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
                totalResultsCounter++, activity.getId(), activity.getName(), activity.getType());
          }
        }
View Full Code Here

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

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

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

      int totalResultSetSize = 0;
      statementBuilder.offset(0);

      do {
        // Get activities by statement.
        ActivityPage page =
            activityService.getActivitiesByStatement(statementBuilder.toStatement());

        if (page.getResults() != null) {
          totalResultSetSize = page.getTotalResultSetSize();
          for (Activity activity : page.getResults()) {
            System.out.printf(
                "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
                totalResultsCounter++, activity.getId(), activity.getName(), activity.getType());
          }
        }
View Full Code Here

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

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

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

      int totalResultSetSize = 0;
      statementBuilder.offset(0);

      do {
        // Get activities by statement.
        ActivityPage page =
            activityService.getActivitiesByStatement(statementBuilder.toStatement());

        if (page.getResults() != null) {
          totalResultSetSize = page.getTotalResultSetSize();
          for (Activity activity : page.getResults()) {
            System.out.printf(
                "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
                totalResultsCounter++, activity.getId(), activity.getName(), activity.getType());
          }
        }
View Full Code Here

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

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

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

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

    do {
      // Get activities by statement.
      ActivityPage page =
          activityService.getActivitiesByStatement(statementBuilder.toStatement());

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

      // Set the ID of the activity to update.
      Integer activityId = Integer.parseInt("INSERT_ACTIVITY_ID_HERE");

      // Get the activity.
      Activity activity = activityService.getActivity(activityId);

      // Update the expected URL.
      activity.setExpectedURL("http://google.com");

      // Update the activity on the server.
      Activity[] activities = activityService.updateActivities(new Activity[] {activity});

      for (Activity updatedActivity : activities) {
View Full Code Here

    // Get the ActivityGroupService.
    ActivityGroupServiceInterface activityGroupService =
        user.getService(DfpService.V201302.ACTIVITY_GROUP_SERVICE);

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

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

      // Get activity groups by statement.
      page = activityGroupService.getActivityGroupsByStatement(filterStatement);

      if (page.getResults() != null) {
        for (ActivityGroup activityGroup : page.getResults()) {
          activityGroupIds.add(activityGroup.getId());
        }
      }

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

    return activityGroupIds;
  }
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201302.ActivityPage

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.